I have a large type like this one:
type Large = {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
} | {
foo: 123,
bar: 123,
baz: 123
}
And this is how it gets shortened in VSCode when hovered:
How do I view the hidden part? Any suggestions would be appreciated.
P.S. Of course the type I am trying to view is not that simple and it's not statically written as well.
The Activity Bar on the left lets you quickly switch between Views. You can also reorder Views by dragging and dropping them on the Activity Bar or remove a View entirely (right click Hide from Activity Bar).
Visual Studio Code includes TypeScript language support but does not include the TypeScript compiler, tsc . You will need to install the TypeScript compiler either globally or in your workspace to transpile TypeScript source code to JavaScript ( tsc HelloWorld. ts ). You can test your install by checking the version.
There is a seemingly unrelated compiler setting called noErrorTruncation
. It controls if types are truncated in errors. If you set this compiler option to true
it will also prevent type truncation in tooltips.
Note This will prevent truncation of types (the ...
part) it will not unfortunately force the expansion of mapped or conditional types.
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