/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react/src/ReactPostpone.js
23 строки
606 B
Sebastian Markbåge
Add Postpone API (#27238)
17 авг 2023, 20:26
Не верифицирован
17 авг 2023, 20:26
ac1a16c
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, 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. * * @flow */ import {REACT_POSTPONE_TYPE} from 'shared/ReactSymbols'; declare class Postpone extends Error { $$typeof: symbol; } export type {Postpone}; export function postpone(reason: string): void { // eslint-disable-next-line react-internal/prod-error-codes const postponeInstance: Postpone = (new Error(reason): any); postponeInstance.$$typeof = REACT_POSTPONE_TYPE; throw postponeInstance; }