enhanced-resolve icon indicating copy to clipboard operation
enhanced-resolve copied to clipboard

fix: improve typescript defs

Open 43081j opened this issue 3 years ago • 1 comments

fixes #356

i need some help with the overloads here i think.

you can see the strong types now mean a bunch of tests need to cast things too... im not sure there's a clean way to type the callback function strongly and not have to do those casts. the compiler is right: the result could be undefined if there's an error.

43081j avatar Oct 15 '22 15:10 43081j

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: 43081j / name: James Garbutt (6552700ffcdcc5fab6ea3fb1a5007c93788ce5ec)

@alexander-akait have updated with the types we talked about, mind taking another look?

would be good if someone can trigger the CI too (first-time contributor 😬 )

43081j avatar Oct 17 '22 18:10 43081j

Codecov Report

Base: 95.18% // Head: 95.18% // No change to project coverage :thumbsup:

Coverage data is based on head (e9496a7) compared to base (651e578). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #357   +/-   ##
=======================================
  Coverage   95.18%   95.18%           
=======================================
  Files          40       40           
  Lines        1661     1661           
=======================================
  Hits         1581     1581           
  Misses         80       80           
Impacted Files Coverage Δ
lib/Resolver.js 88.00% <ø> (ø)
lib/index.js 98.03% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 17 '22 18:10 codecov[bot]

@sokra any chance you can take a look at this? or any other maintainer

43081j avatar Nov 10 '22 17:11 43081j