[Flight] Warn if this argument is passed to .bind of a Server Reference (#28380)

This won't ever be serialized and is likely just a mistake.

This should be covered by the "use server" compiler since it ensures
that something that accepts a "this" won't be allowed to compile and if
it doesn't accept it, TypeScript should ideally forbid it to be passed.

So maybe this is unnecessary.

DiffTrain build for commit https://github.com/facebook/react/commit/65a0e2b25ec4642f83c32d7599b5252c3955a60b.
This commit is contained in:
sebmarkbage
2024-02-19 16:54:47 +00:00
parent 953baa509d
commit ff7932da18
7 changed files with 9 additions and 9 deletions
@@ -25697,7 +25697,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-canary-9444c51c7-20240219";
var ReactVersion = "18.3.0-canary-65a0e2b25-20240219";
// Might add PROFILE later.
@@ -9179,7 +9179,7 @@ var devToolsConfig$jscomp$inline_1018 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-9444c51c7-20240219",
version: "18.3.0-canary-65a0e2b25-20240219",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1199 = {
@@ -9210,7 +9210,7 @@ var internals$jscomp$inline_1199 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-9444c51c7-20240219"
reconcilerVersion: "18.3.0-canary-65a0e2b25-20240219"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1200 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9607,7 +9607,7 @@ var devToolsConfig$jscomp$inline_1060 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-9444c51c7-20240219",
version: "18.3.0-canary-65a0e2b25-20240219",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1240 = {
@@ -9638,7 +9638,7 @@ var internals$jscomp$inline_1240 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-9444c51c7-20240219"
reconcilerVersion: "18.3.0-canary-65a0e2b25-20240219"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1241 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-canary-9444c51c7-20240219";
var ReactVersion = "18.3.0-canary-65a0e2b25-20240219";
// ATTENTION
// When adding new symbols to this file,
@@ -590,4 +590,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-9444c51c7-20240219";
exports.version = "18.3.0-canary-65a0e2b25-20240219";
@@ -586,7 +586,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-9444c51c7-20240219";
exports.version = "18.3.0-canary-65a0e2b25-20240219";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
9444c51c7e44936c24e1f44db905cfd45c51cff3
65a0e2b25ec4642f83c32d7599b5252c3955a60b