(issue: {
readonly path: readonly PropertyKey[]
})
| 951 | * names no value, so it's kept, as in `prices[0]: Price must be positive` |
| 952 | */ |
| 953 | export 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 | } |
no test coverage detected