Aller au contenu principal

warning

Callable

  • warning(condition: boolean, message?: null | string): void

  • Assert that condition is truthy, else print a message using console.warn

    In production environment, message parameter could be stripped from source in order to reduce file size

    @example
    warning(true, 'this should be true');// pass
    warning(false, 'this should be true');// console.warn('Warning: this should be true')