UNPKG

367 BTypeScriptView Raw
1import type { PropertyKey } from "../index";
2
3declare function Invoke<O extends {}, P extends PropertyKey>(
4 O: O,
5 P: P,
6 args?: P extends keyof O ? O[P] extends (...args: infer A) => any ? Readonly<A> : ArrayLike<unknown>
7 : ArrayLike<unknown>,
8): P extends keyof O ? (O[P] extends (...args: any) => infer R ? R : never) : unknown;
9export = Invoke;
10
\No newline at end of file