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

Function labeledPathOf

ark/schema/shared/issues.ts:953–963  ·  view source on GitHub ↗
(issue: {
	readonly path: readonly PropertyKey[]
})

Source from the content-addressed store, hash-verified

951 * names no value, so it's kept, as in `prices[0]: Price must be positive`
952 */
953export const labeledPathOf = (issue: {
954 readonly path: readonly PropertyKey[]
955}): string => {
956 const { path } = issue
957 const prefix = pathOf(
958 typeof path[path.length - 1] === "string" ?
959 { path: path.slice(0, -1) }
960 : issue
961 )
962 return prefix && prefix + ": "
963}

Callers 4

writeListedFunction · 0.90
groupByPathFunction · 0.90
errorLineOfFunction · 0.90
issueLineOfFunction · 0.70

Calls 1

pathOfFunction · 0.70

Tested by

no test coverage detected