Skip to content

Support option to not expand type aliases in typescript #58747

Closed

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions