export function printUnexpectedPayloadWarning ( type , state , actualType = 'undefined' ) { console . warn ( `Did not expect action payload to be ${ actualType } for action ` + `${ type }. ` + `Returning current state.` , state ) ; } export const delay = ( timeout , resolveValue = undefined ) => { return new Promise ( ( resolve ) => { setTimeout ( resolve . bind ( null , resolveValue ) , timeout ) ; } ) ; } ;