MCPcopy Create free account
hub / github.com/arktypeio/arktype / isThenable

Function isThenable

ark/type/parser/definition.ts:183–187  ·  view source on GitHub ↗
(result: unknown)

Source from the content-addressed store, hash-verified

181// any thenable, since a Promise from another realm, or a library's own, isn't
182// an instance of this realm's Promise
183const isThenable = (result: unknown): result is PromiseLike<unknown> =>
184 typeof result === "object" &&
185 result !== null &&
186 "then" in result &&
187 typeof result.then === "function"
188
189const parseForeignRoot = (def: object, ctx: BaseParseContext): BaseRoot =>
190 isStandardSchema(def) ?

Callers 1

validateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected