In TS 2.9, I could get the full inferred type of an identifier by hovering over it, and waiting for the tooltip to pop up.
It appears that the behaviour changed in TS 3.0, and it's affecting my productivity; it only shows part of the inferred type and truncates the rest with ellipsis.
Is there any way I can get back the TS 2.9 behaviour of showing the full type without any truncation whatsoever?
Maybe a tsconfig.json
flag of some sort.
In TS 2.9,
/*snip*/
__canAccept: {
page?: string | number | null | undefined;
itemsPerPage?: string | number | null | undefined;
};
}
In TS 3.0,
/*snip*/
__canAccept: {
...;
};
}
It seems like the solution is to set noErrorTruncation
to true
, and then restart VS code (or your editor of choice)
I don't know why I didn't try this sooner.
I also don't know why this works because the inferred types in the tooltip aren't "errors" at all.
[EDIT]
This actually doesn't work.
This affects tooltips and declaration emits.
The only solution I can see is to just wait till this is fixed in a future version of TS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With