claude-flow
Version:
Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)
63 lines (52 loc) • 1.34 kB
text/typescript
import extend from './index.js'
// OK
// Pass single `object`.
constructor({});
constructor([]);
constructor(() => {});
// Pass single `object`, then `any`.
constructor({}, 0);
constructor({}, "");
constructor({}, false);
constructor({}, null);
constructor({}, undefined);
constructor({}, {});
constructor({}, []);
constructor({}, () => {});
// Pass variadic args.
constructor({}, 0, "", false, null, undefined, {}, [], () => {});
// Pass `boolean`, then single `object`.
constructor(true, {});
constructor(true, []);
constructor(true, () => {});
// Pass `boolean`, single `object`, then `any`.
constructor(true, {}, 0);
constructor(true, {}, "");
constructor(true, {}, false);
constructor(true, {}, null);
constructor(true, {}, undefined);
constructor(true, {}, {});
constructor(true, {}, []);
constructor(true, {}, () => {});
// Pass `boolean`, then variadic args.
constructor(true, {}, 0, "", false, null, undefined, {}, [], () => {});
// Not OK
// Incorrect extendee `object`.
// @ts-expect-error
constructor();
// @ts-expect-error
constructor(0);
// @ts-expect-error
constructor("");
// @ts-expect-error
constructor(false);
// @ts-expect-error
constructor();
// @ts-expect-error
constructor(true, 0);
// @ts-expect-error
constructor(true, "");
// @ts-expect-error
constructor(true, false);
// @ts-expect-error
constructor(true);