Skip to content
This repository was archived by the owner on Aug 3, 2023. It is now read-only.

Commit 21dfa86

Browse files
committed
Fixed infinite definition on drop type
1 parent e33aad1 commit 21dfa86

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ export type ConcatMultiple<TupleSet extends any[][]> = {
8484
]
8585

8686
export type Drop<Tuple extends any[], Quantity extends number, Count extends any[] = []> =
87+
[
88+
any[] extends Tuple ? true : false,
89+
number extends Quantity ? true : false
90+
] extends true[] ? Tuple :
8791
Tuple extends [] ? Tuple :
8892
Quantity extends Count['length'] ? Tuple :
8993
((...args: Tuple) => any) extends ((_: any, ..._1: infer Rest) => any)

0 commit comments

Comments
 (0)