# How to Console.log Typescript Type Output Value

Short answer is: [You can’t](https://stackoverflow.com/questions/62028427/how-to-use-ts-type-as-a-value)

But there are other options! These options help you:

* Expand the … N more … values in your intellisense pop-up window
    

* Expand Type contracts to view all properties in a combined type without using the subtype names.
    

## 1 - Use Expanded Intellisense in VSCode

In your `tsconfig.json` add `"noErrorTruncation": true,` like so:

```typescript
{
  "compilerOptions": {
    "noErrorTruncation": true,
    "target": "es2016",   
    ...
  }
}
```

### Before Expanded Intellisense

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738419874911/b9405b6b-7556-4495-88f4-f379189bb1c3.png align="center")

### After Expanded Intellisense

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738420405945/f521c048-23a2-4578-b8ef-1ba9659ac99b.png align="center")

For more on this see this [Stackoverflow thread](https://stackoverflow.com/questions/53113031/how-to-see-a-fully-expanded-typescript-type-without-n-more-and)

## 2 - Use Helper Functions

These are sourced from [this stackoverflow thread](https://stackoverflow.com/questions/57683303/how-can-i-see-the-full-expanded-contract-of-a-typescript-type)

```typescript
export type Expand<T> = T extends (...args: infer A) => infer R
  ? (...args: Expand<A>) => Expand<R>
  : T extends infer O
  ? { [K in keyof O]: O[K] }
  : never;

export type ExpandRecursively<T> = T extends (...args: infer A) => infer R
  ? (...args: ExpandRecursively<A>) => ExpandRecursively<R>
  : T extends object
  ? T extends infer O
    ? { [K in keyof O]: ExpandRecursively<O[K]> }
    : never
  : T;
```

### Before Helper Functions

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738420635822/01a62575-59c6-4129-99cf-d70f36b76c62.png align="center")

### After Helper Functions

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738420684242/b025607d-f916-4cb5-ba96-0c90b57f48bc.png align="center")

## Did you know?

Typescript has a hard limit of 25 members when using union of mapped types?

If like me you didn’t and find it interesting you can [read more about it here.](https://github.com/microsoft/TypeScript/issues/40803)  
  
**That’s all for now.**  
  
If you found this useful please like, share, or comment with other methods you use to inspect the expanded value of your typescript types.
