Skip to content

Way to expand complex type aliases (Awaited, ReturnType, typeof etc.) #2654

Closed
@typeofweb

Description

@typeofweb

Search Terms

Awaited, ReturnType, typeof

Problem

I often have types that rely on the implementation, i.e.:

export type Product = Awaited<ReturnType<typeof getProduct>>;

Currently, the documentation generated for such type is:

Product: Awaited<ReturnType<typeof getProduct>>

It's not instantly useful to the users.

Suggested Solution

Expand the type to the extent that the TypeScript language server does by default. In this case, it shows an object – all aliases are squashed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions