/
githubmirror
/
redux
Обзор
Документация
Войти
/
githubmirror
/
redux
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/utils/warning.ts
18 строк
589 B
Jed Mao
fix TSDoc comments (#3560)
05 сен 2019, 21:09
05 сен 2019, 21:09
9e71b4c
Код
Авторство
О чём код?
/** * Prints a warning in the console if it exists. * * @param message The warning message. */ export default function warning(message: string): void { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message) } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message) } catch (e) {} // eslint-disable-line no-empty }