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

Method builtinPassedOf

ark/aot/graph.ts:4073–4088  ·  view source on GitHub ↗
(
		call: CallExpression | NewExpression,
		module: SourceModule,
		kindOfKey: KindOfKey
	)

Source from the content-addressed store, hash-verified

4071 // e.g. `Object.freeze(A)` or `new Proxy(A, {})`, as a builtin may return
4072 // what it's passed
4073 private builtinPassedOf(
4074 call: CallExpression | NewExpression,
4075 module: SourceModule,
4076 kindOfKey: KindOfKey
4077 ): KindBits {
4078 let root = unwrapChain(call.callee)
4079 while (root.type === "MemberExpression") root = unwrapChain(root.object)
4080 if (root.type !== "Identifier" || module.scopes.byId.get(root)?.binding)
4081 return 0
4082 return lostOf(
4083 call.arguments.reduce(
4084 (kind, arg) => kind | this.transfer(arg, module, kindOfKey),
4085 0
4086 )
4087 )
4088 }
4089
4090 private instanceKindOf(cls: Located, kindOfKey: KindOfKey): KindBits {
4091 let held = 0

Callers 2

calledKindOfMethod · 0.95
thisKindOfMethod · 0.95

Calls 5

transferMethod · 0.95
unwrapChainFunction · 0.90
lostOfFunction · 0.85
reduceMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected