retort-js
Version:
Intuitive, production-ready prompt chaining in Javascript
21 lines (20 loc) • 818 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RetortExtendableFunction = void 0;
// FunctionLiar removes "any" typing from inherited calls.
let FunctionLiar = Function;
class RetortExtendableFunction extends FunctionLiar {
constructor() {
function _retortFunctionWrapper() {
const self = _retortFunctionWrapper;
if (!self.__wrappedFunction) {
throw new Error("RetortExtendableFunction: __wrappedFunction not defined");
}
return self.__wrappedFunction.apply(_retortFunctionWrapper, arguments);
}
const self = _retortFunctionWrapper;
return Object.setPrototypeOf(self, new.target.prototype);
}
}
exports.RetortExtendableFunction = RetortExtendableFunction;
Symbol.hasInstance;