From e93f8722e96ab6b481bdd9648f8313814634c7de Mon Sep 17 00:00:00 2001 From: Josh Story Date: Fri, 25 Aug 2023 11:24:29 -0700 Subject: [PATCH] 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 --- .../src/forks/ReactFlightClientConfig.dom-legacy.js | 12 +++++++++++- .../src/forks/ReactFlightServerConfig.dom-legacy.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js b/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js index 212290670bd57..0ad00d57cdac4 100644 --- a/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js +++ b/packages/react-client/src/forks/ReactFlightClientConfig.dom-legacy.js @@ -8,6 +8,16 @@ */ export * from 'react-client/src/ReactFlightClientConfigBrowser'; -export * from 'react-server-dom-webpack/src/ReactFlightClientConfigWebpackBundler'; export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; + +export type Response = any; +export opaque type SSRManifest = mixed; +export opaque type ServerManifest = mixed; +export opaque type ServerReferenceId = string; +export opaque type ClientReferenceMetadata = mixed; +export opaque type ClientReference = mixed; // eslint-disable-line no-unused-vars +export const resolveClientReference: any = null; +export const resolveServerReference: any = null; +export const preloadModule: any = null; +export const requireModule: any = null; export const usedWithSSR = true; diff --git a/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js b/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js index 212bd8c89a66e..2e7273d82d696 100644 --- a/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js +++ b/packages/react-server/src/forks/ReactFlightServerConfig.dom-legacy.js @@ -9,7 +9,7 @@ import type {Request} from 'react-server/src/ReactFlightServer'; -export * from 'react-server-dom-webpack/src/ReactFlightServerConfigWebpackBundler'; +export * from '../ReactFlightServerConfigBundlerCustom'; export * from 'react-dom-bindings/src/server/ReactFlightServerConfigDOM'; export const supportsRequestStorage = false;