UNPKG

661 BJavaScriptView Raw
1/**
2 * Allows you to hoist static functions in components.
3 * Created for the purpose of fixing broken static functions in classes
4 * that utilize decorators.
5 *
6 * @public
7 * @param source - The object where the methods are hoisted from.
8 * @param dest - The object to hoist the methods onto.
9 * @returns The dest object with methods added
10 */
11export function hoistStatics(source, dest) {
12 for (var name_1 in source) {
13 if (source.hasOwnProperty(name_1)) {
14 // eslint-disable-next-line @typescript-eslint/no-explicit-any
15 dest[name_1] = source[name_1];
16 }
17 }
18 return dest;
19}
20//# sourceMappingURL=hoistStatics.js.map
\No newline at end of file