UNPKG

@arizeai/phoenix-evals

Version:
16 lines 629 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPromise = isPromise; /** * Type guard for if a function is a Promise * @param value * @returns true if it is a Promise */ function isPromise(value) { return (!!value && // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof (value === null || value === void 0 ? void 0 : value.then) === "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof (value === null || value === void 0 ? void 0 : value.catch) === "function"); } //# sourceMappingURL=typeUtils.js.map