Refactor Suspense to be augmentable

This is just so I can experiment with maxDuration locally with a type augmentation.
This commit is contained in:
Jessica
2018-12-03 19:43:34 +09:00
parent f15a022416
commit df5456793b
+8 -6
View File
@@ -322,11 +322,8 @@ declare namespace React {
const Children: ReactChildren;
const Fragment: ExoticComponent<{ children?: ReactNode }>;
const StrictMode: ExoticComponent<{ children?: ReactNode }>;
/**
* This feature is not yet available for server-side rendering.
* Suspense support will be added in a later release.
*/
const Suspense: ExoticComponent<{
interface SuspenseProps {
children?: ReactNode
/** A fallback react tree to show when a Suspense child (like React.lazy) suspends */
@@ -338,7 +335,12 @@ declare namespace React {
* Not implemented yet, requires unstable_ConcurrentMode
*/
// maxDuration?: number
}>;
}
/**
* This feature is not yet available for server-side rendering.
* Suspense support will be added in a later release.
*/
const Suspense: ExoticComponent<SuspenseProps>;
const version: string;
//