daniel-lundin / react-dom-confetti

Trigger confetti explosions on state transitions
623 stars 30 forks source link

Add typings to Confetti component #8

Closed panmona closed 6 years ago

panmona commented 6 years ago

I use this module in a typescript project and there weren't any typings for Typescript so I added them for others to use. @daniel-lundin

daniel-lundin commented 6 years ago

Nice! I don't use TypeScript myself, but don't you need to reference them from package.json somehow or is it enough that the declaration has the same name as the js file?

panmona commented 6 years ago

As far as I know there are two ways:

  1. put index.d.ts into the root (I choose that approach here)
  2. put a types declaration in the package.json
daniel-lundin commented 6 years ago

Ok, cool, will do a new release soon!

daniel-lundin commented 6 years ago

published as 0.0.9

panmona commented 6 years ago

@daniel-lundin Thanks a lot. Works perfectly 🎉 <- this is confetti 😉