UNPKG

@modular-forms/react

Version:

The modular and type-safe form library for React

13 lines (12 loc) 424 B
import type { FieldValue, Maybe } from '../types'; /** * Returns whether the field is dirty. * * @param startValue The start value. * @param currentValue The current value. * * TODO: Should we pass field as paramater instead of values? * * @returns Whether is dirty. */ export declare function isFieldDirty<TFieldValue extends FieldValue>(startValue: Maybe<TFieldValue>, currentValue: Maybe<TFieldValue>): boolean;