String literals are already valid types now. This is very nice, but I would like the ability to use const enum members to the same effect. They don't change, they take a lot less memory, and they're faster to check. Plus, you have a clearer distinction of what the type is, where strings are pretty free-form at times.
// NowtypeNodeType="start"|"end";// etc.interfaceNode{type: NodeType;}interfaceStartNode{type: "start";}// What I'd like:constenumNodeType{Start,End,// etc.}interfaceNode{type: NodeType;}interfaceStartNode{type: NodeType.Start;}
String literals are already valid types now. This is very nice, but I would like the ability to use const enum members to the same effect. They don't change, they take a lot less memory, and they're faster to check. Plus, you have a clearer distinction of what the type is, where strings are pretty free-form at times.