The Never Type Explained: Everything You Need To Know - Advanced TypeScript

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024

Комментарии • 9

  • @xorlop
    @xorlop Месяц назад +1

    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.

  • @wertig6925
    @wertig6925 3 месяца назад +8

    I have NEVER heard such a good explanation

  • @SergiobgEngineer
    @SergiobgEngineer 3 месяца назад +4

    man, your channel is such a hidden gem! you are amazing!

    • @Typed-Rocks
      @Typed-Rocks  3 месяца назад +1

      Thank you very much. Appreciate it 🙏

  • @alexandru1d60
    @alexandru1d60 2 месяца назад +1

    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.

  • @asatyammis
    @asatyammis 2 месяца назад +1

    For the filter properties, we can also use Omit type in typescript.

    • @ThiagoOliveiraSantosfaren
      @ThiagoOliveiraSantosfaren Месяц назад +1

      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!

  • @FriendlyAce
    @FriendlyAce 2 месяца назад

    What extension are you using by typing // ^?

    • @Typed-Rocks
      @Typed-Rocks  2 месяца назад

      This is an extension I‘ve created myself called „WiTT“ plugins.jetbrains.com/plugin/23294-witt--typescript-type-hints-like-in-the-ts-playground