UNPKG

754 BTypeScriptView Raw
1import type { Intrinsics } from '../GetIntrinsic';
2
3type PrependThisParameter<T> = T extends (...args: infer A) => infer R
4 ? (thisArg: ThisParameterType<T>, ...args: A) => R
5 : T;
6
7declare function callBoundIntrinsic<K extends keyof Intrinsics>(
8 name: K,
9 allowMissing?: false,
10): PrependThisParameter<Intrinsics[K]>;
11declare function callBoundIntrinsic<K extends keyof Intrinsics>(
12 name: K,
13 allowMissing: true,
14): PrependThisParameter<Intrinsics[K]> | undefined;
15declare function callBoundIntrinsic<K extends keyof Intrinsics>(
16 name: K,
17 allowMissing?: boolean,
18): PrependThisParameter<Intrinsics[K]> | undefined;
19declare function callBoundIntrinsic(name: string, allowMissing?: boolean): any;
20
21export = callBoundIntrinsic;