Until now, I thought I didn't have much control over Typescript, now I am very sure I don't hahaha. Very good video, great explanation, I have always seen the Never type and did not know its purpose.
Interesting enough, this is the deifnition of Omit: type Omit = Pick; type Exclude = T extends U ? never : T; type Pick = { [P in K]: T[P]; }; In other words, never is the exactly tool that it uses to omit keys too!
Omg that last part at the end was something I have been thinking about for MONTHS and could never ;) figure out why!! Thank you so much.
I have NEVER heard such a good explanation
man, your channel is such a hidden gem! you are amazing!
Thank you very much. Appreciate it 🙏
Until now, I thought I didn't have much control over Typescript, now I am very sure I don't hahaha. Very good video, great explanation, I have always seen the Never type and did not know its purpose.
For the filter properties, we can also use Omit type in typescript.
Interesting enough, this is the deifnition of Omit:
type Omit = Pick;
type Exclude = T extends U ? never : T;
type Pick = {
[P in K]: T[P];
};
In other words, never is the exactly tool that it uses to omit keys too!
What extension are you using by typing // ^?
This is an extension I‘ve created myself called „WiTT“ plugins.jetbrains.com/plugin/23294-witt--typescript-type-hints-like-in-the-ts-playground