/**
 * Type for the ignore func.
 */ export type IgnoreFunc < T > = ( err : any ) => T | never ; param errorClasses export function ignore < T > ( ... errorClasses ) { return function createIgnoreFn ( valToReturnOnCatch ) : IgnoreFunc < T > { return function ignoreImpl ( err ) { if ( errorClasses . some ( ( C ) => err instanceof C ) ) { return valToReturnOnCatch ; } throw err ; } ; } ; }