From 2bfb6a02e28ceacccea3502491624586f55d4fdf Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 11 Apr 2019 14:23:17 +0100 Subject: [PATCH] fix(router): support non-NgFactory promise in loadChildren typings (#29832) PR Close #29832 --- packages/router/src/config.ts | 4 ++-- tools/public_api_guard/router/router.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/router/src/config.ts b/packages/router/src/config.ts index cc0be4687c..e49dc3d04f 100644 --- a/packages/router/src/config.ts +++ b/packages/router/src/config.ts @@ -97,8 +97,8 @@ export type ResolveData = { * @see `Route#loadChildren`. * @publicApi */ -export type LoadChildrenCallback = () => Type| NgModuleFactory| - Promise>| Promise>| Observable>; +export type LoadChildrenCallback = () => Type| NgModuleFactory| Observable>| + Promise|Type|any>; /** * diff --git a/tools/public_api_guard/router/router.d.ts b/tools/public_api_guard/router/router.d.ts index a9130c64b7..43e640ffdb 100644 --- a/tools/public_api_guard/router/router.d.ts +++ b/tools/public_api_guard/router/router.d.ts @@ -147,7 +147,7 @@ export declare class GuardsCheckStart extends RouterEvent { export declare type LoadChildren = string | LoadChildrenCallback; -export declare type LoadChildrenCallback = () => Type | NgModuleFactory | Promise> | Promise> | Observable>; +export declare type LoadChildrenCallback = () => Type | NgModuleFactory | Observable> | Promise | Type | any>; export declare type Navigation = { id: number;