-
Notifications
You must be signed in to change notification settings - Fork 172
Angular 10 Update Generic type 'ModuleWithProviders' requires 1 type argument(s). #456
Comments
Hopefully a fix for this soon! |
@vamidi sent a pull request but looks like no one answered yet, not sure if this rep has people maintaining. |
So unfortunate that there is no update there are a few frameworks that rely on this. |
I used patch-package with diff --git a/node_modules/ng2-completer/src/modules/ng2-completer.module.d.ts b/node_modules/ng2-completer/src/modules/ng2-completer.module.d.ts
index f1dd11a..860a84c 100644
--- a/node_modules/ng2-completer/src/modules/ng2-completer.module.d.ts
+++ b/node_modules/ng2-completer/src/modules/ng2-completer.module.d.ts
@@ -1,5 +1,5 @@
import { ModuleWithProviders } from "@angular/core";
export declare class Ng2CompleterModule {
- static forRoot(): ModuleWithProviders;
- static forChild(): ModuleWithProviders;
+ static forRoot(): ModuleWithProviders<Ng2CompleterModule>;
+ static forChild(): ModuleWithProviders<Ng2CompleterModule>;
} As a stop gap Hopefully a more permanent fix is merged soon. |
Thanks @aaron-harvey that tool is awesome! :) |
Hi All, I have forked the project and fixed the issue, If anyone wants the fix, replace your Or run the command: And do an npm install. Then, your project will run nicely without any issue. :) Thanks |
WHERE:
@akveo/ng2-completer/src/modules/ng2-completer.module.d.ts:3:23 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).
3 static forRoot(): ModuleWithProviders;
According to Angular 10 it's now necessary to have a generic type
https://angular.io/guide/migration-module-with-providers
The text was updated successfully, but these errors were encountered: