MCPcopy Index your code
hub / github.com/Effect-TS/effect / isPromise

Function isPromise

packages/effect/src/Predicate.ts:844–847  ·  view source on GitHub ↗
(
  input: unknown
)

Source from the content-addressed store, hash-verified

842 * @see isPromiseLike
843 */
844export const isPromise = (
845 input: unknown
846): input is Promise<unknown> =>
847 hasProperty(input, "then") && "catch" in input && isFunction(input.then) && isFunction(input.catch)
848
849/**
850 * A refinement that checks if a value is `PromiseLike`. It performs a duck-typing

Callers

nothing calls this directly

Calls 1

isFunctionFunction · 0.85

Tested by

no test coverage detected