DevTips Daily: The Typescript constructor function

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024
  • ⭐️ Check out more DevTips Daily ⭐️
    ↳ • DevTips Daily: The Hid...
    Got a suggestion for a DevTip? Let me know in the comments or find me on Twitter @codebubb ( / codebubb )
    #devtipsdaily Channel Handle @codebubb

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

  • @meka4996
    @meka4996 8 месяцев назад +1

    Very good! Thanks

  • @pepelaugh3993
    @pepelaugh3993 2 года назад

    Thank you very much!

  • @mrkinetic
    @mrkinetic 2 года назад

    I didn't know this existed until some generated code mysteriously didn't work with babel. Yay.

  • @yosipipi
    @yosipipi Год назад

    in my linux it was shfit+cntrl+(up/down)key

  • @neontuts5637
    @neontuts5637 2 года назад +1

    Explained it very well. At 4:30 isProDev value is undefined. How to set a default value "false".

    • @137dylan
      @137dylan 2 года назад +2

      I think assigning a default value as a parameter in the constructor instead of making it optional with the ? operator will by default assign the isProDev property without having to pass it in when the instance of Sarah is created

    • @neontuts5637
      @neontuts5637 2 года назад +2

      @@137dylan Thank You :) Like this `public isProDev: boolean = false` ?

    • @137dylan
      @137dylan 2 года назад +2

      @@neontuts5637 Yes. I can’t try it as I’m on the road. Passing in true when creating the instance of Sarah will then overrule it

    • @neontuts5637
      @neontuts5637 2 года назад +2

      @@137dylan Yes, I tried it's working Thanks again :)

    • @codewithbubb
      @codewithbubb  2 года назад +2

      Thanks @137dylan!