-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Support const assertions and unit type const variable references in constant expressions #59475
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
base: main
Are you sure you want to change the base?
Conversation
@typescript-bot test it |
Hey @ahejlsberg, the results of running the DT tests are ready. Everything looks the same! |
@ahejlsberg Here are the results of running the user tests with tsc comparing Everything looks good! |
@ahejlsberg Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@ahejlsberg Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
@RyanCavanaugh Hi dear TypeScript maintainers, this MR is pending since 6 months and it is blocking the resolution of issue #59346, which had a milestone of TypeScript 5.7.0, which has been clearly missed. Can we get it merged? |
I also would love to see this merged P.S.: looks like all tests have successfully passed loooong time ago... Can someone review this MR already, please? |
@RyanCavanaugh Is there any hope to see this merge request merged sooner or later? 6 months have passed and it is blocked for no explained reason. |
Please approve and merge...thx! |
With this PR we permit constant expressions to contain
const
assertions and references toconst
variables with unit types:Note that a
const
variable with a type annotation may be referenced in a constant expression only if the type annotation is a string or numeric literal. Other forms of types, such as named types or union types, are not supported.Fixes #59346.