@tsailab/xai
Version:
The loto-xai is an openai nodejs sdk compatible extension library.
19 lines • 653 B
JavaScript
/* 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
*/
export function fixProto(target, prototype) {
const setPrototypeOf = Object.setPrototypeOf;
setPrototypeOf
? setPrototypeOf(target, prototype)
: (target.__proto__ = prototype);
}
export function fixStack(target, fn = target.constructor) {
const captureStackTrace = Error.captureStackTrace;
captureStackTrace && captureStackTrace(target, fn);
}
//# sourceMappingURL=xai-error.util.js.map