|
7 | 7 | * @flow
|
8 | 8 | */
|
9 | 9 |
|
10 |
| -export * from 'react-client/src/ReactFlightClientStreamConfigWeb'; |
11 |
| -export * from 'react-client/src/ReactClientConsoleConfigBrowser'; |
12 |
| -export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM'; |
13 |
| - |
14 |
| -export type Response = any; |
15 |
| -export opaque type ModuleLoading = mixed; |
16 |
| -export opaque type SSRModuleMap = mixed; |
17 |
| -export opaque type ServerManifest = mixed; |
| 10 | +import type {Thenable} from 'shared/ReactTypes'; |
| 11 | + |
| 12 | +export * from 'react-html/src/ReactHTMLLegacyClientStreamConfig.js'; |
| 13 | +export * from 'react-client/src/ReactClientConsoleConfigPlain'; |
| 14 | + |
| 15 | +export type ModuleLoading = null; |
| 16 | +export type SSRModuleMap = null; |
| 17 | +export opaque type ServerManifest = null; |
18 | 18 | export opaque type ServerReferenceId = string;
|
19 |
| -export opaque type ClientReferenceMetadata = mixed; |
20 |
| -export opaque type ClientReference<T> = mixed; // eslint-disable-line no-unused-vars |
21 |
| -export const resolveClientReference: any = null; |
22 |
| -export const resolveServerReference: any = null; |
23 |
| -export const preloadModule: any = null; |
24 |
| -export const requireModule: any = null; |
25 |
| -export const prepareDestinationForModule: any = null; |
| 19 | +export opaque type ClientReferenceMetadata = null; |
| 20 | +export opaque type ClientReference<T> = null; // eslint-disable-line no-unused-vars |
| 21 | + |
| 22 | +export function prepareDestinationForModule( |
| 23 | + moduleLoading: ModuleLoading, |
| 24 | + nonce: ?string, |
| 25 | + metadata: ClientReferenceMetadata, |
| 26 | +) { |
| 27 | + throw new Error( |
| 28 | + 'renderToMarkup should not have emitted Client References. This is a bug in React.', |
| 29 | + ); |
| 30 | +} |
| 31 | + |
| 32 | +export function resolveClientReference<T>( |
| 33 | + bundlerConfig: SSRModuleMap, |
| 34 | + metadata: ClientReferenceMetadata, |
| 35 | +): ClientReference<T> { |
| 36 | + throw new Error( |
| 37 | + 'renderToMarkup should not have emitted Client References. This is a bug in React.', |
| 38 | + ); |
| 39 | +} |
| 40 | + |
| 41 | +export function resolveServerReference<T>( |
| 42 | + config: ServerManifest, |
| 43 | + id: ServerReferenceId, |
| 44 | +): ClientReference<T> { |
| 45 | + throw new Error( |
| 46 | + 'renderToMarkup should not have emitted Server References. This is a bug in React.', |
| 47 | + ); |
| 48 | +} |
| 49 | + |
| 50 | +export function preloadModule<T>( |
| 51 | + metadata: ClientReference<T>, |
| 52 | +): null | Thenable<T> { |
| 53 | + return null; |
| 54 | +} |
| 55 | + |
| 56 | +export function requireModule<T>(metadata: ClientReference<T>): T { |
| 57 | + throw new Error( |
| 58 | + 'renderToMarkup should not have emitted Client References. This is a bug in React.', |
| 59 | + ); |
| 60 | +} |
| 61 | + |
26 | 62 | export const usedWithSSR = true;
|
| 63 | + |
| 64 | +type HintCode = string; |
| 65 | +type HintModel<T: HintCode> = null; // eslint-disable-line no-unused-vars |
| 66 | + |
| 67 | +export function dispatchHint<Code: HintCode>( |
| 68 | + code: Code, |
| 69 | + model: HintModel<Code>, |
| 70 | +): void { |
| 71 | + // Should never happen. |
| 72 | +} |
| 73 | + |
| 74 | +export function preinitModuleForSSR( |
| 75 | + href: string, |
| 76 | + nonce: ?string, |
| 77 | + crossOrigin: ?string, |
| 78 | +) { |
| 79 | + // Should never happen. |
| 80 | +} |
| 81 | + |
| 82 | +export function preinitScriptForSSR( |
| 83 | + href: string, |
| 84 | + nonce: ?string, |
| 85 | + crossOrigin: ?string, |
| 86 | +) { |
| 87 | + // Should never happen. |
| 88 | +} |
0 commit comments