UNPKG

835 BTypeScriptView Raw
1/**
2 * Allows you to hoist methods, except those in an exclusion set from a source object into a destination object.
3 *
4 * @public
5 * @param destination - The instance of the object to hoist the methods onto.
6 * @param source - The instance of the object where the methods are hoisted from.
7 * @param exclusions - (Optional) What methods to exclude from being hoisted.
8 * @returns An array of names of methods that were hoisted.
9 */
10export declare function hoistMethods(destination: any, source: any, exclusions?: string[]): string[];
11/**
12 * Provides a method for convenience to unhoist hoisted methods.
13 *
14 * @public
15 * @param source - The source object upon which methods were hoisted.
16 * @param methodNames - An array of method names to unhoist.
17 */
18export declare function unhoistMethods(source: any, methodNames: string[]): void;