export enum ERROR_LEVELS { ERROR = 'error' , WARNING = 'warning' } export const LEVEL_ERROR = ERROR_LEVELS . ERROR ; export const LEVEL_WARNING = ERROR_LEVELS . WARNING ; export declare type ErrorHandler = ( error : Error , level : ERROR_LEVELS , origin : string , context ? : object ) => void ; param error param level private export const _defaultErrorHandler = ( error , level ) : void => { if ( level === LEVEL_ERROR ) { console . error ( error ) ; } else if ( level === LEVEL_WARNING ) { console . warn ( error ) ; } else { console . error ( error ) ; } } ;