Stabzs / Angular2-Toaster

Angular2-toaster is an asynchronous, non-blocking Angular Toaster Notification library
MIT License
334 stars 93 forks source link

Typing error in build for Angular 11 #221

Closed maxailloud closed 3 years ago

maxailloud commented 3 years ago

Hello. I just updated my project to the last version of the package alongside Angular 11. I am having an issue coming from the typing of it.

Error: node_modules/angular2-toaster/lib/toaster-config.d.ts:5:25 - error TS1110: Type expected.

5     [key in ToastType]: ;
                          ~
node_modules/angular2-toaster/lib/toaster-config.d.ts:8:25 - error TS1110: Type expected.

8     [key in ToastType]: ;
                          ~

It looks like the ToasterConfig class typings has some missing type for two different constants. Here is the code the errors are from:

export declare const DefaultTypeClasses: {
    [key in ToastType]: ;
};
export declare const DefaultIconClasses: {
    [key in ToastType]: ;
};

No idea what went wrong but it looks like it went wrong for this.

Stabzs commented 3 years ago

Thanks for reporting this. I'm looking into it. Did you also update your Typescript version as well?

maxailloud commented 3 years ago

No problem. Thank you.

Stabzs commented 3 years ago

Looks like the type for the value is missing. Publishing a new version as 11.0.1 shortly.

Stabzs commented 3 years ago

Published as 11.0.1 and i'll be deprecating 11.0.0. Please let me know if things look correct.

maxailloud commented 3 years ago

Fixed to me. Thank you for being reactive.