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

Function hasInferType

ark/aot/graph.ts:6548–6558  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

6546 "node" in context ? contextNodeOf(context.parent) : context
6547
6548const hasInferType = (node: Node): boolean => {
6549 if (node.type === "TSInferType") return true
6550 for (const k of visitorKeys[node.type]) {
6551 const child = (node as never)[k] as Node | (Node | null)[] | null
6552 if (!child) continue
6553 if (Array.isArray(child)) {
6554 for (const item of child) if (item && hasInferType(item)) return true
6555 } else if (hasInferType(child)) return true
6556 }
6557 return false
6558}
6559
6560const typeParameterOf = (
6561 context: TypeContext | null | undefined,

Callers 1

typeKindOfMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected