mylesmmurphy / prettify-ts

Prettify TypeScript: Better Type Previews
https://marketplace.visualstudio.com/items?itemName=MylesMurphy.prettify-ts
MIT License
263 stars 8 forks source link

Omitting type doesn't work correctly #49

Closed Niewdanka closed 2 weeks ago

Niewdanka commented 2 weeks ago

Hi! Omitting types doesn't work correctly when hovering over the main type. However, it works correctly when hovering over a nested property.

Example types:

Zrzut ekranu 2024-11-10 o 17 52 16

Here is type when i hover Main type:

Zrzut ekranu 2024-11-10 o 17 52 23

Here when i hover nested prop in Main type:

Zrzut ekranu 2024-11-10 o 17 52 27
mylesmmurphy commented 2 weeks ago

Hey @Niewdanka! Thanks for mentioning this. What you are seeing is actually the default behavior of this extension, which aims to provide a better preview, but not necessarily complete type information. However, this is all customizable to your liking. You should be able to go into the extension's settings and modify the "depth" property to a higher value (default is 1), which will then show deeply nested complex types at the root level. Please let me know if you have any questions or suggestions! 😄

Niewdanka commented 2 weeks ago

Thank you for the clarification! It works as expected :D