From df5456793b6f17352c30032132b1cd969e00f9fb Mon Sep 17 00:00:00 2001 From: Jessica Date: Mon, 3 Dec 2018 19:43:34 +0900 Subject: [PATCH] Refactor Suspense to be augmentable This is just so I can experiment with maxDuration locally with a type augmentation. --- types/react/index.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index f525d7838c..431a1d75a4 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -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; const version: string; //