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

Function isUnboundGlobal

ark/aot/usage.ts:1146–1157  ·  view source on GitHub ↗
(
	node: Node,
	module: SourceModule,
	names: ReadonlySet<string>
)

Source from the content-addressed store, hash-verified

1144])
1145
1146const isUnboundGlobal = (
1147 node: Node,
1148 module: SourceModule,
1149 names: ReadonlySet<string>
1150): boolean => {
1151 const target = unwrapExpression(node)
1152 return (
1153 target.type === "Identifier" &&
1154 names.has(target.name) &&
1155 !module.scopes.byId.get(target)?.binding
1156 )
1157}
1158
1159const isGlobalHost = (node: Node, module: SourceModule): boolean => {
1160 const target = unwrapExpression(node)

Callers 2

isGlobalHostFunction · 0.85
isBuiltinCtorFunction · 0.85

Calls 3

unwrapExpressionFunction · 0.90
getMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected