Files
react-native/Libraries/Promise.js
T
Moti Zilberman 018d5cf985 Remove nonstandard Promise.prototype.done implementation
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
2022-05-05 03:55:10 -07:00

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;