Commit Graph
8 Commits
Author SHA1 Message Date
Gijs WeteringsandFacebook GitHub Bot 67c1a806e6 Flow strictify xplat/js/react-native-github where possible (#41051)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41051

Strictifies flow to flow strict-local in files where doing that doesn't cause new flow errors.

Changelog: Internal

Reviewed By: yungsters

Differential Revision: D50369011

fbshipit-source-id: b4a5a26b839b7327a3178e6f5b35246dea365a38
2023-10-18 05:36:33 -07:00
Sam ZhouandFacebook GitHub Bot a53b4a0a2b Make React.Element fully opaque (#40883)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40883

Changelog: [Internal]

Reviewed By: mvitousek

Differential Revision: D50198503

fbshipit-source-id: 47537aeefbc6cbdee8954ea1052ff3a4b4392744
2023-10-12 13:48:22 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 621a7a8634 Extend expected Flow type of the global.performance object to match Performance API (#37917)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37917

# Changelog:
[Internal] -

The `global.performance` object now has all of the API defined according to the `Performance` API, so we can modify the local RN's flow definition override correspondingly.

Reviewed By: NickGerleman

Differential Revision: D46762326

fbshipit-source-id: 0d0b9ea271a91008e775d8cf59693c35758f71e5
2023-06-16 02:12:23 -07:00
Rubén NorteandFacebook GitHub Bot b46992de8a Type mock.contexts correctly in Jest (#37847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37847

Jest supports accessing the contexts used to call mock functions (the `this` value) but we're not typing that correctly in the definitions in React Native. This changes that.

Changelog: [internal]

Reviewed By: javache

Differential Revision: D46684043

fbshipit-source-id: ff121e0726748788591e7d061a39fde238c1ddbe
2023-06-13 16:36:04 -07:00
George ZaharievandFacebook GitHub Bot 2222b81ec2 Codemod long deprecated * type to any (#36634)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36634

X-link: https://github.com/facebook/metro/pull/957

The existential type `*` has been deprecated and just an alias for `any` since version 0.163. Codemod usage of it to `any`.
This helps with diff D44276187, which makes it always an error to use `*`.

Changelog: [internal]

Reviewed By: pieterv, SamChou19815

Differential Revision: D44358809

fbshipit-source-id: c6bb55430edd086958e16989c60bc2a0a131a3fe
2023-03-24 13:45:38 -07:00
Jiamin ZhuandFacebook GitHub Bot 6956d4f261 Remove dependency on use-sync-external-store
Summary:
Changelog: [Internal]

React Native requires React 18 which includes `useSyncExternalStore`, so we can remove the shim. It was only used in one place (`useColorScheme`).

Reviewed By: motiz88

Differential Revision: D44163914

fbshipit-source-id: 3a94466b3d5ae8aa43e9236acb8c92fbefd04180
2023-03-20 16:08:15 -07:00
Ian JonesandFacebook GitHub Bot 3b8459d66b xplat RN: fix flow for useSyncExternalStore
Summary:
They flow type for useSyncExternalStore is incorrect and in consistent with www.

v1.0.0 of use-sync-external-store has the third parameter:
https://github.com/facebook/react/blob/4997515b96eede5ab1ca622e0439a0707f8d4afd/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L37
This revision is 1.0.0:
https://github.com/facebook/react/blob/4997515b96eede5ab1ca622e0439a0707f8d4afd/packages/use-sync-external-store/package.json

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D44163470

fbshipit-source-id: 6582b20ba09f5840b444a1ca3d8fc12d6c783a00
2023-03-17 06:20:15 -07:00
Ruslan LesiutinandFacebook GitHub Bot 714b502b0c | RN Monorepo | Migrate to package (#36434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36434

Changelog: [Internal]

This is a squashed stack of 18 commits, starting from D43202126

allow-large-files

Reviewed By: cortinico

Differential Revision: D43977381

fbshipit-source-id: 0da552ddb85f2f61a0be0ef071915b35f3f8555c
2023-03-17 05:03:25 -07:00