File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as React from 'react';
4
4
* The configuration for an asynchronous component.
5
5
*/
6
6
export interface Configuration < P > {
7
- resolve : ( ) => Promise < React . Component < P > > ;
7
+ resolve : ( ) => Promise < React . ComponentType < P > > ;
8
8
LoadingComponent ?: ( props : P ) => JSX . Element ;
9
9
ErrorComponent ?: ( props : P & { error : Error } ) => JSX . Element ;
10
10
name ?: string ;
@@ -40,7 +40,7 @@ export interface Context {
40
40
*
41
41
* @param config The configuration to use for the asynchronous component.
42
42
*/
43
- export function asyncComponent < T extends React . Component < P > , P > ( config : Configuration < P > ) : React . ComponentClass < P > ;
43
+ export function asyncComponent < P > ( config : Configuration < P > ) : React . ComponentType < P > ;
44
44
45
45
/**
46
46
* Create a context for the asynchronous component resolving module.
You can’t perform that action at this time.
0 commit comments