import type * as d from '../../declarations' ; import { caughtErrors } from './testing-constants' ; let customError ; const defaultConsoleError = ( e ) => { caughtErrors . push ( e ) ; } ; export const consoleError = ( e , el ? ) => ( customError || defaultConsoleError ) ( e , el ) ; export const consoleDevError = ( ... e ) => { caughtErrors . push ( new Error ( e . join ( ', ' ) ) ) ; } ; export const consoleDevWarn = ( ... args ) => { const params = args . filter ( ( a ) => typeof a === 'string' || typeof a === 'number' || typeof a === 'boolean' ) ; console . warn . apply ( console , params ) ; } ; export const consoleDevInfo = ( ... _ ) => { } ; export const setErrorHandler = ( handler ) => ( customError = handler ) ;