Delete interface.js (Flow), relocate __DEV__ global (#57275)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57275

`interface.js` was a legacy, Flow-only entry point whose sole content was a bare `declare var __DEV__: boolean;` global, registered as a Flow `[libs]` file.

Relocate into `flow/globals.js`, allowing us to drop this from the package `"files"` (and `"exports"`) list.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D109018822

fbshipit-source-id: 5507ff4c7c19a45980685e8691bccc998bd62107
This commit is contained in:
Alex Hunt authored and meta-codesync[bot] committed 2026-06-18 09:38:26 -07:00
1 parent e1b0c77507
commit 2816d2472c
4 files changed
+6 -23

No files matched your search

-1
View File
@@ -39,7 +39,6 @@
[libs]
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
[options]
+6
View File
@@ -86,3 +86,9 @@ declare var global: {
// Undeclared properties are implicitly `any`.
[string | symbol]: any,
};
// Declared as a bare global so unqualified `__DEV__` references type-check as
// `boolean`. The suppression is a no-op in this checkout but avoids a duplicate
// declaration where `__DEV__` is also declared by another Flow libdef.
// $FlowFixMe[libdef-override]
declare var __DEV__: boolean;
-21
View File
@@ -1,21 +0,0 @@
/**
* 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.
*
* @flow strict
* @format
*/
'use strict';
// NOTE: Hmm... I don't think declaring variables within this module actually
// accomplishes anything besides documenting that these globals are expected to
// exist. So I think the correct "fix" to this lint warning is to delete this
// entire file. But in lieu of doing that... no harm for now in keeping this
// file around, even if it is only for documentation purposes. ¯\_(ツ)_/¯
/* eslint-disable no-unused-vars */
declare var __DEV__: boolean;
-1
View File
@@ -80,7 +80,6 @@
"gradle/libs.versions.toml",
"index.js",
"index.js.flow",
"interface.js",
"jest-preset.js",
"Libraries",
"LICENSE",