( errors: ReadableErrors<issue> )
| 36 | * Each path's errors, by the string of the path. |
| 37 | */ |
| 38 | export const flatByPath = <issue extends PathedIssue>( |
| 39 | errors: ReadableErrors<issue> |
| 40 | ): Record<string, issue[]> => { |
| 41 | const result: Record<string, issue[]> = {} |
| 42 | for (const error of errors.issues) |
| 43 | addEntry(result, propStringOf(error), error) |
| 44 | return result |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Each path's messages, by the string of the path. |
no test coverage detected