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

Function classMemberParentOf

ark/aot/usage.ts:1742–1752  ·  view source on GitHub ↗
(fn: Node)

Source from the content-addressed store, hash-verified

1740}
1741
1742const classMemberParentOf = (fn: Node): ClassMemberNode | undefined => {
1743 const [operand, parent] = operatorOf(fn)
1744 return (
1745 (parent?.type === "MethodDefinition" ||
1746 parent?.type === "PropertyDefinition" ||
1747 parent?.type === "AccessorProperty") &&
1748 parent.value === operand
1749 ) ?
1750 parent
1751 : undefined
1752}
1753
1754// e.g. `Component.prototype.forceUpdate = function () { ... }` in compiled dependencies
1755const es5ProtoMethodOf = (

Callers 1

computeSkippedFunctionFunction · 0.85

Calls 1

operatorOfFunction · 0.90

Tested by

no test coverage detected