import type { MutableState } from 'final-form' export const setHasMultilineCounter = < FormValues = object, InitialFormValues = Partial >( args: [name: string, hasCounter: boolean], state: MutableState ) => { const [name, hasCounter] = args const field = state.fields[name] if (field) { field.data = { ...field.data, hasMultilineCounter: hasCounter } } }