@sanity/desk-tool
Version:
Tool for managing all sorts of content in a structured manner
8 lines • 331 B
TypeScript
/**
* An alternative to `obj.method.bind(obj)` that utilizes a weakmap to return
* the same memory reference for sequent binds.
*/
export declare function memoBind<T extends object, K extends keyof {
[P in keyof T]: T[P] extends Function ? T[P] : never;
}>(obj: T, methodKey: K): T[K];
//# sourceMappingURL=memoBind.d.ts.map