Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Omit and definition of K

$
0
0

Why in the TypeScript built-in utility type Omit, which is defined as:

type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

does K extend keyof any rather than keyof T?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>