You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect this.contextAccumlator = context to report zero errors.
🙂 Expected behavior
Instead it says
Type '(() => T | Promise<T>) | (T & Function)' is not assignable to type '() => T | Promise<T>'.
Type 'T & Function' is not assignable to type '() => T | Promise<T>'.
Type 'Context & Function' provides no match for the signature '(): T | Promise<T>'.(2322)
Weirdly enough, it seems those are two different cases. This issue's sample code was indeed working by 4.5.5, broken in 4.6.2, and still broken in 4.7.0-dev.20220304. While the second example was never fixed as far as I can tell.
Activity
refactor: workaround the regression caused by TypeScript 4.6
tristan00b commentedon Mar 4, 2022
Harminder Virk (@thetutlage) I played around with this a bit and reduced your example:
This can be reproduced as far back as version 3.3.3 (play).
thetutlage commentedon Mar 4, 2022
🤔 Did you mean there is no regression?
jihndai commentedon Mar 4, 2022
Weirdly enough, it seems those are two different cases. This issue's sample code was indeed working by 4.5.5, broken in 4.6.2, and still broken in 4.7.0-dev.20220304. While the second example was never fixed as far as I can tell.
tristan00b commentedon Mar 4, 2022
Maybe a recent change caused the old bug to surface in Harminder Virk (@thetutlage) 's code.
RyanCavanaugh commentedon Mar 4, 2022
This is a correct error that was not properly found before:
thetutlage commentedon Mar 5, 2022
So shouldn't this be under breaking changes?
RyanCavanaugh commentedon Mar 5, 2022
Yes, that's why it's a Docs bug assigned to the blog post author
thetutlage commentedon Mar 5, 2022
Okay! Thanks for the clarification :)
jakebailey commentedon Apr 16, 2024
This was "fixed" in #49119; should it have been?