|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
614 bytes
|
| Line | |
|---|
| 1 | import actualApply from './actualApply';
|
|---|
| 2 |
|
|---|
| 3 | type TupleSplitHead<T extends any[], N extends number> = T['length'] extends N
|
|---|
| 4 | ? T
|
|---|
| 5 | : T extends [...infer R, any]
|
|---|
| 6 | ? TupleSplitHead<R, N>
|
|---|
| 7 | : never
|
|---|
| 8 |
|
|---|
| 9 | type TupleSplitTail<T, N extends number, O extends any[] = []> = O['length'] extends N
|
|---|
| 10 | ? T
|
|---|
| 11 | : T extends [infer F, ...infer R]
|
|---|
| 12 | ? TupleSplitTail<[...R], N, [...O, F]>
|
|---|
| 13 | : never
|
|---|
| 14 |
|
|---|
| 15 | type TupleSplit<T extends any[], N extends number> = [TupleSplitHead<T, N>, TupleSplitTail<T, N>]
|
|---|
| 16 |
|
|---|
| 17 | declare function applyBind(...args: TupleSplit<Parameters<typeof actualApply>, 2>[1]): ReturnType<typeof actualApply>;
|
|---|
| 18 |
|
|---|
| 19 | export = applyBind; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.