mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
7fd08e1461
Summary: part of #24875. ## Changelog [General] [Added] - add TM spec for PlatformConstants Pull Request resolved: https://github.com/facebook/react-native/pull/24928 Reviewed By: RSNara Differential Revision: D15551340 Pulled By: fkgozali fbshipit-source-id: 9de15ff4cfe717f963332868bd873d5147a37506
33 lines
789 B
JavaScript
33 lines
789 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its 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
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {TurboModule} from '../TurboModule/RCTExport';
|
|
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
|
|
|
|
export interface Spec extends TurboModule {
|
|
+getConstants: () => {|
|
|
isTesting: boolean,
|
|
reactNativeVersion: {|
|
|
major: number,
|
|
minor: number,
|
|
patch: number,
|
|
prerelease: ?number,
|
|
|},
|
|
forceTouchAvailable: boolean,
|
|
osVersion: string,
|
|
systemName: string,
|
|
interfaceIdiom: string,
|
|
|};
|
|
}
|
|
|
|
export default TurboModuleRegistry.getEnforcing<Spec>('PlatformConstants');
|