MCPcopy Index your code
hub / github.com/angular/angular / normalizeErrors

Function normalizeErrors

packages/forms/signals/src/api/rules/validation/util.ts:70–78  ·  view source on GitHub ↗
(error: OneOrMany<T> | undefined)

Source from the content-addressed store, hash-verified

68 * into a list of errors.
69 */
70export 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}

Callers 1

setRawValueFunction · 0.90

Calls 1

isArrayMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…