File tree Expand file tree Collapse file tree 6 files changed +13
-9
lines changed
content/examples/ngmodules/src/app/greeting
packages/core/src/metadata Expand file tree Collapse file tree 6 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export class GreetingModule {
2323 // #enddocregion ctor
2424
2525 // #docregion for-root
26- static forRoot ( config : UserServiceConfig ) : ModuleWithProviders {
26+ static forRoot ( config : UserServiceConfig ) : ModuleWithProviders < GreetingModule > {
2727 return {
2828 ngModule : GreetingModule ,
2929 providers : [
Original file line number Diff line number Diff line change 22 "extends" : " ./tsconfig.json" ,
33 "compilerOptions" : {
44 "outDir" : " ../out-tsc/app" ,
5- "types" : []
5+ "types" : [],
6+ // TODO(FW-2145): turn lib checks back on after fixing in-memory-api and investigating impact of ModuleWithProviders
7+ "skipLibCheck" : true
68 },
79 "files" : [
810 " src/main.ts" ,
Original file line number Diff line number Diff line change 1717 "lib" : [
1818 " es2018" ,
1919 " dom"
20- ]
20+ ],
21+ // TODO(FW-2145): turn lib checks back on after fixing in-memory-api and investigating impact of ModuleWithProviders
22+ "skipLibCheck" : true
2123 },
2224 "angularCompilerOptions" : {
2325 "enableIvy" : false ,
Original file line number Diff line number Diff line change 1313 "suppressImplicitAnyIndexErrors" : true ,
1414 "typeRoots" : [
1515 " node_modules/@types"
16- ]
16+ ],
17+ // TODO(FW-2145): turn lib checks back on after fixing in-memory-api and investigating impact of ModuleWithProviders
18+ "skipLibCheck" : true
1719 },
1820 "include" : [
1921 " ../../../content/examples/*/e2e-spec.ts"
Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ export declare class ModuleWithComponentFactories<T> {
559559 constructor ( ngModuleFactory : NgModuleFactory < T > , componentFactories : ComponentFactory < any > [ ] ) ;
560560}
561561
562- export declare interface ModuleWithProviders < T = any /** TODO(alxhub): remove default when callers pass explicit type param */ > {
562+ export declare interface ModuleWithProviders < T > {
563563 ngModule : Type < T > ;
564564 providers ?: Provider [ ] ;
565565}
Original file line number Diff line number Diff line change @@ -82,16 +82,14 @@ export interface NgModuleDef<T> {
8282/**
8383 * A wrapper around an NgModule that associates it with the providers.
8484 *
85- * @param T the module type. In Ivy applications, this must be explicitly
86- * provided.
85+ * @param T the module type.
8786 *
8887 * Note that using ModuleWithProviders without a generic type is deprecated.
8988 * The generic will become required in a future version of Angular.
9089 *
9190 * @publicApi
9291 */
93- export interface ModuleWithProviders <
94- T = any /** TODO(alxhub): remove default when callers pass explicit type param */ > {
92+ export interface ModuleWithProviders < T > {
9593 ngModule : Type < T > ;
9694 providers ?: Provider [ ] ;
9795}
You can’t perform that action at this time.
0 commit comments