GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Enum unification and improvements by ahejlsberg · Pull Request #50528 · microsoft/TypeScript Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TypeScript Bot (@typescript-bot) pack this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Ryan Cavanaugh (@RyanCavanaugh), I've started to run the tarball bundle task on this PR at 50a952b. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
TypeScript Bot (@typescript-bot) test this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at 50a952b. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the abridged perf test suite on this PR at 50a952b. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the parallelized Definitely Typed test suite on this PR at 50a952b. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the diff-based user code test suite on this PR at 50a952b. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Anders Hejlsberg (@ahejlsberg) Here they are:Comparison Report - main..50528
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Anders Hejlsberg (@ahejlsberg) Here are the results of running the user test suite comparing Everything looks good! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've run the RWC suite on this PR - assuming you're on the TS core team, you can view the resulting diff here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hey Ryan Cavanaugh (@RyanCavanaugh), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
TypeScript Bot (@typescript-bot) test this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the diff-based top-repos suite on this PR at 3f66f6c. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the diff-based user code test suite on this PR at 3f66f6c. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the abridged perf test suite on this PR at 3f66f6c. You can monitor the build here. Update: The results are in! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Heya Anders Hejlsberg (@ahejlsberg), I've started to run the extended test suite on this PR at 3f66f6c. You can monitor the build here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is this included in a published version of Typescript yet? Based on the comments in this PR thread, it sounds like it should be in Typescript 5. I'm on Typescript 5.0.2, but getting the error "const enum member initializers can only contain literal values and other computed enum values.", which I believe shouldn't happen if I'm on a version of typescript that includes this code? I'm copying the example from the PR: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Alex von Brandenfels (@Sweater-Baron) Yes it is, your example is working perfectly fine running version 5.0.2 (see playground). If you use VSCode make sure that you use your local TypeScript version and not VSCode's version. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Is there any plan to implement enum extension like in this playground (or some other way to extend enums)?: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I have set my vscode to use 5.0.2, but im still getting the error |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Jordan Christiansen (@JordanDC2) Not 100% exactly what you asked for.. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Colin Richardson (@WORMSS) yeah thats kind of what im having to work with currently, i just wish it was a capability of Enums since we can have computed values now but not computed keys |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Man, you saved me, thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Sounds weird, but I'm on Typescript 5.0.2. I'm forcing VSC to use the local installed Typescript version (which it recognizes is 5.0.2 instead of VSC's 4.9.5) and the enum values still get udnerlined with red squiggly line. Any ideas what I'm missing here? I see the playground link posted above by Jan (@janbiasi) and it should be working for 5.0.2. But it's not. I confirm that the project has 5.0.2 installed with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We just tried to update our code base and we noticed a ton of errors. Turns out this change basically means you cannot treat an enum as basically "just" a number anymore? No way to optionally tell TypeScript to allow "optional" values that are basically null? This is somewhat weird, because you now can't have a fall back state and HAVE to define a "NONE" type. This now is an error. Was there any reason not to allow for a fallback here? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
how come would be really useful to not have this not so obvious difference you can check some examples here |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Gabriel-Calin Lazar (@gabriel-calin-lazar) See my comment here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
tka85 any ideas about it? Also have TS above 5 and it complains |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Valery Tarelkin (@vtarelkin) Nope. No response. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
An old PR is really not the best place to ask for help or report bugs. I would really suggest filing an issue if you want it to be seen by the right people. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Jake Bailey (@jakebailey) people are searching over the whole net and hope to find a clue here) maybe you could help us please?)) I have a TS above 5th version and it still complains |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please, please, please, file an issue and fill out the template. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Jake Bailey (@jakebailey) this issues comes the first google search result. I have typescript 5.1.3 and just noticed the same problem, still trying to find any relevant tickets in this repo. If there is a solution - it might be helpful to add it here, or at least have a link somewhere in comments |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please file a new issue outlining the problem you're having |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
String enums from string constants Enable constants as computed values for string enums TS 2535 when using const enum values derived from other const enum values Enums does not support literal typing with computed values
There was an error while loading. Please reload this page.