#When checking type in vscode, it doesn't give the actual type
11 messages · Page 1 of 1 (latest)
it's not possible, what is shown in the tooltip is sometimes good and sometimes not so good
in this case typescript decided that expanding the alias was more "correct"
because the type system is structural, it doesn't matter. But there is no trick, aside from using an interface to forcing typescript to use the given type name
There are extensions like https://marketplace.visualstudio.com/items?itemName=kimuson.ts-type-expand
Extension for Visual Studio Code - vscode extension for expand type of typescript
You can force it to show with an expand type
type Expand<T> = T extends T ? { [K in keyof T]: T[K] } : never
that's not what they want
Note that this is type-unsafe and should not be recommended anymore, too.
rly? 🤔
https://github.com/microsoft/TypeScript/issues/55535 if you get more than 3 levels deep it stops checking types