import { ListFieldConfig, ObjectFieldConfig } from "../config"; import { ObjectState } from "./objectField"; import { FieldState } from "./valueField"; import { Rule } from "../rules"; /** Form state for list of children, i.e. `U` is a `Book` in a form with a `books: Book[]`. */ export interface ListFieldState extends FieldState { readonly rows: ReadonlyArray>; add(value: U, index?: number): void; remove(indexOrValue: number | U): void; } export declare function newListFieldState(parentCopy: T, parentInstance: T, parentState: () => ObjectState, key: K, rules: Rule[]>[], listConfig: ListFieldConfig, config: ObjectFieldConfig, strictOrder: boolean, maybeAutoSave: () => void, deepExhaustive: boolean): ListFieldState;