/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
private/react-native-fantom/src/Constants.js
41 строка
1 KB
Rubén Norte
Add Fantom.getHostPlatform() to expose test runner host OS (#56990)
29 май 2026, 18:02
29 май 2026, 18:02
9199b39
Код
Авторство
О чём код?
/** * 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 strict-local * @format */ export type HostPlatform = 'android' | 'windows' | 'macos' | 'linux'; export type FantomRuntimeConstants = Readonly<{ isOSS: boolean, isRunningFromCI: boolean, runBenchmarks: boolean, fantomConfigSummary: string, jsHeapSnapshotOutputPathTemplate: string, jsHeapSnapshotOutputPathTemplateToken: string, jsTraceOutputPath: ?string, hostPlatform: HostPlatform, }>; let constants: FantomRuntimeConstants = { isOSS: false, isRunningFromCI: false, runBenchmarks: false, fantomConfigSummary: '', jsHeapSnapshotOutputPathTemplate: '', jsHeapSnapshotOutputPathTemplateToken: '', jsTraceOutputPath: null, hostPlatform: 'linux', }; export function getConstants(): FantomRuntimeConstants { return constants; } export function setConstants(newConstants: FantomRuntimeConstants): void { constants = newConstants; }