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

Function destructuresPrototype

ark/aot/usage.ts:1254–1261  ·  view source on GitHub ↗
(pattern: Node)

Source from the content-addressed store, hash-verified

1252}
1253
1254const destructuresPrototype = (pattern: Node): boolean =>
1255 pattern.type === "ObjectPattern" &&
1256 pattern.properties.some(
1257 prop =>
1258 prop.type === "RestElement" ||
1259 propertyKeyOf(prop) === "prototype" ||
1260 propertyKeyOf(prop) === undefined
1261 )
1262
1263// e.g. `Array.prototype.first = fn`, `globalThis.Array.prototype.first = fn`,
1264// `Object.getPrototypeOf([]).first = fn`, `[].__proto__.first = fn`, or

Callers 1

isBuiltinPrototypePatchFunction · 0.85

Calls 1

propertyKeyOfFunction · 0.90

Tested by

no test coverage detected