shaKY-iota / type-challenges

Collection of TypeScript type challenges with online judge
https://tsch.js.org/
MIT License
0 stars 0 forks source link

2852 - OmitByType #35

Open shaKY-iota opened 2 years ago

shaKY-iota commented 2 years ago
// your answers
type OmitByType<T extends object, U> = Omit<T, { [P in keyof T]: T[P] extends U ? P : never }[keyof T]>;