-
Notifications
You must be signed in to change notification settings - Fork 192
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
fix: improve typescript defs #357
Conversation
|
); | ||
}; | ||
|
||
/** @typedef {Omit<ResolveOptions, "fileSystem"> & Partial<Pick<ResolveOptions, "fileSystem">>} ResolveOptionsOptionalFS */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this thing bothers me. any suggestions welcome...
basically the create
functions need to accept ResolveOptions
with an optional filesystem, but everything else that takes options requires a filesystem (the resolver factory etc)
@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 😬 ) |
Codecov ReportBase: 95.18% // Head: 95.18% // No change to project coverage 👍
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
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@sokra any chance you can take a look at this? or any other maintainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are a significant improvement to enhanced-resolve. Thank you so much @43081j
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [enhanced-resolve](https://togithub.com/webpack/enhanced-resolve) | [`5.13.0` -> `5.14.0`](https://renovatebot.com/diffs/npm/enhanced-resolve/5.13.0/5.14.0) | [![age](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/compatibility-slim/5.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/enhanced-resolve/5.14.0/confidence-slim/5.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>webpack/enhanced-resolve</summary> ### [`v5.14.0`](https://togithub.com/webpack/enhanced-resolve/releases/tag/v5.14.0) [Compare Source](https://togithub.com/webpack/enhanced-resolve/compare/v5.13.0...v5.14.0) #### Features - Replace deprecated String.prototype.substr() by [@​CommanderRoot](https://togithub.com/CommanderRoot) in [https://github.com/webpack/enhanced-resolve/pull/336](https://togithub.com/webpack/enhanced-resolve/pull/336) #### Bugfixes - Significantly improve type coverage & definitions for `resolve` by [@​43081j](https://togithub.com/43081j) in [https://github.com/webpack/enhanced-resolve/pull/357](https://togithub.com/webpack/enhanced-resolve/pull/357) - Fix bug where `aliasFields` was not being applied to package `exports` field by [@​alexander-akait](https://togithub.com/alexander-akait) in [https://github.com/webpack/enhanced-resolve/pull/380](https://togithub.com/webpack/enhanced-resolve/pull/380) #### Dependencies & Maintenance - Update `checkout`, `setup-node`, and `codecov` github actions by [@​snitin315](https://togithub.com/snitin315) in [https://github.com/webpack/enhanced-resolve/pull/378](https://togithub.com/webpack/enhanced-resolve/pull/378) #### New Contributors - [@​CommanderRoot](https://togithub.com/CommanderRoot) made their first contribution in [https://github.com/webpack/enhanced-resolve/pull/336](https://togithub.com/webpack/enhanced-resolve/pull/336) **Full Changelog**: webpack/enhanced-resolve@v5.13.0...v5.14.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/Unleash/unleash). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ni4zIiwidXBkYXRlZEluVmVyIjoiMzUuOTYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.