/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native-codegen/src/parsers/flow/utils.js
24 строки
581 B
Moti Zilberman
Enable lint/sort-imports everywhere (#41334)
06 ноя 2023, 23:59
06 ноя 2023, 23:59
d6e0bc7
Код
Авторство
О чём код?
/** * 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 * @format */ 'use strict'; import type {ASTNode, TypeDeclarationMap} from '../utils'; function getValueFromTypes(value: ASTNode, types: TypeDeclarationMap): ASTNode { if (value.type === 'GenericTypeAnnotation' && types[value.id.name]) { return getValueFromTypes(types[value.id.name].right, types); } return value; } module.exports = { getValueFromTypes, };