Get type of generic type. · Issue #10576 · microsoft/TypeScript · GitHub
Skip to content

Get type of generic type. #10576

Closed
Closed

Description

TypeScript Version: : 2.1.0-dev.20160721

I understand that reflect-metadata retrieves the metadata information for me. However, It can only get the outmost type.

Say, I wanted to get the return type of async function():Promise<string>, it can tells me its a promise. Same goes for Array<T>.

Is there a plan for providing nested types? Or there is already a way?

Activity

  1. mhegazy commented on Aug 29, 2016

    @mhegazy
    Contributor

    This is not possible without a full type serialization scheme. you can find a long discussion about this in #3628

  2. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design LimitationConstraints of the existing architecture prevent this from being fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions