/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
v16.9.0
packages/shared/ReactError.js
18 строк
513 B
Moti Zilberman
Construct Error at invariant call site for clearer stack traces (#15877)
18 июн 2019, 21:38
18 июн 2019, 21:38
9845437
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ // Do not require this module directly! Use normal `invariant` calls with // template literal strings. The messages will be converted to ReactError during // build, and in production they will be minified. function ReactError(error) { error.name = 'Invariant Violation'; return error; } export default ReactError;