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

Function isObjectWrite

ark/aot/graph.ts:6518–6527  ·  view source on GitHub ↗
(callee: Node, module: SourceModule)

Source from the content-addressed store, hash-verified

6516}
6517
6518export const isObjectWrite = (callee: Node, module: SourceModule): boolean => {
6519 callee = unwrapExpression(callee)
6520 return (
6521 callee.type === "MemberExpression" &&
6522 !callee.computed &&
6523 callee.object.type === "Identifier" &&
6524 !module.scopes.byId.get(callee.object)?.binding &&
6525 !!writersByGlobal[callee.object.name]?.includes(callee.property.name)
6526 )
6527}
6528
6529export const writeOf = (target: Node): Node => {
6530 const parent = target.parent!

Callers 3

writeIntoMethod · 0.90
writeFromMethod · 0.85
mayWriteFromMethod · 0.85

Calls 2

unwrapExpressionFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected