-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat: update to TS 2.9 and enable strictFunctionTypes #12182
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
Conversation
3fe0cdb
to
331feee
Compare
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.
LGTM
// Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed | ||
// back into the zone because matchMedia is only included in Zone.js by loading the | ||
// webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not | ||
// have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js | ||
// patches it. | ||
(listener: MediaQueryListListener) => { | ||
(listener: Function) => { |
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.
Is there no type more specific than Function
that we can use here?
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.
I don't think so. The strictFunctionTypes
seem to resolve it to Function
. A workaround is to have as MediaQueryListener
before calling, but that seemed a little ugly.
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.
Aright, sg
@crisbeto Is this still a WIP? If not go ahead and update the title and mark it merge ready again. |
It is still is, I haven't been able to track down the Bazel issue yet. |
e467cde
to
6fd2afb
Compare
Looks like we're blocked here until angular/angular#24521 is resolved. cc @jelbourn |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
2 similar comments
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
1 similar comment
Hi @crisbeto! This PR has merge conflicts due to recent upstream merges. |
@crisbeto getting this:
Probably new code introduced since your original change? |
/** Combined type for a categorized method member document. */ | ||
type CategorizedMemberDoc = CategorizedMethodMemberDoc & CategorizedPropertyMemberDoc; | ||
/** Sorts method members by deprecated status, member decorator, and name. */ | ||
export function sortCategorizedMethodMembers(docA: CategorizedMethodMemberDoc, |
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.
Why do we need to duplicate the logic that actually is the same for properties and methods?
Did you run into any issue with the types that we should revisit later?
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.
Yeah, it's something that started throwing after I enabled the strictFunctionTypes
.
@crisbeto I looked at that error w/ Miles and it goes away if we change that line to: startWith<Event | null>(null), |
That's odd @jelbourn. I had fixed that error yesterday and I don't get any diff changes or compilation errors locally. Re-pushing to see if that fixes it. |
Still failing on that line- it must be something different about Google's internal TS setup |
Bumps the project to TypeScript 2.9, enables the `strictFunctionTypes` everywhere and fixes the various errors. Fixes angular#12177.
Could be. I've changed it to |
Removes a workaround that was initially introduced to get angular#12182 through. The root issue has been resolved in angular#12876.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bumps the project to TypeScript 2.9, enables the
strictFunctionTypes
everywhere and fixes the various errors.Fixes #12177.