/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native-compatibility-check/src/__tests__/utilities/getTestSchema.js
26 строк
649 B
Tim Yung
RN: Sort Pragmas in Headers (#51554)
23 май 2025, 07:18
23 май 2025, 07:18
1977dd6
Код
Авторство
О чём код?
/** * 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 {SchemaType} from '@react-native/codegen/src/CodegenSchema'; import {FlowParser} from '@react-native/codegen/src/parsers/flow/parser'; import path from 'path'; const flowParser = new FlowParser(); export function getTestSchema( ...filenameComponents: Array<string> ): SchemaType { const filename = path.join(...filenameComponents); const schema = flowParser.parseFile(filename); return schema; }