import type { clone } from '../../../clone/index.js'; import type { _ProtoCallable, IProtoCallable } from './_/index.js'; import type { ProtoCallableOptions } from './_/ProtoCallableOptions.js'; import { UNSET } from '../../../_/symbols/unset.js'; export type __unused_ProtoCallable = typeof clone; export type ProtoCallable = Options extends UNSET ? IProtoCallable : Options extends ProtoCallableOptions ? _ProtoCallable : never; /** * Create callable anything * * - ✅ Works with {@link Proxy} - see tests * - ❌ Does not allow `this` * - ❌ Can't enumerate properties * * - Works by changing function's prototype * - ❌ Does not work properly with {@link clone}() * * @example * * ```ts * const a = ProtoCallable({ * call: (n: number) => 2 * n, * prototype: { a: 1 }, * }) * * expect(a.a).toBe(1) * expect(a(2)).toBe(4) * ``` */ export declare function ProtoCallable(options: Options): ProtoCallable; //# sourceMappingURL=ProtoCallable.d.ts.map