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

Function writeOf

ark/aot/graph.ts:6529–6541  ·  view source on GitHub ↗
(target: Node)

Source from the content-addressed store, hash-verified

6527}
6528
6529export const writeOf = (target: Node): Node => {
6530 const parent = target.parent!
6531 switch (parent.type) {
6532 case "AssignmentExpression":
6533 case "UpdateExpression":
6534 case "UnaryExpression":
6535 return parent
6536 case "ForInStatement":
6537 case "ForOfStatement":
6538 return target
6539 }
6540 return writeOf(parent)
6541}
6542
6543type TypeContext = Node | { node: Node; parent: TypeContext }
6544

Callers 4

writeIntoMethod · 0.90
writesThroughMethod · 0.85
writeFromMethod · 0.85
mayWriteFromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected