codecks-io / react-sticky-box

Sticky boxes for contents of all sizes
https://react-sticky-box.codecks.io/
ISC License
469 stars 44 forks source link

add type declarations #31

Closed aaronlifton closed 5 years ago

aaronlifton commented 5 years ago

We use this package for a new project we're working on, and since we use Typescript, I decided to add type declarations for it. Hope this helps other Typescript users!

danielberndt commented 5 years ago

Thanks! This is looking good :)

One minor issue I have is that it exposes quite a lot of internals on the StickyBoxInstance that are not part of the official API. This might result in breaking code in minor/patch releases.

But I guess should those be changed, typescript will throw errors in case people rely on these internals

danielberndt commented 5 years ago

I made some small adaptations and added the type definitions to the just released v0.8.0.

Let me know if it's working once you get the chance to update :)

aaronlifton commented 5 years ago

Yeah, I understand the part about not wanting to expose the internals. For sure. Thanks, will do!