1 | import type { ObjectType } from './Types';
|
2 | declare type FunctionType = (...args: any[]) => any;
|
3 | export declare function makeCallable<F extends FunctionType, O extends ObjectType>(func: F, object: O): F & O;
|
4 | /**
|
5 | * Wrap an object in a proxy
|
6 | *
|
7 | * If a wrapper is supplied, each of its properties will be added to the proxy.
|
8 | * If a property is a function on the wrapper and target, the wrapper's function
|
9 | * will be invoked and then the target's will be.
|
10 | * If the proxy encounters a property that does not exist on the target or the
|
11 | * wrapper, it will throw an error.
|
12 | *
|
13 | * @param target The object what will be wrapped in a proxy
|
14 | * @param wrapper An optional object whose properties will be added to the proxy
|
15 | */
|
16 | export declare function proxyWrap<T extends ObjectType, W extends Record<string, any> | undefined = T>(target: Record<string, any>, wrapper?: W): [T, T & W];
|
17 | export {};
|