1 | import type { PropertyKey } from "../index";
|
2 |
|
3 | declare function GetMethod<O, P extends PropertyKey>(
|
4 | O: O,
|
5 | P: P,
|
6 | ): P extends keyof O // eslint-disable-next-line @typescript-eslint/ban-types
|
7 | ? NonNullable<O[P]> extends Function ? O[P]
|
8 | : never
|
9 | : ((...args: any) => any) | undefined;
|
10 | export = GetMethod;
|