NativePlatformConstantsAndroid.js 875 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @flow strict-local
  8. * @format
  9. */
  10. 'use strict';
  11. import type {TurboModule} from '../TurboModule/RCTExport';
  12. import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
  13. export interface Spec extends TurboModule {
  14. +getConstants: () => {|
  15. isTesting: boolean,
  16. reactNativeVersion: {|
  17. major: number,
  18. minor: number,
  19. patch: number,
  20. prerelease: ?number,
  21. |},
  22. Version: number,
  23. Release: string,
  24. Serial: string,
  25. Fingerprint: string,
  26. Model: string,
  27. ServerHost?: string,
  28. uiMode: string,
  29. |};
  30. +getAndroidID: () => string;
  31. }
  32. export default (TurboModuleRegistry.getEnforcing<Spec>(
  33. 'PlatformConstants',
  34. ): Spec);