Microsoft/TypeScript
Better display representation for intersection types
Aberta
#7.705 aberto em 27 de mar. de 2016
Effort: DifficultHelp WantedSuggestion
Métricas do repositório
- Stars
- (108.860 estrelas)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
I'm not sure if this has been discussed before, but join types are mostly unreadable. I think the type should be prettified somehow before being displayed to the user.
TypeScript Version:
1.8
Code
type T1 = {};
type T2 = {test: number};
type J = T1 & T2;
Expected behavior:
var x: J;
typeof x; // {test: number}
Actual behavior:
var x: J;
typeof x; // {} & {test: number}