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

Method methodOf

ark/aot/graph.ts:6197–6207  ·  view source on GitHub ↗
(
		callee: Node,
		module: SourceModule,
		kindOfKey: KindOfKey
	)

Source from the content-addressed store, hash-verified

6195 }
6196
6197 private methodOf(
6198 callee: Node,
6199 module: SourceModule,
6200 kindOfKey: KindOfKey
6201 ): [FunctionNode, SourceModule] | undefined {
6202 if (callee.type !== "MemberExpression") return
6203 const literal = this.literalOf(callee.object, module, kindOfKey)
6204 const value = literal && this.valueIn(literal, memberNameOf(callee))
6205 const fn = value && namedFunctionOf(unwrapChain(value.node), value.module)
6206 return fn && isFunctionNode(fn) ? [fn, value.module] : undefined
6207 }
6208
6209 private boundFunctionOf(
6210 binding: Binding,

Callers 2

calledKindOfMethod · 0.95
mayWriteFromMethod · 0.95

Calls 6

literalOfMethod · 0.95
valueInMethod · 0.95
unwrapChainFunction · 0.90
namedFunctionOfFunction · 0.85
isFunctionNodeFunction · 0.85
memberNameOfFunction · 0.70

Tested by

no test coverage detected