microsoft/TypeScript

Get type of generic type.

joesonw opened this issue · 1 comments

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?

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