Typescript Functions | Basics Tutorial for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 67

  • @DaveGrayTeachesCode
    @DaveGrayTeachesCode  2 ปีที่แล้ว +1

    In this tutorial, we'll learn about Typescript Aliases, Functions, literal types and the never type. If you have questions, please join my Discord server where I answer questions and you can chat with other web dev students: discord.gg/neKghyefqh

  • @smithahegade2607
    @smithahegade2607 6 หลายเดือนก่อน +1

    No waste of time.. Every bit of 30 minutes is soooo useful. Thanks a lot

  • @alseynidiop8650
    @alseynidiop8650 2 ปีที่แล้ว +3

    This comes exactly at the time I am learning typescript, you become my favorite TH-cam teacher.

  • @Scottni2
    @Scottni2 2 ปีที่แล้ว +9

    Awesome video Dave!! You are very quickly becoming my favorite web dev teacher on youtube!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +2

      Wow, thanks!

    • @EsmerEshraty
      @EsmerEshraty 4 หลายเดือนก่อน

      not only yours, if i don't know about some thing first Dave come to my mind and i say oh I should check Dave's chanel first

  • @insteresting
    @insteresting ปีที่แล้ว +1

    Awesome tutorial as always!! I noticed that at 30:58, you could also return directly typeof value === 'number', without explicitly using the ternary statement and it would work fine as well.

  • @annusingh4694
    @annusingh4694 2 ปีที่แล้ว +2

    Loving the Typescript series 💯

  • @ahmad-murery
    @ahmad-murery 2 ปีที่แล้ว +5

    Although I don't use it often, but once you get used to typescript it's hard to get back to regular JavaScript.
    1:42 I think we can make use of the already declared type stringOrNumber like this:
    type stringOrNumberArray = stringOrNumber[]
    Thanks Dave,

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      Absolutely! Applying one example to the next - good work my friend!

  • @MOJICA7257
    @MOJICA7257 2 ปีที่แล้ว +3

    Thanks Dave! 🙂

  • @mariolazzari
    @mariolazzari 2 ปีที่แล้ว +1

    This lesson is really full of useful tips: great job!

  • @andresbreuer
    @andresbreuer 2 ปีที่แล้ว +1

    As always Dave... amazing series!! Thank you so much!!

  • @k303k
    @k303k ปีที่แล้ว

    very clear explanation and worth learning!

  • @wisekid7488
    @wisekid7488 2 ปีที่แล้ว +2

    Good job Dave! Keep going! Thanx 🤝👍

  • @flowerofash4439
    @flowerofash4439 ปีที่แล้ว

    this is probably infinitely more easier than scrollling through typescript documentations, thank you sir

  • @mostafaentezami8951
    @mostafaentezami8951 ปีที่แล้ว

    Thank you for your excellent teaching method🙏

  • @7doors847
    @7doors847 2 ปีที่แล้ว +1

    Yepppppp! More TS 🔥!

  • @TravinskiyVladislav
    @TravinskiyVladislav 2 ปีที่แล้ว +1

    Thank you, Dave

  • @siddiqahmed3274
    @siddiqahmed3274 2 ปีที่แล้ว +2

    gold content👑❤️

  • @LevPleshkov
    @LevPleshkov 2 ปีที่แล้ว +2

    31:00 Why not just ``` return typeof value === 'number' ``` ?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +3

      Good point - here I go again being over-explicit 😆

    • @LevPleshkov
      @LevPleshkov 2 ปีที่แล้ว +1

      @@DaveGrayTeachesCode Thanks, I think that's never a bad practice! I thought there might have been some 'gotcha' I didn't know about =D

  • @sonamohialdin3376
    @sonamohialdin3376 2 ปีที่แล้ว +1

    Amazing tutorial thank you very much

  • @moneyfr
    @moneyfr ปีที่แล้ว

    Thank you for your work I really like your videos.

  • @lahcenaouina
    @lahcenaouina 9 หลายเดือนก่อน

    Hi dave thank u so much for effort u are from my fav yt , please can u do Java EE and Spring boot pleassse

  • @rahmatyousefi8273
    @rahmatyousefi8273 2 ปีที่แล้ว +2

    Thank you

  • @reeteshvirous1359
    @reeteshvirous1359 2 ปีที่แล้ว +1

    As always 🔥

  • @natediaz406
    @natediaz406 ปีที่แล้ว

    When i see your these tuts , i feel ts is really need to use

  • @PavithranLion
    @PavithranLion 2 ปีที่แล้ว +1

    Thanks sir🙏💕

  • @IramKahkashan
    @IramKahkashan 2 ปีที่แล้ว

    Hi Dave, Thank you to provide such a precise and awesome tutorial, Tell me one thing plz in VS Code I want to view the basic code of .push function, how can I view the source code of .push function or any function just like useSate() hook function or any other hook?

  • @aladdindesign9218
    @aladdindesign9218 2 ปีที่แล้ว +1

    So interesting.

  • @noSweatSuperDry
    @noSweatSuperDry ปีที่แล้ว

    The lessons are great, but it would be great, if you gave us some problem in between to solve, which makes channel and viewers more interactive. But, thank you very much for your lessons.

  • @Grishopping
    @Grishopping 2 ปีที่แล้ว +2

    Thank you DAVE day by day I am advancing with your excellent pedagogy of your videos... A query the end of this series of TYPSCRIPT videos will only cover javascipt or do you plan to extend it to use in REACT
    Jose Grillo greets you from Venezuela
    ESPAÑOL
    Gracias DAVE dia a dia voy avanzando con tus excelente pedagogia de tus videos... Una consulta el acande de esta serie de videos de TYPSCRIPT solo cubrira javascipt o lo piensas extender para usar en REACT
    Te saluda Jose Grillo desde Venezuela

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      Thank you, Jose! I will bring in some React before this series is finished 💯

    • @Grishopping
      @Grishopping 2 ปีที่แล้ว

      @@DaveGrayTeachesCode Excelente muchas Gracias amigo DAVE

  • @djumarong
    @djumarong 2 ปีที่แล้ว +1

    it's redundant to use the ternary operator here: typeof value === 'number' ? true : false

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว +1

      I can be overly explicit at times. I would need to review the code to see the example or you could provide a timestamp.

  • @moneyfr
    @moneyfr ปีที่แล้ว

    can you do some small exercises to apply all that you teach us

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  ปีที่แล้ว

      This series has a couple of projects to pull everything together.

  • @loukhai
    @loukhai ปีที่แล้ว

    😊 ✌️ peace

  • @dzhaniivanov5837
    @dzhaniivanov5837 2 ปีที่แล้ว +1

    youtube algorithm

  • @DiegoBM
    @DiegoBM 2 ปีที่แล้ว

    They shouldn't have allowed the interface with a method to be valid for a function signature... it sure looks hacky, counterintuitive, and hard to read

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      Opinions vary on the usage of types and interfaces.

    • @DiegoBM
      @DiegoBM 2 ปีที่แล้ว

      @@DaveGrayTeachesCode I definitely get the confusion when it comes to objects, but a type definition for a function signature based on interfaces truly feels unnatural (in my opinion, of course)

  • @kim92se64
    @kim92se64 2 ปีที่แล้ว

    watching 15 minutes

  • @Pareshbpatel
    @Pareshbpatel ปีที่แล้ว

    {2023-03-16}

  • @kenansari
    @kenansari 2 ปีที่แล้ว +1

    Hey thanks its great content, i wonder you will merge it with React?(react+typescript)

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      I will add some React to this series before it is finished.

    • @kenansari
      @kenansari 2 ปีที่แล้ว

      @@DaveGrayTeachesCode thank you for your help

  • @mikayilaliyev442
    @mikayilaliyev442 2 ปีที่แล้ว

    I get "Cannot find name 'createError'.ts(2304)" when I do return createError('something')

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 ปีที่แล้ว

      Did you try the first result in Google?
      stackoverflow.com/questions/71918235/cannot-find-name-createerror-ts2304