fix(router): support NgFactory promise in loadChildren typings (#29392)

The router loadChildren property already supports a promise that returns a NgModuleFactory, but the typings cause the compilation to fail.

PR Close #29392
This commit is contained in:
Filipe Silva 2019-03-19 10:08:31 +00:00 committed by Misko Hevery
parent 41225289d7
commit 26a8c5961e
2 changed files with 3 additions and 3 deletions

View File

@ -97,8 +97,8 @@ export type ResolveData = {
* @see `Route#loadChildren`.
* @publicApi
*/
export type LoadChildrenCallback = () =>
Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;
export type LoadChildrenCallback = () => Type<any>| NgModuleFactory<any>|
Promise<NgModuleFactory<any>>| Promise<Type<any>>| Observable<Type<any>>;
/**
*

View File

@ -147,7 +147,7 @@ export declare class GuardsCheckStart extends RouterEvent {
export declare type LoadChildren = string | LoadChildrenCallback;
export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Promise<Type<any>> | Observable<Type<any>>;
export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Promise<NgModuleFactory<any>> | Promise<Type<any>> | Observable<Type<any>>;
export declare type Navigation = {
id: number;