Skip to content

Commit d8b5e1a

Browse files
committed
get rid of separate IsTuple helper just do the check inline
1 parent 0d983c4 commit d8b5e1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/router-core/src/ssr/serializer/transformer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ type ValidateSerializableArrayCore<
8888
TSerializable,
8989
TKind extends 'input' | 'result',
9090
> = T extends any
91-
? IsTuple<T> extends true
92-
? { [K in keyof T]: ApplyArrayValidation<T[K], TSerializable, TKind> }
93-
: T extends Array<infer U>
91+
? number extends T['length']
92+
? T extends Array<infer U>
9493
? Array<ApplyArrayValidation<U, TSerializable, TKind>>
9594
: ReadonlyArray<ApplyArrayValidation<T[number], TSerializable, TKind>>
95+
: { [K in keyof T]: ApplyArrayValidation<T[K], TSerializable, TKind> }
9696
: never
9797

9898
type ValidateSerializableArray<

0 commit comments

Comments
 (0)