-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Stricter types #16699
Stricter types #16699
Conversation
scripts/fix/browser-order.ts
Outdated
@@ -23,15 +23,17 @@ export const orderSupportBlock = ( | |||
value: CompatStatement, | |||
): CompatStatement => { | |||
if (key === '__compat') { | |||
const support = Object.keys(value.support) | |||
const support: CompatStatement['support'] = ( |
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.
Wouldn't it be better to do this instead?
const support: CompatStatement['support'] = ( | |
const support: SupportStatement = ( |
(Please feel free to ignore if this is just another one of those dumb TypeScript nits!)
I dropped changes to the following files:
They were changing interfaces too much which is probably bad now considering the BCD export |
@rebloor Which commit are you on? I'm on current |
I pulled from Main a few minutes ago. Let me go and try main itself |
Sorry delete my earlier comment, was recommended to create a new issue |
I get the same issue off of Main, creating a new issue |
For anyone reading this: that issue is #16716, let's continue the discussion there. |
Summary
Refactor the type system a bit and remove extra type casts (thus making code more type-sound).
Test results and supporting details
This is pure refactoring.
Related issues
#16668