File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33---
44
55### Version Updates
6-
6+ - [ Revision 1.0.24] ( https://github.com/sinclairzx81/typebox/pull/1379 )
7+ - Use TLocalizedValidationError on AssertError
78- [ Revision 1.0.23] ( https://github.com/sinclairzx81/typebox/pull/1378 )
89 - Revert Standard Schema Error Path Translation | Provide Translation Via Example
910- [ Revision 1.0.22] ( https://github.com/sinclairzx81/typebox/pull/1375 )
Original file line number Diff line number Diff line change @@ -26,17 +26,19 @@ THE SOFTWARE.
2626
2727---------------------------------------------------------------------------*/
2828
29- import type { Static , TProperties , TSchema } from '../../type/index.ts'
3029import { Arguments } from '../../system/arguments/index.ts'
30+ import type { TLocalizedValidationError } from '../../error/index.ts'
31+ import type { Static , TProperties , TSchema } from '../../type/index.ts'
32+
3133import { Check } from '../check/index.ts'
3234import { Errors } from '../errors/index.ts'
3335
3436// ------------------------------------------------------------------
3537// AssertError
3638// ------------------------------------------------------------------
3739export class AssertError extends Error {
38- declare readonly cause : { source : string ; errors : object [ ] ; value : unknown }
39- constructor ( source : string , value : unknown , errors : object [ ] ) {
40+ declare readonly cause : { source : string ; errors : TLocalizedValidationError [ ] ; value : unknown }
41+ constructor ( source : string , value : unknown , errors : TLocalizedValidationError [ ] ) {
4042 super ( source )
4143 Object . defineProperty ( this , 'cause' , {
4244 value : { source, errors, value } ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ THE SOFTWARE.
2929// deno-fmt-ignore-file
3030
3131import { Arguments } from '../../system/arguments/index.ts'
32+ import { type TLocalizedValidationError } from '../../error/errors.ts'
3233import { type TProperties , type TSchema , type StaticDecode } from '../../type/index.ts'
3334
3435import { AssertError } from '../assert/index.ts'
@@ -45,7 +46,7 @@ import { FromType } from './from-type.ts'
4546// Assert
4647// ------------------------------------------------------------------
4748export class DecodeError extends AssertError {
48- constructor ( value : unknown , errors : object [ ] ) {
49+ constructor ( value : unknown , errors : TLocalizedValidationError [ ] ) {
4950 super ( 'Decode' , value , errors )
5051 }
5152}
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ THE SOFTWARE.
2929// deno-fmt-ignore-file
3030
3131import { Arguments } from '../../system/arguments/index.ts'
32+ import { type TLocalizedValidationError } from '../../error/errors.ts'
3233import { type TProperties , type TSchema , type StaticEncode } from '../../type/index.ts'
3334
3435import { AssertError } from '../assert/index.ts'
@@ -45,7 +46,7 @@ import { FromType } from './from-type.ts'
4546// Assert
4647// ------------------------------------------------------------------
4748export class EncodeError extends AssertError {
48- constructor ( value : unknown , errors : object [ ] ) {
49+ constructor ( value : unknown , errors : TLocalizedValidationError [ ] ) {
4950 super ( 'Encode' , value , errors )
5051 }
5152}
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ THE SOFTWARE.
2929// deno-fmt-ignore-file
3030
3131import { Arguments } from '../../system/arguments/index.ts'
32+ import { type TLocalizedValidationError } from '../../error/errors.ts'
3233import { type TProperties , type TSchema , type StaticParse } from '../../type/index.ts'
3334
3435import { AssertError } from '../assert/index.ts'
@@ -44,7 +45,7 @@ import { Pipeline } from '../pipeline/index.ts'
4445// Assert
4546// ------------------------------------------------------------------
4647export class ParseError extends AssertError {
47- constructor ( value : unknown , errors : object [ ] ) {
48+ constructor ( value : unknown , errors : TLocalizedValidationError [ ] ) {
4849 super ( 'Parse' , value , errors )
4950 }
5051}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { Range } from './task/range/index.ts'
88import { Metrics } from './task/metrics/index.ts'
99import { Task } from 'tasksmith'
1010
11- const Version = '1.0.23 '
11+ const Version = '1.0.24 '
1212
1313// ------------------------------------------------------------------
1414// Build
You can’t perform that action at this time.
0 commit comments