CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
applyBind.d.ts19 linesDownload Raw Back to call-bind-apply-helpers
1import actualApply from './actualApply';2 3type TupleSplitHead<T extends any[], N extends number> = T['length'] extends N4  ? T5  : T extends [...infer R, any]6  ? TupleSplitHead<R, N>7  : never8 9type TupleSplitTail<T, N extends number, O extends any[] = []> = O['length'] extends N10  ? T11  : T extends [infer F, ...infer R]12  ? TupleSplitTail<[...R], N, [...O, F]>13  : never14 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;