[compiler] Don't leak global `__DEV__` type (#34551)
Sebastian "Sebbie" Silbermann committed
Sep 22, 2025 at 16:51 UTC
07e4974bad015a44c2da488c80a494318007e58d
2 files changed
+2
compiler/packages/babel-plugin-react-compiler/src/index.ts
+1
@@ -51,6 +51,7 @@ export {
51
} from './ReactiveScopes';
52
export {parseConfigPragmaForTests} from './Utils/TestUtils';
53
declare global {
54
+ // @internal
55
let __DEV__: boolean | null | undefined;
56
}
57
compiler/packages/babel-plugin-react-compiler/tsconfig.json
+1
@@ -10,6 +10,7 @@
10
"importsNotUsedAsValues": "remove",
11
"noUncheckedIndexedAccess": false,
12
"noUnusedParameters": false,
13
+ "stripInternal": true,
14
"useUnknownInCatchVariables": true,
15
"target": "ES2015",
16
// ideally turn off only during dev, or on a per-file basis