- Notifications
You must be signed in to change notification settings - Fork 13.2k
check usage before declaration for decorators#50372
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
src/compiler/checker.ts Outdated
| } | ||
| if (isFunctionLike(current)){ | ||
| return true; | ||
| return !getImmediatelyInvokedFunctionExpression(current); |
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.
Enum is not checked properly. playground
functionfoo17(){leta=(()=>Enum.Yes)();// should errorenumEnum{No=0,Yes=1,}}foo17()DanielRosenwasser commented Aug 22, 2022
@typescript-bot test this |
typescript-bot commented Aug 22, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Heya @DanielRosenwasser, I've started to run the extended test suite on this PR at 4190fb8. You can monitor the build here. |
typescript-bot commented Aug 22, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Heya @DanielRosenwasser, I've started to run the diff-based user code test suite on this PR at 4190fb8. You can monitor the build here. Update: The results are in! |
typescript-bot commented Aug 22, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Heya @DanielRosenwasser, I've started to run the perf test suite on this PR at 4190fb8. You can monitor the build here. Update: The results are in! |
typescript-bot commented Aug 22, 2022
@DanielRosenwasser Here are the results of running the user test suite comparing Everything looks good! |
typescript-bot commented Aug 22, 2022
Heya @DanielRosenwasser, I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
typescript-bot commented Aug 22, 2022
@DanielRosenwasser Here they are:CompilerComparison Report - main..50372
System
Hosts
Scenarios
TSServerComparison Report - main..50372
System
Hosts
Scenarios
Developer Information: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sandersn commented May 2, 2025
@typescript-bot test this |
typescript-bot commented May 2, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
typescript-bot commented May 2, 2025
@sandersn Here are the results of running the user tests with tsc comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Everything looks good! |
typescript-bot commented May 2, 2025
Hey @sandersn, the results of running the DT tests are ready. Everything looks the same! |
typescript-bot commented May 2, 2025
@sandersn Here they are:tscComparison Report - baseline..pr
System info unknown Hosts
Scenarios
Developer Information: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
typescript-bot commented May 2, 2025
@sandersn Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
5e36778 into microsoft:mainUh oh!
There was an error while loading. Please reload this page.
Renegade334 commented Jul 29, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
|
jakebailey commented Jul 29, 2025
I'm confused; wouldn't our extended tests have caught a bad break? |
Renegade334 commented Jul 29, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Actually, my read is wrong. #57933 only applied to passing the declared class variable to decorators used within that class, which is kosher given that the transformer injects the decorator call after the class is declared. The example from #62083, passing a block-scoped variable declared after the class to a decorator within the class body, would lead to runtime errors if transpiled by TypeScript itself – clearly the custom transpilation used there is doing something different. |
Fixes#50349