Open mokhtaarr opened 1 year ago
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 ;
adding "skipLibCheck":true in tsconfig.json worked for me
I have same Problem using "ngx-toastr": "^14.3.0",
Angular CLI: 15.2.11 Node: 16.20.2 Package Manager: npm 8.11.0 OS: win32 x64
Type '(token: any, notFoundValue?: T, flags?: InjectFlags) => T | ToastPackage' is not assignable to type '{ (token: ProviderToken, notFoundValue: undefined, options: InjectOptions & { optional?: false; }): T; (token: ProviderToken, notFoundValue: null, options: InjectOptions): T; (token: ProviderToken<...>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T; (token: ProviderToken<...>, notFou...'. Types of parameters 'flags' and 'options' are incompatible. Type 'InjectOptions & { optional?: false; }' is not assignable to type 'InjectFlags'.
47 get(token: any, notFoundValue?: T, flags?: InjectFlags): T | ToastPackage;
I am having this exact issue. Have you found a solution?
Originally posted by @dlp140 in https://github.com/scttcper/ngx-toastr/issues/915#issuecomment-1572670112