-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
refactor: improve types #4667
refactor: improve types #4667
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4667 +/- ##
==========================================
- Coverage 99.05% 99.05% -0.01%
==========================================
Files 214 214
Lines 7549 7548 -1
Branches 2093 2092 -1
==========================================
- Hits 7478 7477 -1
Misses 23 23
Partials 48 48
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
No, this is by design. |
I see, but does it really help? I didn't change the runtime code actually, but removed type assertions |
It will cause a pretty serious problem: when refactoring code, I can not find all the places that referenced types by TypeScript. #4668 is the example. |
I guess it does not 🙄 |
Checking the configuration by TS type obviously doesn't work. A better way is to check it in normalize function. If the configuration is invalid, an exception needs to be thrown to avoid runtime errors. We can see this here, Lines 128 to 130 in 3cb7f13
|
This PR has been released as part of rollup@3.2.0. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Enhance types of internal functions, stricter.