( field: keyof T, fieldArrayKeysRef: FieldArrayKeysRef<T>, fieldArrayKeyCounterRef: CounterRef, )
| 80 | } |
| 81 | |
| 82 | function appendFieldArrayKey<T extends Record<string, unknown>>( |
| 83 | field: keyof T, |
| 84 | fieldArrayKeysRef: FieldArrayKeysRef<T>, |
| 85 | fieldArrayKeyCounterRef: CounterRef, |
| 86 | ): void { |
| 87 | const existing = [...(fieldArrayKeysRef.current[field] ?? [])]; |
| 88 | existing.push(nextFieldArrayKey(String(field), fieldArrayKeyCounterRef)); |
| 89 | fieldArrayKeysRef.current[field] = existing; |
| 90 | } |
| 91 | |
| 92 | function removeFieldArrayKey<T extends Record<string, unknown>>( |
| 93 | field: keyof T, |
no test coverage detected