import { CallClientState , CallErrorTarget } from '../CallClientState' ; import { CallStateModifier } from '../StatefulCallClient' ; /**
 * Creates a new  CallStateModifier that clears the latest error for specific targets.
 *
 * Intended to be used with  StatefulCallClient . modifyState .
 *
 *  param targets export const newClearCallErrorsModifier = ( targets ) : CallStateModifier => { return ( draft ) : void => { for ( const target of targets ) { if ( draft . latestErrors [ target ] !== undefined ) { delete draft . latestErrors [ target ] ; } } } ; } ;