mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
018d5cf985
Summary: Changelog: [General][Breaking] - Remove nonstandard Promise.prototype.done `Promise.prototype.done` has been deprecated since D34222667 (https://github.com/facebook/react-native/commit/35800962c16a33eb8e9ff1adfd428cf00bb670d3). Here we remove it from React Native's default Promise polyfill. Users should switch to using standard Promise features like `.then()`, or install their own custom polyfills for advanced use cases. Reviewed By: kodafb Differential Revision: D36001688 fbshipit-source-id: 37f452000c16279280ef6a50b2ce616776377c4e
24 lines
512 B
JavaScript
24 lines
512 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,
|
|
);
|
|
}
|
|
|
|
module.exports = Promise;
|