mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
[Flight] Move bundler configs to use Suspense instead of returning thenable (#18367)
* Move bundler configs to use suspense instead of returning thenable * Fix some Flow types
This commit is contained in:
committed by
GitHub
parent
dead1cd0cc
commit
4fed6a4701
@@ -67,5 +67,9 @@ declare module 'EventListener' {
|
||||
};
|
||||
}
|
||||
|
||||
declare function __webpack_chunk_load__(id: string): {then(() => mixed): mixed};
|
||||
type Thenable = {
|
||||
then(resolve: (mixed) => mixed, reject?: (Error) => mixed): Thenable,
|
||||
};
|
||||
|
||||
declare function __webpack_chunk_load__(id: string): Thenable;
|
||||
declare function __webpack_require__(id: string): {default: any};
|
||||
|
||||
Vendored
+1
-9
@@ -15,11 +15,6 @@ type JSONValue =
|
||||
| {[key: string]: JSONValue}
|
||||
| Array<JSONValue>;
|
||||
|
||||
type Thenable = {
|
||||
then(resolve: () => mixed, reject: (error: Error) => mixed): mixed,
|
||||
...
|
||||
};
|
||||
|
||||
declare module 'ReactFlightDOMRelayServerIntegration' {
|
||||
declare export opaque type Destination;
|
||||
declare export function emitModel(
|
||||
@@ -43,7 +38,7 @@ declare module 'ReactFlightDOMRelayServerIntegration' {
|
||||
}
|
||||
|
||||
declare module 'ReactFlightDOMRelayClientIntegration' {
|
||||
declare export opaque type ModuleReference;
|
||||
declare export opaque type ModuleReference<T>;
|
||||
declare export opaque type ModuleMetaData;
|
||||
declare export function resolveModuleReference<T>(
|
||||
moduleData: ModuleMetaData,
|
||||
@@ -51,9 +46,6 @@ declare module 'ReactFlightDOMRelayClientIntegration' {
|
||||
declare export function preloadModule<T>(
|
||||
moduleReference: ModuleReference<T>,
|
||||
): void;
|
||||
declare export function loadModule<T>(
|
||||
moduleReference: ModuleReference<T>,
|
||||
): null | Thenable;
|
||||
declare export function requireModule<T>(
|
||||
moduleReference: ModuleReference<T>,
|
||||
): T;
|
||||
|
||||
Reference in New Issue
Block a user