/
ashipov
/
react
Обзор
Документация
Войти
/
ashipov
/
react
Код
Запросы
0
Задачи 2.0
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
packages/react-devtools-shared/src/hookSourceLocation.js
22 строки
675 B
Sebastian Markbåge
[DevTools] Use use() instead of throwing a Promise in Caches (#34033)
29 июл 2025, 10:45
Не верифицирован
29 июл 2025, 10:45
5d7e8b9
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and 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 type {HookSourceLocationKey} from 'react-devtools-shared/src/frontend/types'; import type {HookSource} from 'react-debug-tools/src/ReactDebugHooks'; export function getHookSourceLocationKey({ fileName, lineNumber, columnNumber, }: HookSource): HookSourceLocationKey { if (fileName == null || lineNumber == null || columnNumber == null) { throw Error('Hook source code location not found.'); } return `${fileName}:${lineNumber}:${columnNumber}`; }