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

Method passedMemberKindOf

ark/aot/graph.ts:4230–4248  ·  view source on GitHub ↗
(
		member: MemberExpression,
		module: SourceModule,
		kindOfKey: KindOfKey
	)

Source from the content-addressed store, hash-verified

4228 }
4229
4230 private passedMemberKindOf(
4231 member: MemberExpression,
4232 module: SourceModule,
4233 kindOfKey: KindOfKey
4234 ): KindBits | undefined {
4235 const object = unwrapChain(member.object)
4236 const binding = module.scopes.byId.get(object)?.binding
4237 if (binding?.kind !== "param" || binding.id.parent?.type === "RestElement")
4238 return
4239 const fn = binding.declaration as FunctionNode
4240 if (
4241 !runtimeParamsOf(fn).includes(binding.id as never) ||
4242 !this.callsOf(fn, module) ||
4243 binding.writes.length ||
4244 this.annotatedKindOf(binding.id, module, kindOfKey) !== undefined
4245 )
4246 return
4247 return kindOfKey(this.memberOf(binding, memberNameOf(member)), module)
4248 }
4249
4250 private passedMemberKindIn(
4251 param: Binding,

Callers 1

memberKindInMethod · 0.95

Calls 7

callsOfMethod · 0.95
annotatedKindOfMethod · 0.95
memberOfMethod · 0.95
unwrapChainFunction · 0.90
runtimeParamsOfFunction · 0.90
memberNameOfFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected