Skip to content

Commit 88c189c

Browse files
committed
refactor: organize types by order of execute
1 parent 5e559c1 commit 88c189c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/type-utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ import {
1111
Validator,
1212
} from './validatorTypes';
1313

14-
export type DataFrom<S extends Schema> = {
15-
[K in keyof S]: InferDataType<S[K]>;
16-
};
17-
1814
type InferTypeWithOptional<T, U> = T extends O<T> ? U | undefined : U;
1915

2016
type InferDataType<T> = T extends StringValidator
@@ -33,6 +29,10 @@ type InferDataType<T> = T extends StringValidator
3329
? InferTypeWithOptional<T, { [key: string]: InferDataType<V> }>
3430
: never;
3531

32+
export type DataFrom<S extends Schema> = {
33+
[K in keyof S]: InferDataType<S[K]>;
34+
};
35+
3636
export type VisitorMember =
3737
| 'string'
3838
| 'number'

0 commit comments

Comments
 (0)