We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e559c1 commit 88c189cCopy full SHA for 88c189c
1 file changed
src/type-utils.ts
@@ -11,10 +11,6 @@ import {
11
Validator,
12
} from './validatorTypes';
13
14
-export type DataFrom<S extends Schema> = {
15
- [K in keyof S]: InferDataType<S[K]>;
16
-};
17
-
18
type InferTypeWithOptional<T, U> = T extends O<T> ? U | undefined : U;
19
20
type InferDataType<T> = T extends StringValidator
@@ -33,6 +29,10 @@ type InferDataType<T> = T extends StringValidator
33
29
? InferTypeWithOptional<T, { [key: string]: InferDataType<V> }>
34
30
: never;
35
31
32
+export type DataFrom<S extends Schema> = {
+ [K in keyof S]: InferDataType<S[K]>;
+};
+
36
export type VisitorMember =
37
| 'string'
38
| 'number'
0 commit comments