mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48703 ## Motivation Modernising the react-native codebase to allow for ingestion by modern Flow tooling ## This diff - Updates files in Libraries/Alert and Libraries/ActionSheetIOS to use `export` syntax - `export default` for qualified objects, many `export` statements for collections (determined by how it's imported) - Appends `.default` to requires of the changed files. - Updates Jest mocks of the related modules - Updates the public API snapshot (intented breaking change) Changelog: [General][Breaking] - Files inside `Libraries/Alert` and `Libraries/ActionSheetIOS` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax. Differential Revision: D68210738 fbshipit-source-id: a984034b165908f75485f2bad33fcccadd865494
24 lines
510 B
JavaScript
24 lines
510 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const Promise = require('promise/setimmediate/es6-extensions');
|
|
|
|
require('promise/setimmediate/finally');
|
|
|
|
if (__DEV__) {
|
|
require('promise/setimmediate/rejection-tracking').enable(
|
|
require('./promiseRejectionTrackingOptions').default,
|
|
);
|
|
}
|
|
|
|
export default Promise;
|