@tsailab/xai
Version:
The loto-xai is an openai nodejs sdk compatible extension library.
23 lines • 774 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fixProto = fixProto;
exports.fixStack = fixStack;
/* eslint-disable @typescript-eslint/no-empty-object-type */
/* eslint-disable @typescript-eslint/no-unused-expressions */
/* eslint-disable @typescript-eslint/no-unsafe-function-type */
/**
*
* @param target
* @param prototype
*/
function fixProto(target, prototype) {
const setPrototypeOf = Object.setPrototypeOf;
setPrototypeOf
? setPrototypeOf(target, prototype)
: (target.__proto__ = prototype);
}
function fixStack(target, fn = target.constructor) {
const captureStackTrace = Error.captureStackTrace;
captureStackTrace && captureStackTrace(target, fn);
}
//# sourceMappingURL=xai-error.util.js.map