UNPKG

@arizeai/phoenix-evals

Version:
13 lines 434 B
/** * Type guard for if a function is a Promise * @param value * @returns true if it is a Promise */ export function isPromise(value) { return (!!value && // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof value?.then === "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof value?.catch === "function"); } //# sourceMappingURL=typeUtils.js.map