Repository navigation
Support const assertions and unit type const variable references in constant expressions - #59475
Anders Hejlsberg (ahejlsberg) wants to merge 4 commits into
Conversation
|
TypeScript Bot (@typescript-bot) test it |
|
Hey Anders Hejlsberg (@ahejlsberg), the results of running the DT tests are ready. Everything looks the same! |
|
Anders Hejlsberg (@ahejlsberg) Here are the results of running the user tests with tsc comparing Everything looks good! |
|
Anders Hejlsberg (@ahejlsberg) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Anders Hejlsberg (@ahejlsberg) Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
|
Ryan Cavanaugh (@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? |
|
Ryan Cavanaugh (@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. cc: Jake Bailey (@jakebailey) Andrew Branch (@andrewbranch) Daniel Rosenwasser (@DanielRosenwasser) |
|
Please approve and merge...thx! |
|
Please, please, please, move this along... please! |
|
With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies). Next steps for PRs:
|
With this PR we permit constant expressions to contain
constassertions and references toconstvariables with unit types:Note that a
constvariable 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.