Skip to content

Support option to not expand type aliases in typescript #58747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
madcampos opened this issue Jun 2, 2024 · 2 comments
Closed

Support option to not expand type aliases in typescript #58747

madcampos opened this issue Jun 2, 2024 · 2 comments

Comments

@madcampos
Copy link

When comparing VS Code behaviour with Web Storm, type aliases are expanded, so when you have a type of like:

type TypeAlias = string;

And then use it:

const TestWithAlias: Record<TypeAlias, string> = {};

VS Code will expand the type where Web Storm will not.

It would be nice to have an option to not expand type aliases.

Here are screenshot examples of the behaviors of both IDEs, VS Code first, Web Storm second.

A screenshot of a tooltip on VS Code showing the expanded type alias, where the key is a string and not "TypeAlias".

A screenshot of similar code on Web Storm, where the tooltip shows a type without expanding "TypeAlias".

And here is the code used: https://www.typescriptlang.org/play/?#code/C4TwDgpgBAKuEEEA2BLAhgZygXih4ATigHYDmA3AFCWiRQCyaYA6isABZyTLoYDSEEDigAlCAGMA9gQAmAHi6JUmADR5CJUgD4qlKcXxQA7gUlkBIRQC4GTVh0U9MF4QG8AvuSA

@mjbvz mjbvz transferred this issue from microsoft/vscode Jun 3, 2024
@mjbvz mjbvz removed their assignment Jun 3, 2024
@jcalz
Copy link
Contributor

jcalz commented Jun 3, 2024

duplicate of or at least strongly related to #45954

@madcampos
Copy link
Author

@jcalz yes, it seems like this is a duplicate. I'll close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants