"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const lodash_1 = require("./wrap/lodash");
const function_1 = require("./function");
const imitate_1 = require("./imitate");
exports.default = (typeOrNames) => lodash_1.default.isFunction(typeOrNames)
    ? imitate_1.default(typeOrNames)
    : fakeConstructorFromNames(typeOrNames);
var fakeConstructorFromNames = (funcNames) => {
    return lodash_1.default.tap(function_1.default('(unnamed constructor)'), (fakeConstructor) => {
        fakeConstructor.prototype.toString = () => '[test double instance of constructor]';
        lodash_1.default.each(funcNames, (funcName) => {
            fakeConstructor.prototype[funcName] = function_1.default(`#${String(funcName)}`);
        });
    });
};
