@smithery/sdk
Version:
SDK to develop with Smithery
13 lines (12 loc) • 419 B
TypeScript
/**
* Patches a function on an object
* @param obj
* @param key
* @param patcher
*/
export declare function patch<T extends {
[P in K]: (...args: any[]) => any;
}, K extends keyof T & string>(obj: T, key: K, patcher: (fn: T[K]) => T[K]): void;
export declare function patch<T extends {
[P in K]?: (...args: any[]) => any;
}, K extends keyof T & string>(obj: T, key: K, patcher: (fn?: T[K]) => T[K]): void;