Add Flow to @react-native/polyfills entry point (#44477)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44477

Changelog: [Internal]

TSIA

Reviewed By: huntie

Differential Revision: D57091620

fbshipit-source-id: 54fd105069ba0a34b9ab5bd12295e4e9641492a3
This commit is contained in:
Moti Zilberman 2024-05-08 06:46:15 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 01cbb173aa
Коммит de1d605253
3 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -58,7 +58,6 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
getModulesRunBeforeMainModule: () => [ getModulesRunBeforeMainModule: () => [
require.resolve('react-native/Libraries/Core/InitializeCore'), require.resolve('react-native/Libraries/Core/InitializeCore'),
], ],
// $FlowFixMe[untyped-import]
getPolyfills: () => require('@react-native/js-polyfills')(), getPolyfills: () => require('@react-native/js-polyfills')(),
isThirdPartyModule({path: modulePath}: $ReadOnly<{path: string, ...}>) { isThirdPartyModule({path: modulePath}: $ReadOnly<{path: string, ...}>) {
return ( return (

Просмотреть файл

@ -4,12 +4,13 @@
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
* *
* @flow strict-local
* @format * @format
*/ */
'use strict'; 'use strict';
module.exports = () => [ module.exports = () /*: Array<string> */ => [
require.resolve('./console.js'), require.resolve('./console.js'),
require.resolve('./error-guard.js'), require.resolve('./error-guard.js'),
]; ];

1
packages/react-native/rn-get-polyfills.js поставляемый
Просмотреть файл

@ -4,6 +4,7 @@
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
* *
* @flow strict-local
* @format * @format
*/ */