( fieldError: FieldErrorValue | undefined, size: number, map: (currentErrors: Array<string | undefined>) => Array<string | undefined>, )
| 121 | } |
| 122 | |
| 123 | function remapFieldArrayErrors( |
| 124 | fieldError: FieldErrorValue | undefined, |
| 125 | size: number, |
| 126 | map: (currentErrors: Array<string | undefined>) => Array<string | undefined>, |
| 127 | ): FieldErrorValue { |
| 128 | if (typeof fieldError === "string") { |
| 129 | return fieldError; |
| 130 | } |
| 131 | return map(normalizeErrorArray(fieldError, size)); |
| 132 | } |
| 133 | |
| 134 | export function createFieldArrayApi<T extends Record<string, unknown>>(options: { |
| 135 | state: FormState<T>; |
no test coverage detected