Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import module #63

Open
SalmanTariq opened this issue Sep 7, 2020 · 3 comments · May be fixed by #65
Open

Unable to import module #63

SalmanTariq opened this issue Sep 7, 2020 · 3 comments · May be fixed by #65

Comments

@SalmanTariq
Copy link

I'm receiving this error when trying to serve after importing the MalihuScrollbarModule

ERROR in node_modules/ngx-malihu-scrollbar/src/malihu-scrollbar.module.d.ts:3:23 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).
     static forRoot(): ModuleWithProviders;

The error refers to the following file

import { ModuleWithProviders } from '@angular/core';
export declare class MalihuScrollbarModule {
    static forRoot(): ModuleWithProviders;
    static forChild(): ModuleWithProviders;
}

The error is only in version 9. version 8 is working fine.
Please advise.
Thanks.

@jfcere
Copy link
Owner

jfcere commented Sep 7, 2020

Hi @SalmanTariq,

This is probably due to the Angular version of your application. Ngx-malihu-scrollbar v9.0.0 should be used with Angular 9.

@SalmanTariq
Copy link
Author

@jfcere I'm using Angular 10. Version 8 is working fine though in the same Angular project.
Should I try adding the type in a PR?

@jfcere
Copy link
Owner

jfcere commented Sep 13, 2020

I'll update the library to Angular 10, this should fix it.

@jfcere jfcere linked a pull request Sep 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants