mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
[Flight] Fix react-markup types for server references (#35634)
This commit is contained in:
1 parent
10680271fa
commit
8c34556ca8
2 files changed
+3
-3
No files matched your search
@@ -18,7 +18,7 @@ export * from 'react-client/src/ReactClientConsoleConfigPlain';
|
||||
export type ModuleLoading = null;
|
||||
export type ServerConsumerModuleMap = null;
|
||||
export opaque type ServerManifest = null;
|
||||
export opaque type ServerReferenceId = string;
|
||||
export type ServerReferenceId = string;
|
||||
export opaque type ClientReferenceMetadata = null;
|
||||
export opaque type ClientReference<T> = null; // eslint-disable-line no-unused-vars
|
||||
|
||||
@@ -43,7 +43,7 @@ export function resolveClientReference<T>(
|
||||
|
||||
export function resolveServerReference<T>(
|
||||
config: ServerManifest,
|
||||
id: mixed,
|
||||
id: ServerReferenceId,
|
||||
): ClientReference<T> {
|
||||
throw new Error(
|
||||
'renderToHTML should not have emitted Server References. This is a bug in React.',
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ function bindArgs(fn: any, args: any) {
|
||||
function loadServerReference<T>(
|
||||
bundlerConfig: ServerManifest,
|
||||
metaData: {
|
||||
id: string,
|
||||
id: ServerReferenceId,
|
||||
bound: null | Promise<Array<any>>,
|
||||
},
|
||||
): Promise<T> {
|
||||
|
||||
Reference in new issue
Block a user