(error: OneOrMany<T> | undefined)
| 68 | * into a list of errors. |
| 69 | */ |
| 70 | export function normalizeErrors<T>(error: OneOrMany<T> | undefined): readonly T[] { |
| 71 | if (error === undefined) { |
| 72 | return []; |
| 73 | } |
| 74 | if (Array.isArray(error)) { |
| 75 | return error as readonly T[]; |
| 76 | } |
| 77 | return [error as T]; |
| 78 | } |
no test coverage detected
searching dependent graphs…