Remove deprecated methods from react-is (#28224)

These aren't being used anywhere and don't even correspond to real APIs.

DiffTrain build for [35b2c28178](https://github.com/facebook/react/commit/35b2c28178bf4f79898d11dce0bc2a7ce675f670)
This commit is contained in:
gaearon
2024-02-11 00:30:17 +00:00
parent e0e832eabb
commit 9adade5cc6
5 changed files with 1 additions and 79 deletions
+1 -1
View File
@@ -1 +1 @@
d8c1fa6b0b8da0512cb5acab9cd4f242451392f3
35b2c28178bf4f79898d11dce0bc2a7ce675f670
@@ -139,37 +139,6 @@ if (__DEV__) {
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
console["warn"](
"The ReactIs.isAsyncMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}
return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
console["warn"](
"The ReactIs.isConcurrentMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}
return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
@@ -223,8 +192,6 @@ if (__DEV__) {
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
@@ -139,37 +139,6 @@ if (__DEV__) {
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false;
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
function isAsyncMode(object) {
{
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
console["warn"](
"The ReactIs.isAsyncMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}
return false;
}
function isConcurrentMode(object) {
{
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
console["warn"](
"The ReactIs.isConcurrentMode() alias has been deprecated, " +
"and will be removed in React 18+."
);
}
}
return false;
}
function isContextConsumer(object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
}
@@ -223,8 +192,6 @@ if (__DEV__) {
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
@@ -74,12 +74,6 @@ exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};
@@ -74,12 +74,6 @@ exports.Profiler = REACT_PROFILER_TYPE;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
exports.isAsyncMode = function () {
return !1;
};
exports.isConcurrentMode = function () {
return !1;
};
exports.isContextConsumer = function (object) {
return typeOf(object) === REACT_CONTEXT_TYPE;
};