import { Actions , MarkAsUntouchedAction } from '../../actions' ; import { FormControlState , FormControlValueTypes } from '../../state' ; export function markAsUntouchedReducer < TValue extends FormControlValueTypes > ( state , action ) { if ( action . type !== MarkAsUntouchedAction . TYPE ) { return state ; } if ( state . isUntouched ) { return state ; } return { ... state , isTouched : false , isUntouched : true , } ; }