ngrx-forms
Version:
Proper integration of forms in Angular 4 applications using ngrx
23 lines (22 loc) • 1.18 kB
TypeScript
import { AbstractControlState, FormArrayState, FormControlState, FormControlValueTypes, FormGroupState, FormState, KeyValue } from '../state';
/**
* This update function takes a form control state and marks it as pristine,
* untouched, and unsubmitted.
*/
export declare function reset<TValue extends FormControlValueTypes>(state: FormControlState<TValue>): FormControlState<TValue>;
/**
* This update function takes a form array state and marks it and all of its
* children as pristine, untouched, and unsubmitted.
*/
export declare function reset<TValue>(state: FormArrayState<TValue>): FormArrayState<TValue>;
/**
* This update function takes a form group state and marks it and all of its
* children as pristine, untouched, and unsubmitted.
*/
export declare function reset<TValue extends KeyValue>(state: FormGroupState<TValue>): FormGroupState<TValue>;
/**
* This update function takes a state and marks it as pristine, untouched, and
* unsubmitted. For groups and arrays this also marks all children as pristine,
* untouched, and unsubmitted.
*/
export declare function reset<TValue>(state: AbstractControlState<TValue>): FormState<TValue>;