@regle/core 1.9.4 → 1.9.5
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.
- package/dist/regle-core.d.ts +2 -1
- package/package.json +1 -1
package/dist/regle-core.d.ts
CHANGED
|
@@ -2283,7 +2283,8 @@ type RegleErrorTree<TState = MaybeRef<Record<string, any> | any[]>, TIssue exten
|
|
|
2283
2283
|
type RegleIssuesTree<TState = MaybeRef<Record<string, any> | any[]>> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], false, true> };
|
|
2284
2284
|
type RegleExternalErrorTree<TState = MaybeRef<Record<string, any> | any[]>> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]?: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], true> };
|
|
2285
2285
|
type RegleExternalSchemaErrorTree<TState = MaybeRef<Record<string, any> | any[]>> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]?: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], true, true> };
|
|
2286
|
-
type
|
|
2286
|
+
type ErrorMessageOrIssue<TIssue extends boolean> = TIssue extends true ? RegleFieldIssue[] : string[];
|
|
2287
|
+
type RegleValidationErrors<TState extends Record<string, any> | any[] | unknown = never, TExternal extends boolean = false, TIssue extends boolean = false> = HasNamedKeys<TState> extends true ? IsAny<TState> extends true ? any : NonNullable<TState> extends Array<infer U> ? U extends Record<string, any> ? TExternal extends false ? ExtendOnlyRealRecord<U> extends true ? RegleCollectionErrors<U, TIssue> : ErrorMessageOrIssue<TIssue> : RegleExternalCollectionErrors<U, TIssue> : ErrorMessageOrIssue<TIssue> : NonNullable<TState> extends Date | File ? ErrorMessageOrIssue<TIssue> : NonNullable<TState> extends Record<string, any> ? TExternal extends false ? RegleErrorTree<TState, TIssue> : RegleExternalErrorTree<TState> : ErrorMessageOrIssue<TIssue> : any;
|
|
2287
2288
|
type RegleCollectionErrors<TState extends Record<string, any>, TIssue extends boolean = false> = {
|
|
2288
2289
|
readonly $self: TIssue extends true ? RegleFieldIssue[] : string[];
|
|
2289
2290
|
readonly $each: RegleValidationErrors<TState, false, TIssue>[];
|