You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in which case they are in order since enum assigns numbers in order.
We could technically sort keys with assigned values as long as they are adjacent:
enum Fruit {
WATERMELON,
BANANA = 'BANANA',
APPLE = "APPLE",
}
As they wouldn't impact the inferred value provided to keys without values. This would resolve your ticket.
But to respond to your statement "It seems like sortier ignores the Typescript enums. It should be sorting them by keys." the answer is yes because without values, the order of an enum is crucial to it's generated value hence why it was ignored.
However you bring up a good point that if the values are defined, we should be able to change the order. Let me think on this to see if there are scenarios I'm missing.
Language
Typescript
Sample input source code
Expected output
Actual output
It seems like sortier ignores the Typescript enums. It should be sorting them by keys.
The text was updated successfully, but these errors were encountered: