Is there a way to get typescript key suggestions in the order they were declared, as opposed to alphabetical?
If I have a string enum:
export enum Fruits {
PEARS = "PEARS",
APPLES = "APPLES",
PEACHES = "PEACHES",
BANANAS = "BANANAS"
}
My intellisense suggestions for Fruits. appear as:
APPLES
BANANAS
PEACHES
PEARS
It's trivial but I like to destructure my objects and have to frequently reorder them to preserve my sense of structure.
Some meaningful examples:
export enum StatusA {
start = 'start',
finish = 'finish',
}
Suggests:
finish
start
And
type Item = {
id;
name;
title;
description;
anOptionalField?;
theLeastUsedField?;
}
Suggests
anOptionalField
description
id
name
theLeastUsedField
title