---
title: "Comment by yanliang shang on \"TIL: Difference between Omit and Exclude in TypeScript\" | Hashnode"
description: "I think it&#39;s the reason for keyof You can try running the following code type A = &#x27;a&#x27; | &#x27;b&#x27; | &#x27;c&#x27; | &#x27;d&#x27; type C = key"
url: "https://hashnode.com/posts/difference-between-omit-and-exclude-in-typescript/60b61b60f4a8435c0ecc4070/comment/62696f13aedfbdb0ce1a61dc"
---

[Discussion](https://hashnode.com/posts/difference-between-omit-and-exclude-in-typescript/60b61b60f4a8435c0ecc4070)

Comment [TIL: Difference between Omit and Exclude in TypeScript](https://hashnode.com/posts/difference-between-omit-and-exclude-in-typescript/60b61b60f4a8435c0ecc4070)

[yanliang shang](https://hashnode.com/@syl)

[Apr 27, 2022](https://hashnode.com/posts/difference-between-omit-and-exclude-in-typescript/60b61b60f4a8435c0ecc4070/comment/62696f13aedfbdb0ce1a61dc)

I think it's the reason for **keyof**

You can try running the following code

```
type A='a' | 'b' | 'c' | 'd'
type C =keyof  A;
```
