@arizeai/phoenix-evals
Version:
A library for running evaluations for AI use cases
13 lines • 434 B
JavaScript
/**
* 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