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

Function functionKindOf

ark/aot/graph.ts:1017–1024  ·  view source on GitHub ↗
(returned: KindBits)

Source from the content-addressed store, hash-verified

1015 unsureOf(callee)
1016
1017const functionKindOf = (returned: KindBits): KindBits =>
1018 kinds.data |
1019 (returned & kinds.type ? kinds.returnsType : 0) |
1020 (returned & (anyKind & ~kinds.type & ~kinds.data) ? kinds.returnsArk : 0) |
1021 (returned & (kinds.unknown | kinds.holder) ? kinds.returnsUnsure : 0) |
1022 // e.g. a hook returning `context as State<T>`, whose call is no more
1023 // lost than what it returns, as one the build follows to the function is
1024 (returned & opaqueBits ? kinds.returnsOpaque : 0)
1025
1026export const isArk = (kind: KindBits): boolean =>
1027 (kind & (kinds.type | kinds.otherArk)) !== 0

Callers 4

keyKindOfMethod · 0.85
typeKindOfMethod · 0.85
signaturesKindOfMethod · 0.85
transferMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected