Inconsistent enum literal types #61196
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
return type inference enum union literal fresh regular
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.8.0-dev.20250216#code/KYOwrgtgBAolDeUCCAaKAhKBfAUDgLgJ4AOwGA9gB4A8AKgHxQC8COUUA5sPgFxQAUASmaNaAbjZQAztz78AbgEMANmGB9awpo3nkAlgBMJWCTgPAAxssUAnMgDMwIC-j3kQUAEZU69BSrUNQT50HwZTC3cpfC8QAEZmLyp+AAZBMSgAekyKGnAIT2AbehxIkGjYgCYQn3zC4sTvSlT0rJyAeQBrPDKKwoSWJv4YADokVuzc6hgS3pjC6qmZxuTR8YzJmBsbchs0JumxxhByGMUpKT0OEEVPZTJ8ciWSoA
π» Code
π Actual behavior
be2
errorsπ Expected behavior
be2
shouldn't errorAdditional information about the issue
This is an enum-based variant of #48363 . As such it relates to the open #59754 too
The text was updated successfully, but these errors were encountered: