AnthonyNahas / ngx-linkifyjs

Angular V8 wrapper for linkifyjs - library for finding links in plain text and converting them to HTML <a> tags via linkifyjs
https://anthonynahas.github.io/ngx-linkifyjs
MIT License
41 stars 20 forks source link

Angular 10 Support [Add Type for ModuleWithProviders] #166

Open cvasqu09 opened 3 years ago

cvasqu09 commented 3 years ago

Support for Angular 10 ModuleWithProviders is no longer accepting no type see here: https://angular.io/guide/migration-module-with-providers

Bug Report or Feature Request (mark with an x)

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

OS and Version?

Windows

Versions

  "dependencies": {
    "@angular/animations": "^10.2.3",
    "@angular/cdk": "^10.2.7",
    "@angular/common": "^10.2.3",
    "@angular/compiler": "^10.2.3",
    "@angular/core": "^10.2.3",
    "@angular/forms": "^10.2.3",

Repro steps

1) Add NgxLinkifyjs to Angular 10 project 2) Add NgxLinkifyjsModule.forRoot() to imports of app.module.ts 3) Run ng serve

The log given by the failure

ERROR in node_modules/ngx-linkifyjs/module/ngx-linkifyjs.module.d.ts:12:50 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

12     static forRoot(config?: NgxLinkifyjsConfig): ModuleWithProviders;
                                                    ~~~~~~~~~~~~~~~~~~~

Desired functionality

Provide typing for ModuleWithProviders to remove build issues on Angular 10