-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Programmatic API (babel.transform, babel.parse)
Input code
const Cat = 10;
const Dog = 20;
enum Animals {
Cat = 1
}
enum Animals {
Dog = 2
}
enum Animals {
CatDog = Cat | Dog
}
console.log(Animals.CatDog);Configuration file name
No response
Configuration
No response
Current and expected behavior
const Cat = 10;
const Dog = 20;
var Animals = /*#__PURE__*/function (Animals) {
Animals[Animals["Cat"] = 1] = "Cat";
return Animals;
}(Animals || {});
Animals = /*#__PURE__*/function (Animals) {
Animals[Animals["Dog"] = 2] = "Dog";
return Animals;
}(Animals || {});
Animals = /*#__PURE__*/function (Animals) {
Animals[Animals["CatDog"] = 30] = "CatDog";
return Animals;
}(Animals || {});
console.log(Animals.CatDog);Current:
30 is logged
Expected:
3 should be logged
Environment
Possible solution
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue