Description
TypeScript Version: 3.0.1
Search Terms: noErrorTruncation
In TS 2.9, if noErrorTruncation
is unset, or set to false
, hovering the cursor over an identifier for type inference in VS code would bring up a tooltip with the inferred type.
In TS 3.0, if noErrorTruncation
is unset, or set to false
, the tooltip with the inferred type will be truncated with ellipsis.
Code
TS 2.9, with noErrorTruncation : false
/*snip*/
__canAccept: {
page?: string | number | null | undefined;
itemsPerPage?: string | number | null | undefined;
};
}
TS 3.0 with noErrorTruncation : false
/*snip*/
__canAccept: {
...;
};
}
Expected behavior:
noErrorTruncation
is about truncating errors.
The tooltips displaying inferred types aren't errors, and should not be affected by this flag.
Actual behavior:
noErrorTruncation
affects tooltips displaying inferred types.
If anyone else is having this problem, just go to your tsconfig.json
, add the following line,
"noErrorTruncation": true,
and restart VS code (or your editor of choice)