export enum WarningTypes { WARNING = 'Warning' , DEPRECATION = 'DeprecationWarning' } export function warn ( warning ) { if ( warning . warned ) { return ; } warning . warned = true ; if ( typeof process !== 'undefined' && process . emitWarning ) { process . emitWarning ( warning . message , warning as any ) ; } else { console . warn ( warning . message ) ; } } export interface Warning { code : string ; type : WarningTypes ; message : string ; warned ? : boolean ; }