new-data-services / tailwindcss-animated

Extended animation utilities for Tailwind CSS
https://tailwindcss-animated.com
MIT License
744 stars 10 forks source link

Type definitions #6

Closed juanCortelezzi closed 4 months ago

juanCortelezzi commented 1 year ago

Hi there! Is there any chance to get type definitions?

I'm using a tailwind.config.ts for my project and I would love to be able to import the library without typescript crying about the import not having type definitions.

adlerweb3 commented 1 year ago

Hi!

I'm experiencing the same problem as described by @juanCortelezzi in issue #6. To make TailwindCSS-animated work with TypeScript, I found a workaround that involves adding the following code into a new file index.d.ts in the node_modules/tailwindcss-animated folder:

declare const plugin: { handler: () => void }
export = plugin

Hope that helps until the type definitions implementation.