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

i change toaster version that was my problem #1000

Open
mokhtaarr opened this issue Jun 29, 2023 · 2 comments
Open

i change toaster version that was my problem #1000

mokhtaarr opened this issue Jun 29, 2023 · 2 comments

Comments

@mokhtaarr
Copy link

          > i have same problem and use npm install ngx-toastr --save --force .. and this error come to me Error: ../node_modules/ngx-toastr/toastr/toast-injector.d.ts:47:5 - error TS2416: Property 'get' in type 'ToastInjector' is not assignable to the same property in base type 'Injector'. Type '(token: any, notFoundValue?: T | undefined, flags?: InjectFlags | undefined) => T | ToastPackage' is not assignable to type '{ (token: ProviderToken, notFoundValue: undefined, options: InjectOptions & { optional?: false | undefined; }): T; (token: ProviderToken, notFoundValue: null | undefined, options: InjectOptions): T | null; (token: ProviderToken<...>, notFoundValue?: T | undefined, options?: InjectOptions | ... 1 more ...'. Types of parameters 'flags' and 'options' are incompatible. Type 'InjectOptions & { optional?: false | undefined; }' is not assignable to type 'InjectFlags | undefined'.

I am having this exact issue. Have you found a solution?

Originally posted by @dlp140 in #915 (comment)

@Rabeb1998
Copy link

Rabeb1998 commented Jun 29, 2023

Pour résoudre cette erreur, vous pouvez accéder au fichier "node_modules/ngx-toastr/toastr/toast-injector.d.ts" et essayer de modifier la signature de la méthode 'get' dans la classe 'ToastInjector' pour correspondante à celle de la classe de base 'Injecteur'. Voici comment vous pouvez le faire : get(token: any, notFoundValue?: T | undefined): T | ToastPackage ;

@edobasky
Copy link

edobasky commented Jul 6, 2023

adding "skipLibCheck":true in tsconfig.json worked for me

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

No branches or pull requests

3 participants