@samitouri / QOS-React / commits / 8c34556ca8

[Flight] Fix react-markup types for server references (#35634)

Sebastian "Sebbie" Silbermann committed Jan 26, 2026 at 21:13 UTC 8c34556ca8df0dab34bbaf68e0dd15cd4a5e3f7f
2 files changed +3 -3
packages/react-client/src/forks/ReactFlightClientConfig.markup.js
+2 -2
@@ -18,7 +18,7 @@ export * from 'react-client/src/ReactClientConsoleConfigPlain';
18 export type ModuleLoading = null;
19 export type ServerConsumerModuleMap = null;
20 export opaque type ServerManifest = null;
21 -export opaque type ServerReferenceId = string;
21 +export type ServerReferenceId = string;
22 export opaque type ClientReferenceMetadata = null;
23 export opaque type ClientReference<T> = null; // eslint-disable-line no-unused-vars
24
@@ -43,7 +43,7 @@ export function resolveClientReference<T>(
43
44 export function resolveServerReference<T>(
45 config: ServerManifest,
46 - id: mixed,
46 + id: ServerReferenceId,
47 ): ClientReference<T> {
48 throw new Error(
49 'renderToHTML should not have emitted Server References. This is a bug in React.',
packages/react-server/src/ReactFlightActionServer.js
+1 -1
@@ -46,7 +46,7 @@ function bindArgs(fn: any, args: any) {
46 function loadServerReference<T>(
47 bundlerConfig: ServerManifest,
48 metaData: {
49 - id: string,
49 + id: ServerReferenceId,
50 bound: null | Promise<Array<any>>,
51 },
52 ): Promise<T> {