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`.
|
* @see `Route#loadChildren`.
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export type LoadChildrenCallback = () =>
|
export type LoadChildrenCallback = () => Type<any>| NgModuleFactory<any>|
|
||||||
Type<any>| NgModuleFactory<any>| Promise<Type<any>>| Observable<Type<any>>;
|
Promise<NgModuleFactory<any>>| Promise<Type<any>>| Observable<Type<any>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
2
tools/public_api_guard/router/router.d.ts
vendored
2
tools/public_api_guard/router/router.d.ts
vendored
@ -147,7 +147,7 @@ export declare class GuardsCheckStart extends RouterEvent {
|
|||||||
|
|
||||||
export declare type LoadChildren = string | LoadChildrenCallback;
|
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 = {
|
export declare type Navigation = {
|
||||||
id: number;
|
id: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user