Cogoport / cogo-toast

Beautiful, Zero Configuration, Toast Messages for React. Only ~ 4kb gzip, with styles and icons
https://cogoport.github.io/cogo-toast
MIT License
673 stars 1 forks source link

Could not find a declaration file for module 'cogo-toast' #6

Closed chrysb closed 5 years ago

chrysb commented 5 years ago

Looks like a great library, but after installing I get this:

Could not find a declaration file for module 'cogo-toast'. '/path/to/node_modules/cogo-toast/dist/index.js' implicitly has an 'any' type.

Do you support TypeScript?

I did: npm install --save cogo-toast import cogoToast from 'cogo-toast';

Thanks!

anmdotdev commented 5 years ago

Thank you. Glad you like it.

It is most likely searching for a typings files. We don't support typescript as of now. I will try to add the support in a future release but can't give an eta as of now.

chrysb commented 5 years ago

For posterity, I did figure out a solution by creating an index.d.ts file in my root with the line declare module 'cogo-toast';.

anmdotdev commented 5 years ago

Merged in #12 for v2.0.0