stratiformltd / react-loadable-visibility

A wrapper around react-loadable and @loadable/component to load elements once they are visible on the page.
BSD 3-Clause "New" or "Revised" License
1.01k stars 31 forks source link

Typescript Typings #27

Closed dbartholomae closed 5 years ago

dbartholomae commented 5 years ago

Hi there,

would you be interested in a PR that adds TypeScript typings?

Best, Daniel

tazsingh commented 5 years ago

Of course!

Sent from my iPhone

On Aug 23, 2019, at 9:05 PM, Daniel Bartholomae notifications@github.com wrote:

 Hi there,

would you be interested in a PR that adds TypeScript typings?

Best, Daniel

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

dbartholomae commented 5 years ago

Since the types of react-loadable are currently managed via DefinitelyTyped and I wouldn't want to couple this library to a helper library, I have also written a PR to DefinitelyTyped instead of this one. When it gets merged, types for react-loadable-visibility should be available from @types/react-loadable-visibility. The PR might take some time though since I have a problem with the typings of react-loadable itself that I currently cannot solve on my own.

dbartholomae commented 5 years ago

Typings are available now via DefinitivelyTyped

tazsingh commented 5 years ago

@dbartholomae Amazing! Thanks for getting that done 💪

If you want to add instructions to the README on how to get that working, I'd be happy to review a PR that adds that in. Let me know as you'll likely get to it before I have a chance to 😅

dbartholomae commented 5 years ago

Shouldn't be necessary, it is the default way to add typings for repos that don't have typings, and TypeScript itself will guide you to it :)