tinesoft/ngx-cookieconsent

Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

wnabil opened this issue · 1 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

CookieConsent and Library Versions?

- cookieconsent version: 2.2.3
- ngx-cookieconsent version: 3.1.1

OS Version?

windows 10 and linux ubuntu 20

Angular, Node and al Versions?

Angular CLI: 10.2.0
Node: 12.18.2
OS: win32 x64

Angular: 10.2.4
npm 6.14.6

Repro steps

npm install --save ngx-cookieconsent
ng serve

The log given by the failure

ERROR in node_modules/ngx-cookieconsent/cookieconsent.module.d.ts:7:53 - error TS2314: Generic type 'ModuleWithProviders' requires 1
type argument(s).

7 static forRoot(config: NgcCookieConsentConfig): ModuleWithProviders;
~~~~~~~~~~~~~~~~~~~

Desired functionality

cookie confirm popup

Mention any other details that might be useful

declare module "@angular/core" { interface ModuleWithProviders<T = any> { ngModule: Type<T>; providers?: Provider[]; } }
overriding the types in the project works but the library should be compiled with newer version so it works with the latest angular changes
https://stackoverflow.com/questions/62755093/angular-error-generic-type-modulewithproviderst-requires-1-type-arguments

Fixed by 7a44f3f