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

Function staticMemberKeyOf

ark/aot/usage.ts:1395–1406  ·  view source on GitHub ↗
(
	member: Extract<Node, { type: "MemberExpression" }>,
	module: SourceModule
)

Source from the content-addressed store, hash-verified

1393}
1394
1395const staticMemberKeyOf = (
1396 member: Extract<Node, { type: "MemberExpression" }>,
1397 module: SourceModule
1398): string | undefined => {
1399 // checked before memberNameOf, which names `this.#m` "m", so the key matches
1400 // classMemberKeyOf's "#m"
1401 if (!member.computed && member.property.type === "PrivateIdentifier")
1402 return `#${member.property.name}`
1403 const name = memberNameOf(member)
1404 if (typeof name === "string" || typeof name === "number") return String(name)
1405 return member.computed ? constantKeyOf(member.property, module) : undefined
1406}
1407
1408const classMemberKeyOf = (
1409 member: ClassMemberNode,

Callers 5

buildThisReadsContextFunction · 0.85
es5ProtoMethodOfFunction · 0.85
instanceExposesComputedFunction · 0.85
classBindingExposesFunction · 0.85
ctorExposesPrototypeFunction · 0.85

Calls 3

memberNameOfFunction · 0.90
StringInterface · 0.85
constantKeyOfFunction · 0.85

Tested by

no test coverage detected