fix types

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-11-16 11:34:27 +01:00
parent 2a2e33d320
commit aaa6fb3bc9
12 changed files with 52 additions and 44 deletions
@@ -220,12 +220,11 @@ export type TuplifyUnion<
/**
* @public
*/
export type ConvertAll<T, R extends ReadonlyArray<unknown> = []> = T extends [
infer First extends JSONSchema7,
...infer Rest,
]
? ConvertAll<Rest, [...R, FromSchema<First>]>
: R;
export type ConvertAll<T extends ReadonlyArray<unknown>> = {
[Index in keyof T]: T[Index] extends JSONSchema7
? FromSchema<T[Index]>
: T[Index];
} & { length: T['length'] };
/**
* @public