Skip to content

Commit 81b56f5

Browse files
Better Approach
1 parent a2eb3b2 commit 81b56f5

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

packages/react-native/Libraries/Utilities/Platform.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ interface PlatformWindowsOSStatic extends PlatformStatic {
9494

9595
interface PlatformWebStatic extends PlatformStatic {
9696
OS: 'web';
97+
Version: string;
9798
}
9899

99100
export type Platform =

packages/react-native/Libraries/Utilities/PlatformTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ type MacOSPlatform = {
162162
type WebPlatform = {
163163
OS: 'web',
164164
// $FlowFixMe[unsafe-getters-setters]
165-
get Version(): void,
165+
get Version(): string,
166166
// $FlowFixMe[unsafe-getters-setters]
167167
get constants(): {
168168
reactNativeVersion: {

packages/react-native/ReactNativeApi.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<1f77cd57f1bd57ae59c61a1cc6a58d81>>
7+
* @generated SignedSource<<9e1f5e0432c20ddc070ec9dced982591>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -5860,7 +5860,7 @@ declare type WebPlatform = {
58605860
get isDisableAnimations(): boolean
58615861
get isTesting(): boolean
58625862
get isTV(): boolean
5863-
get Version(): void
5863+
get Version(): string
58645864
}
58655865
declare type WindowsPlatform = {
58665866
OS: "windows"

0 commit comments

Comments
 (0)