baruchvlz / resq

React Element Selector Query (RESQ) - Query React components and children by component name or HTML selector
MIT License
174 stars 27 forks source link

chore: include types in the npm package #55

Closed mvasin closed 4 years ago

mvasin commented 4 years ago

Simple including index.d.ts in files section of package.json didn't help, I was getting "index.d.ts is not a module" error, so I had to tweak the declaration itself.

I could have broken some UMD-specific behaviour, namely exposing the library API in the global namespace, but the exact use case doesn't exactly click in my mind: would you really add resq with a <script> tag, and at the same time care about TypeScript types?

So I rewrote the declaration the way I see it. Totally up for criticism.

✅ Closes: #54

codecov[bot] commented 4 years ago

Codecov Report

Merging #55 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #55   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         143    143           
  Branches       37     37           
=====================================
  Hits          143    143

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9a68a30...685eec3. Read the comment docs.

baruchvlz commented 4 years ago

Thanks for taking care of this.