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

Method sameMorphs

ark/schema/roots/morph.ts:280–291  ·  view source on GitHub ↗

Check if the morphs of r are equal to those of this node

(r: MorphNode)

Source from the content-addressed store, hash-verified

278
279 /** Check if the morphs of r are equal to those of this node */
280 override sameMorphs(r: MorphNode): boolean {
281 return (
282 this.inverse === r.inverse &&
283 arrayEquals(this.piped, r.piped, {
284 isEqual: (lMorph, rMorph) =>
285 lMorph === rMorph ||
286 (hasArkKind(lMorph, "root") &&
287 hasArkKind(rMorph, "root") &&
288 lMorph.equals(rMorph))
289 })
290 )
291 }
292}
293
294export const Morph = {

Callers 6

mergeMorphBranchesFunction · 0.80
splitMorphBranchFunction · 0.80
assertEqualMorphsFunction · 0.80
isSubsumedFunction · 0.80
flatMorphsAreEqualFunction · 0.80
joinedOfFunction · 0.80

Calls 3

arrayEqualsFunction · 0.90
hasArkKindFunction · 0.90
equalsMethod · 0.65

Tested by

no test coverage detected