react-loadable: Only default is a valid key by default

Having it be an indexed type prevents use with dynamic import.
This commit is contained in:
Diogo Franco 2017-06-21 17:44:16 +09:00 committed by GitHub
parent a3af39ba43
commit 9b9e8dd26d

View File

@ -44,7 +44,7 @@ export interface OptionsWithoutRender<Props> extends CommonOptions {
*
* Resulting React component receives all the props passed to the generated component.
*/
loader(): Promise<React.ComponentType<Props> | { [key: string]: React.ComponentType<Props> }>;
loader(): Promise<React.ComponentType<Props> | { default: React.ComponentType<Props> }>;
}
export interface OptionsWithRender<Props, Exports extends object> extends CommonOptions {