source: imaps-frontend/node_modules/call-bind-apply-helpers/applyBind.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 614 bytes
Line 
1import actualApply from './actualApply';
2
3type 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
9type 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
15type TupleSplit<T extends any[], N extends number> = [TupleSplitHead<T, N>, TupleSplitTail<T, N>]
16
17declare function applyBind(...args: TupleSplit<Parameters<typeof actualApply>, 2>[1]): ReturnType<typeof actualApply>;
18
19export = applyBind;
Note: See TracBrowser for help on using the repository browser.