ctx-core 4.11.0 → 4.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/tup/index.d.ts +17 -4
- package/package.json +1 -1
package/all/tup/index.d.ts
CHANGED
|
@@ -12,9 +12,22 @@ export {
|
|
|
12
12
|
tup as tup_fn,
|
|
13
13
|
}
|
|
14
14
|
export type TupleRest<T extends unknown[]> =
|
|
15
|
-
T['length'] extends 0
|
|
16
|
-
|
|
15
|
+
T['length'] extends 0
|
|
16
|
+
? undefined
|
|
17
|
+
: (((...b:T)=>void) extends (a:unknown, ...b:infer I)=>void ? I : [])
|
|
17
18
|
export type TupleFirst<T extends unknown[]> =
|
|
18
19
|
T['length'] extends 0 ? undefined : T[0]
|
|
19
|
-
|
|
20
|
-
[Exclude<TupleFirst<T>, E>,
|
|
20
|
+
type _TupleExclude<T extends unknown[], E, Rest> =
|
|
21
|
+
[Exclude<TupleFirst<T>, E>, Rest]
|
|
22
|
+
export interface TupleExclude<
|
|
23
|
+
T extends unknown[], E
|
|
24
|
+
> extends _TupleExclude<
|
|
25
|
+
T,
|
|
26
|
+
E,
|
|
27
|
+
TupleExclude<
|
|
28
|
+
// @ts-expect-error TS2344
|
|
29
|
+
TupleRest<T>,
|
|
30
|
+
E
|
|
31
|
+
>
|
|
32
|
+
> {
|
|
33
|
+
}
|