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

Function withoutReplacedKeyword

ark/schema/node.ts:1892–1904  ·  view source on GitHub ↗
(
	existing: ArkEnv.meta | undefined,
	meta: ArkEnv.meta
)

Source from the content-addressed store, hash-verified

1890
1891// a description written over a keyword's phrase drops the keyword's identity
1892const withoutReplacedKeyword = (
1893 existing: ArkEnv.meta | undefined,
1894 meta: ArkEnv.meta
1895): ArkEnv.meta => {
1896 if (
1897 meta.keyword === undefined ||
1898 meta.keyword !== existing?.keyword ||
1899 meta.description === existing.description
1900 )
1901 return meta
1902 const { keyword: _, ...rest } = meta
1903 return rest
1904}
1905
1906// every alias a node reaches resolves before it's compiled
1907export const referencesThroughAliases = (

Callers 1

configureRefsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected