Bippan Kumar
Bippan Kumar

Reputation: 728

Typescript resolve type

I want to resolve type using typescript library. I want the type to be displayed as

type typeCheck = {
 name: string
} 

I am not able to find the exact typeChecker function that typescript library has to get the results.

I am using the below code but unable to get the resolved type result.

const typeChecker = program.getTypeChecker();
resolvedType = typeChecker.typeToString(type); // Pick<student, "name">

enter image description here

Upvotes: 0

Views: 27

Answers (0)

Related Questions