/
githubmirror
/
react-native
Обзор
Документация
Войти
/
githubmirror
/
react-native
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
private/react-native-fantom/runner/getHostPlatform.js
35 строк
804 B
Rubén Norte
Add an interactive REPL for Fantom (yarn fantom-cli) (#57387)
01 июл 2026, 18:18
01 июл 2026, 18:18
2bb7dbb
Код
Авторство
О чём код?
/** * 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 */ import type {HostPlatform} from '../src/Constants'; /** * Returns the host OS Fantom is running on (the Node process platform), mapped * to the `HostPlatform` values used by the Fantom runtime constants. */ export default function getHostPlatform(): HostPlatform { match (process.platform) { 'darwin' => { return 'macos'; } 'win32' => { return 'windows'; } 'linux' => { return 'linux'; } 'android' => { return 'android'; } _ => { throw new Error(`Unsupported platform: ${process.platform}`); } } }