Skip to content

Commit 6f9ec4b

Browse files
gnoffAndyPengc12
authored andcommitted
[Flight] use opaque config for flight in dom-legacy renderer (facebook#27313)
`dom-legacy` does not make sense for Flight. we could still type check the files but it adds maintenance burden in the inlinedHostConfigs whenever things change there. Going to make these configs opaque mixed types to quiet flow since no entrypoints use the flight code
1 parent e5ca798 commit 6f9ec4b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
*/
99

1010
export * from 'react-client/src/ReactFlightClientConfigBrowser';
11-
export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler';
1211
export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
12+
13+
export type Response = any;
14+
export opaque type SSRManifest = mixed;
15+
export opaque type ServerManifest = mixed;
16+
export opaque type ServerReferenceId = string;
17+
export opaque type ClientReferenceMetadata = mixed;
18+
export opaque type ClientReference<T> = mixed; // eslint-disable-line no-unused-vars
19+
export const resolveClientReference: any = null;
20+
export const resolveServerReference: any = null;
21+
export const preloadModule: any = null;
22+
export const requireModule: any = null;
1323
export const usedWithSSR = true;

packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import type {Request} from 'react-server/src/ReactFlightServer';
1111

12-
export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler';
12+
export * from '../ReactFlightServerConfigBundlerCustom';
1313
export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM';
1414

1515
export const supportsRequestStorage = false;

0 commit comments

Comments
 (0)