(controlValidators: V | V[] | null, dirValidator: V)
| 716 | * validators as an array. |
| 717 | */ |
| 718 | export function mergeValidators<V>(controlValidators: V | V[] | null, dirValidator: V): V[] { |
| 719 | if (controlValidators === null) return [dirValidator]; |
| 720 | return Array.isArray(controlValidators) |
| 721 | ? [...controlValidators, dirValidator] |
| 722 | : [controlValidators, dirValidator]; |
| 723 | } |
| 724 | |
| 725 | /** |
| 726 | * Retrieves the list of raw synchronous validators attached to a given control. |
no test coverage detected
searching dependent graphs…