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:
parent
41225289d7
commit
26a8c5961e
|
@ -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>>;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue