Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing typings #16

Open
alfnielsen opened this issue Jul 30, 2019 · 1 comment
Open

Missing typings #16

alfnielsen opened this issue Jul 30, 2019 · 1 comment

Comments

@alfnielsen
Copy link

Hey Swizec,

This useDimensions hook looks nice,
but the typescript typings is not in the code when I get it from NPM,
and its not in @types/react-use-dimensions either.

But I can see in your source code that you have created it with typings.

I it possible that you can add the typings so it can be used in "strict" typescript projects?

(I believe its adding "typing:ref to file" in the package.json or something like that)

/br

@ricveal
Copy link

ricveal commented Aug 23, 2019

I have opened a PR (#17) which should resolve this issue.

As @alfnielsen said, typing property was missing in package.json. In addition, some extra work has been required adapting some interfaces that could cause problems in "strict" Typescript projects. More details are explained in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants