Many languages have type aliases, that is, a way to define a short name for a complex (maybe templated) type. For instance in C++ I have this:
using SymbolMap = std::map<SymbolKind, std::map<string, Context*>>;
Now in TypeScript I have fields with this type as well:
class SymbolTable {
...
private _localSymbols: Map<SymbolKind, Map<string, Context>> = new Map<SymbolKind, Map<string, Context>>();
static private _globalSymbols: Map<SymbolKind, Map<string, Context>> = new Map<SymbolKind, Map<string, Context>>();
}
which is, mildly said, ugly. Is there a way to make this a bit more reader friendly?