ts-fortress 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,8 +10,8 @@ export declare const JsonPrimitive: Readonly<{
|
|
|
10
10
|
path: readonly string[];
|
|
11
11
|
actualValue: unknown;
|
|
12
12
|
expectedType: string;
|
|
13
|
-
message: string | undefined;
|
|
14
13
|
typeName: string;
|
|
14
|
+
message: string | undefined;
|
|
15
15
|
}>[]>;
|
|
16
16
|
optional?: true;
|
|
17
17
|
}>;
|
|
@@ -39,8 +39,8 @@ export declare const JsonObject: Readonly<{
|
|
|
39
39
|
path: readonly string[];
|
|
40
40
|
actualValue: unknown;
|
|
41
41
|
expectedType: string;
|
|
42
|
-
message: string | undefined;
|
|
43
42
|
typeName: string;
|
|
43
|
+
message: string | undefined;
|
|
44
44
|
}>[]>;
|
|
45
45
|
optional?: true;
|
|
46
46
|
}>;
|
|
@@ -8,10 +8,15 @@ export type ValidationError = Readonly<{
|
|
|
8
8
|
actualValue: unknown;
|
|
9
9
|
/** The expected type or constraint */
|
|
10
10
|
expectedType: string;
|
|
11
|
-
/** Additional context about the validation failure */
|
|
12
|
-
message: string | undefined;
|
|
13
11
|
/** The name of the type that was being validated */
|
|
14
12
|
typeName: string;
|
|
13
|
+
/**
|
|
14
|
+
* Additional context about the validation failure
|
|
15
|
+
* @note This field is for internal implementation purposes and may be undefined.
|
|
16
|
+
* Use `validationErrorToMessage` to stringify the error.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
message: string | undefined;
|
|
15
20
|
}>;
|
|
16
21
|
export type ValidationErrorWithMessage = MergeIntersection<StrictOmit<ValidationError, 'message'> & Readonly<{
|
|
17
22
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-error.d.mts","sourceRoot":"","sources":["../../src/utils/validation-error.mts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,eAAe,G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8B,GAAI,0CAI5C,QAAQ,CAAC;IACV,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,KAAG,eAMH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-error.mjs","sources":["../../src/utils/validation-error.mts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"validation-error.mjs","sources":["../../src/utils/validation-error.mts"],"sourcesContent":[null],"names":[],"mappings":";;AA4BA;;AAEG;AACI,MAAM,wBAAwB,GAAG,CACtC,KAAsB,EACtB,2BAAA,GAAsC,EAAE,KAC9B;IACV,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAA,IAAA,EAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,CAAE,GAAG,EAAE;AAC1E,IAAA,MAAM,aAAa,GAAG,OAAO,KAAK,CAAC,WAAW;AAE9C,IAAA,IAAI,KAAK,CAAC,OAAO,KAAK,SAAS,EAAE;AAC/B,QAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA,EAAG,OAAO,EAAE;IACrC;AAEA,IAAA,MAAM,cAAc,GAAW,QAAQ,CAAC,KAAK,CAAC,WAAW;AACvD,UAAE,KAAK,CAAC,WAAW,CAAC,MAAM,IAAI;AAC5B,cAAE,CAAA,EAAA,EAAK,KAAK,CAAC,WAAW,CAAA,CAAA;AACxB,cAAE;AACJ,UAAE,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAC7C,CAAC,CAAC,MAAM,IAAI,2BAA2B,GAAG,CAAA,GAAA,EAAM,CAAC,CAAA,EAAA,CAAI,GAAG,EAAE,CAC3D,CAAC,KAAK;IAEX,OAAO,CAAA,UAAA,EAAa,KAAK,CAAC,YAAY,CAAA,CAAA,EAAI,OAAO,CAAA,OAAA,EAAU,aAAa,CAAA,YAAA,EAAe,cAAc,CAAA,CAAA,CAAG;AAC1G;AAEA;;;AAGG;AACI,MAAM,0BAA0B,GAAG,CACxC,MAAkC,EAClC,2BAAA,GAAsC,EAAE,KAExC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,EAAE,2BAA2B,CAAC;AAE5E;;AAEG;MACU,6BAA6B,GAAG,CAC3C,MAAkC,EAClC,WAAmB,KAEnB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,MAAM;AACrB,IAAA,GAAG,KAAK;IACR,IAAI,EAAE,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;AACnC,CAAA,CAAC;AAEJ;;AAEG;MACU,8BAA8B,GAAG,CAC5C,MAAkC,EAClC,KAAa,KAEb,6BAA6B,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE;AAExD;;AAEG;AACI,MAAM,8BAA8B,GAAG,CAAC,EAC7C,WAAW,EACX,YAAY,EACZ,QAAQ,GAKR,MAAuB;AACvB,IAAA,IAAI,EAAE,EAAE;IACR,WAAW;IACX,YAAY;IACZ,QAAQ;AACR,IAAA,OAAO,EAAE,SAAS;AACnB,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -10,10 +10,16 @@ export type ValidationError = Readonly<{
|
|
|
10
10
|
actualValue: unknown;
|
|
11
11
|
/** The expected type or constraint */
|
|
12
12
|
expectedType: string;
|
|
13
|
-
/** Additional context about the validation failure */
|
|
14
|
-
message: string | undefined;
|
|
15
13
|
/** The name of the type that was being validated */
|
|
16
14
|
typeName: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Additional context about the validation failure
|
|
18
|
+
* @note This field is for internal implementation purposes and may be undefined.
|
|
19
|
+
* Use `validationErrorToMessage` to stringify the error.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
message: string | undefined;
|
|
17
23
|
}>;
|
|
18
24
|
|
|
19
25
|
export type ValidationErrorWithMessage = MergeIntersection<
|