/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/scripts/featureflags/templates/android/ReactNativeFeatureFlagsProvider.kt-template.js
47 строк
1 KB
Nicola Corti
Kotlin to 1.9.22 (#42927)
09 фев 2024, 21:58
09 фев 2024, 21:58
3c2b2b1
Код
Авторство
О чём код?
/** * 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 */ import type {FeatureFlagDefinitions} from '../../types'; import { DO_NOT_MODIFY_COMMENT, getKotlinTypeFromDefaultValue, } from '../../utils'; import signedsource from 'signedsource'; export default function (definitions: FeatureFlagDefinitions): string { return signedsource.signFile(`/* * 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. * * ${signedsource.getSigningToken()} */ ${DO_NOT_MODIFY_COMMENT} package com.facebook.react.internal.featureflags import com.facebook.proguard.annotations.DoNotStrip @DoNotStrip public interface ReactNativeFeatureFlagsProvider { ${Object.entries(definitions.common) .map( ([flagName, flagConfig]) => ` @DoNotStrip public fun ${flagName}(): ${getKotlinTypeFromDefaultValue( flagConfig.defaultValue, )}`, ) .join('\n\n')} } `); }