useDimensions icon indicating copy to clipboard operation
useDimensions copied to clipboard

Missing typings

Open alfnielsen opened this issue 5 years ago • 1 comments

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

alfnielsen avatar Jul 30 '19 09:07 alfnielsen

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.

ricveal avatar Aug 23 '19 16:08 ricveal