All You Need To Know About TypeScript

Поділитися
Вставка
  • Опубліковано 15 лип 2024
  • Is TypeScript better than JavaScript? Does TypeScript work with React and Angular? Should you learn TypeScript? In this video, I cover everything you need to know about TypeScript.
    AlgoExpert: www.algoexpert.io/clem
    SystemsExpert: www.systemsexpert.io/clem
    My LinkedIn: / clementmihailescu
    My Instagram: / clement_mihailescu
    My Twitter: / clemmihai
    Prepping for coding interviews? Practice with 85 video explanations of popular interview questions and a full-fledged coding workspace on AlgoExpert: www.algoexpert.io (use "clem" promo code for a discount!)
  • Наука та технологія

КОМЕНТАРІ • 652

  • @clem
    @clem  4 роки тому +298

    😏

    • @user-do5iq7hk7g
      @user-do5iq7hk7g 4 роки тому +6

      I was legit curious about the reasons and it was starting to make some sense somehow until you reminded me it was April Fools lol.

    • @tradingbills4178
      @tradingbills4178 4 роки тому +5

      almost had to unsubscribe until the April Fools announcement made it ok

    • @joepotentier
      @joepotentier 4 роки тому +3

      You got me. I was like "Why tf would he migrate his entire code base to TS when he hates it???" and then I looked at the date. TS is soooo much better to work with

    • @dwhdai
      @dwhdai 4 роки тому +1

      you got me

    • @grasstogains756
      @grasstogains756 4 роки тому

      Could you make a video about your thought on post graduate studies as a software engineer

  • @omarathon5922
    @omarathon5922 4 роки тому +547

    I was so confused when you were saying "TypeScript is bad because it eliminates errors." lmao

    • @bobbycrosby9765
      @bobbycrosby9765 4 роки тому +23

      I know many C++ programmers that actually say things like this with a straight face.

    • @prashantsurti5788
      @prashantsurti5788 3 роки тому +7

      @@bobbycrosby9765 they are right

    • @dand4485
      @dand4485 3 роки тому +4

      @@bobbycrosby9765 Might assert what kind of errors. Easy typos especially when variable/member names might be really close getting a type error is just what is needed at compile time. Easy to agree it isn't a magic silver bullet, any bit helps. My biggest reason i hated javascript for so lot was all the string assignments without any type checking...

    • @Jonathan-qz9td
      @Jonathan-qz9td 3 роки тому

      Same, I was like WHAT?

  • @devrafed
    @devrafed 4 роки тому +140

    Finally a guy who shows the code instead of blabbering whats good and bad.

  • @bawad
    @bawad 4 роки тому +291

    Good effort Clément but you're going to have to try harder to convince me TypeScript is good, I'm not buying it.
    1. TypeScript code is hard to read therefore hiding bugs
    2. JavaScript has types too
    3. TypeScript error messages are cryptic
    4. TypeScript is a tax on your time

    • @clem
      @clem  4 роки тому +143

      Not gonna lie, I legit thought this was a serious comment for the past hour. It just hit me that this is just a next-level April Fool's joke 🤦‍♂️But wait...this _is_ a joke right?!

    • @RiversDelay
      @RiversDelay 4 роки тому +21

      @@clem sure is, ben is a big typescript enthusiast

    • @vinceramcesoliveros6739
      @vinceramcesoliveros6739 4 роки тому +15

      I'm offended about this. ECMAScript is still the best programming language for the web.
      1. Backwards compatibility.
      2. Supports TC's proposal
      3. Less bugs
      4. More features than JavaScript

    • @ericzorn3735
      @ericzorn3735 4 роки тому +4

      Your video got me too @Ben Awad

    • @suyash.01
      @suyash.01 4 роки тому +7

      @@clem He got you

  • @irvinge4641
    @irvinge4641 4 роки тому +103

    just make sure to put this at the top of every file and everything should work:
    /* tslint:disable */

    • @clem
      @clem  4 роки тому +18

      🤣

  • @krikuff
    @krikuff 4 роки тому +94

    First 1.5 minutes made me laugh a lot. Clem you are the best

  • @alonsogonzalez1958
    @alonsogonzalez1958 4 роки тому +21

    Hey Clément, I am an applied mathematician working at finance that programs in Python and R. I really like the content like this; though I'm not interested in applying to a tech company, I appreciate the input you give to the community. Keep it doing...for me to subscribe!

  • @xpfe5zrm
    @xpfe5zrm 4 роки тому +218

    "Because JavaScript doesn't give a f..." those intentional cuts get me every time.

    • @yisroelarnson9881
      @yisroelarnson9881 4 роки тому +6

      Hahah me too! I had laughed so hard

    • @clem
      @clem  4 роки тому +18

      😎

    • @devguyahnaf
      @devguyahnaf 4 роки тому +8

      I smashed my head on my keyboard hearing that.

    • @abdoutech6861
      @abdoutech6861 3 роки тому +1

      Lmaooooo this one killed me tooooo xDDDD

  • @bitwisedevs469
    @bitwisedevs469 4 роки тому +8

    So much fun, I try to understand the concept and the life changing brought by TS without needing to undergo actual coding because I just want to know how it is really different from a vanilla JS. You are the only one who showed to me what is TS in a nutshell in a very understandable to a strong typed PL programmer point of view.

  • @Kawaiivee
    @Kawaiivee 4 роки тому +7

    I'm like 80 videos in deep to a React course and am at the debugging parts -- I'm also mid-way therough a MEAN stack course, and this video is giving me very good supplementary context for why typescript is great

  • @opentrail
    @opentrail 4 роки тому +2

    That's another great video Clem. Your so enthusiastic and explain stuff really well on all your videos. Impressive.

  • @alphacode5
    @alphacode5 4 роки тому +2

    I already watched this when you put it out, I'm watching again AND I FELL FOR IT AGAIN

  • @sijandyola2791
    @sijandyola2791 4 роки тому +37

    I was going to defend TypeScript with my life after hearing what you said at the beginning. Well you fooled me.

    • @lorttexwolf
      @lorttexwolf 4 роки тому +1

      Sijan Dyola Same I was about to go ham.

  • @kefamutuma6516
    @kefamutuma6516 4 роки тому +2

    You were answering most of my questions real time as they popped in my mind. Great video.

  • @curtisleow
    @curtisleow 4 роки тому +91

    Hey when you're showing us code, you should zoom in several times. A lot of times I'm watching UA-cam on my phone, or in a window to the side. Small text can be difficult to read in that format. You can zoom in on VS Code with command=

    • @clem
      @clem  4 роки тому +53

      Thanks for the feedback; I had actually zoomed in already, but clearly not enough! I'll be sure to do it more next time!

  • @anna-ripley
    @anna-ripley 2 роки тому +2

    Such an incredible good explanation! Fun, educational and to the point. I was trying to get through a very boring video on LinkedIn Learning about Typescript. This is much better! Thanks a lot, I've subscribed and look forward to watching more videos 😊

  • @jackwinterburn7703
    @jackwinterburn7703 4 роки тому +51

    Clément 5 months ago:
    "Redbull please sponsor me"
    Clément nowadays:
    Has 3 monster cans in the background 😂

    • @codeforest9027
      @codeforest9027 3 роки тому

      Well thats because RedBull *didn't* sponsor him

  • @ponylucifel
    @ponylucifel 4 роки тому +21

    Lol I thought your were serious at first and I was like wtf?😂
    One other thing I like about typescript is that when used with frameworks like Angular, it serializes and deserializes custom objects pretty well. Cool video Clem! I finally subscribed!

    • @clem
      @clem  4 роки тому +4

      Mission accomplished; and agreed, that's an additional benefit! Awesome to hear that you subscribed! 💪

  • @MrTaraskoro
    @MrTaraskoro 4 роки тому +43

    Junior JS Dev: "Why I'm seeing this unreadable error in console?"
    Senior JS Dev: ua-cam.com/video/QLxw-2dVUsE/v-deo.html

  • @Fcycfvyvvyvtfutg
    @Fcycfvyvvyvtfutg 3 роки тому

    Finally I have a better understanding of typescript after coming across it so many times in articles/other videos

  • @dheerajbhavsar9769
    @dheerajbhavsar9769 4 роки тому

    After seeing that graph, I literally hit the subscribe button. Thanks for all the free content.

  • @braden-wong
    @braden-wong 4 роки тому +5

    Love your positive energy! You definitely got me

  • @mrg3921
    @mrg3921 3 роки тому

    One of the few guys who do their job 100%! Excellent work & very usefull information! Thank you!

  • @Sam-81810
    @Sam-81810 3 роки тому

    wow! This is the best explanation of TypeScript I've seen. Thank you for this.

  • @josephwong2832
    @josephwong2832 4 роки тому +1

    Thanks for the Typescript demo Clem
    Stay safe in NY my friend!!

    • @clem
      @clem  4 роки тому +1

      Trying to!

  • @KadduLivingstone
    @KadduLivingstone 2 роки тому

    I always love watching your videos when ever i feel discouraged

  • @ahmedalsaedi3849
    @ahmedalsaedi3849 2 роки тому +1

    thanks I was leanring it and was feeling what is the big picuture of all this extra stuff I am doing. You're video really got me out fog and focus on the goal of why I am ading TS to my tools

  • @philipperocha2058
    @philipperocha2058 4 роки тому

    Great video! You explain very well, very clear...straight forward.

  • @ilyesmilyesm2576
    @ilyesmilyesm2576 4 роки тому +4

    so informative and really well explained, you should create some coding tutorial man!

  • @MultiWillow33
    @MultiWillow33 3 роки тому +6

    Fun fact: I got this recommended almost exactly one year later. It still feels like being fooled on april fool's day.

  • @DioArsya
    @DioArsya 3 роки тому

    I just cannot see the beauty of typescript code you wrote while using my phone to watch this beautiful video... thx....... :)

  • @ZSonnenblick
    @ZSonnenblick 4 роки тому +3

    Not gonna lie, you had me in the first minute; credit to you keeping a good poker face.
    "Reasons why I'm not a fan: Typescript basically eliminates 90% of bugs. It kind of takes away the challenge and the fun from coding" 😂 was so confused at first

  • @islandcave8738
    @islandcave8738 2 роки тому +1

    You could put type checking and invalid type error handling on all your arguments at the beginning of every function, as well as branching for overloading different types, but that just clutters your code.
    If you are the only person using your functions, you could make sure you only pass the right types of arguments, and just rely on fixing runtime bugs, can work ok if those bugs appear early in the runtime progress. Not the best, but can work ok, and I've been using that.
    Been thinking about migrating to typescript.

  • @harispapadopoulos4295
    @harispapadopoulos4295 4 роки тому +2

    Clement’s videos are the best! Can we get a setup/ desktop tour ?

  • @jaytran247
    @jaytran247 2 роки тому

    I want to thank you so much for making this video and I tell that I really enjoy that I like this video of yours pretty much in many ways.
    - You have a very interesting introduction about typescript that I would say that make it so unique.
    - You have presented and answered most of the questions for guys that first hit themself with typescript like me.
    - I really like your way and gestures while explaining thing that make me laugh so much lol.
    Thanks again. Great Job !!!

  • @patricknebe6030
    @patricknebe6030 4 роки тому +1

    Lol glad you’re okay. I was wondering why you hadn’t put out a new video yet. Stay safe man.

  • @briandesign
    @briandesign 4 роки тому +1

    new to code, so have no idea what this is lol, but eventually will learn about it in the future

  • @mstalcup
    @mstalcup 3 роки тому

    This is very helpful in understanding the value of adding Typescript to a development toolset. I would have bumped up the font size a couple of notches. Edit: I just configured Accessibility preferences in Mac to provide Zoom using scroll gesture plus control key modifier. Yay.

  • @abhaytiwari6411
    @abhaytiwari6411 4 роки тому +2

    In Lockdown period.
    i am watching your video
    it's realy helpfull clem

  • @Vellutia
    @Vellutia 4 роки тому +6

    I love Dart, would be easy to learn TypeScript to widen my skill on web development

  • @gioelem5957
    @gioelem5957 4 роки тому +4

    I really like this kind of video. I was already sub, I'm going to activate the bell. More video like this would be appreciated!

  • @tarasvynnychuk4153
    @tarasvynnychuk4153 4 роки тому +1

    Really cool video! That's so great you combine jokes and really useful stuff! That what makes it so interesting to watch every time. What do you think about "unknown" vs "any" by the way? Are there any cases when "any" is better in your opinion?

  • @cabejackson7518
    @cabejackson7518 3 роки тому

    Nice video! Thanks for the intro to typescript 😄

  • @leeduhart105
    @leeduhart105 3 роки тому

    watched your Apr 1 video, and you twisted my arm, so I subscribed... Your awesome and I love your energy.

  • @Btc314btc
    @Btc314btc 4 роки тому +18

    How about a video explaining javascript frameworks like React and Angular and your experiences with them? Btw, im subscribed 👌🏼

    • @clem
      @clem  4 роки тому +12

      I'll try to do that! And awesome! 👌

  • @shaigrustamov5115
    @shaigrustamov5115 2 роки тому

    Today on an April day I watched the video and found it great. Very very well explained. Thanks :)

  • @maxima-4270
    @maxima-4270 4 роки тому +2

    thnx Clement.
    the reason people aren't subscribing to your channel is probably because your channel IS NOT a tutorial channel like traversy media or mycodeschool. I think if you put more tutorial videos that give specific knowledge in algorithms and technologies, then you'll see a surge in subscriptions

  • @saurabhsoni1759
    @saurabhsoni1759 4 роки тому

    I really like your style, thanks for sharing your knowledge.

  • @marcyvillegas5443
    @marcyvillegas5443 Рік тому

    This is an old video but thanks clement for persuading me to study typescript!

  • @icewizard3664
    @icewizard3664 3 роки тому

    This has to be the funniest video that I have seen so far of Clément.

  • @serhiimamedov
    @serhiimamedov 3 роки тому +2

    You can also use TS with nodejs.
    I'd say it's even more useful and easy to use on backend

  • @aleximre3110
    @aleximre3110 2 роки тому

    Really useful vid! I now get Typescript! Thanks :)

  • @rohansreerama5357
    @rohansreerama5357 4 роки тому

    Loved this thanks a lot!

  • @Pau_Pau9
    @Pau_Pau9 4 роки тому

    You got me bro!
    Subscribed!

  • @tariqrasheed1984
    @tariqrasheed1984 4 роки тому

    Thank you dear for sharing your knowledge.

  • @CodewithChristheFreelancer
    @CodewithChristheFreelancer Рік тому

    I think I finally understand the hype with Typescript after watching this. Good work!

  • @ayabochman5453
    @ayabochman5453 3 роки тому

    Finally! an amazing explanation!

  • @Metruzanca
    @Metruzanca 4 роки тому +22

    The true april fools is when at 10:19 you say google and my android is like "I'm listening, whats up?"

  • @kavr
    @kavr 4 роки тому

    love your presentation style :)

  • @mhmd25177
    @mhmd25177 2 роки тому

    This is the best video that describes the TS and it's power :-)

  • @celry5361
    @celry5361 2 роки тому +1

    When you said you weren't a fan of TS I was actually smashing the like button lol

  • @waseemabbas7514
    @waseemabbas7514 3 роки тому

    Hi, Buddy I truly fell for your April fool trick!😁I loved the way you explained everything! I hope to beat you and Ben Awad in Typescript friendly challenge someday!

  • @Fcycfvyvvyvtfutg
    @Fcycfvyvvyvtfutg 3 роки тому

    Great great vid! Loved it!

  • @samirawad7706
    @samirawad7706 4 роки тому

    Thanks for your effort

  • @hakhinds
    @hakhinds 4 роки тому +1

    Amazing video Clem. Doing it today! Question: why didn’t you build ALGOEXPERT up using typescript from the beginning?

  • @sourabhvaishnav8235
    @sourabhvaishnav8235 3 роки тому

    Your expertise in the stuff, experience with tech giants like google and facebook, it's all visible in the way you speak. That confidence comes along.

  • @neosapien247
    @neosapien247 4 роки тому

    Your videos are awesome. I've been watching them without subscribing. I did today.

  • @BobcatMoviesInc
    @BobcatMoviesInc 4 роки тому

    Not even a front-end engineer, but you've convinced me to hop into the Typescript pool.

  • @chrispeng5502
    @chrispeng5502 4 роки тому +2

    At it’s core, typing is free unit test for your codebases. None of the bugs would happen if you wrote unit tests. The thing is, when a team is not bothering with unit testing the shit out of their code, they generally don’t give a fuck about their typing. I have seen many typescript filled with any, many java code filled with map and angry casting.
    Funny how typescript truly helps a team that has already unit testing since it frees them from many tedious coding, but make a lot of noises at the hands of team that doesn’t care in the first place.

    • @aussieexpat
      @aussieexpat 4 роки тому

      But... those type problems can still happen in prod (because it's still just javascript at runtime). But now you no longer have unit tests covering those areas?

    • @chrispeng5502
      @chrispeng5502 4 роки тому

      @@aussieexpat No those problems won't happen in production because you've already fixed it. And typescript will not cover you in production because it just translates your code into normal javascript.

  • @pannihto7588
    @pannihto7588 4 роки тому

    I'd really like to know more about naming conventions for types and interfaces and file structure for React + Redux + Typescript projects

  • @Tux0xFF
    @Tux0xFF 4 роки тому

    Subscribed, excellent comparison of JS and TS

  • @devguyahnaf
    @devguyahnaf 4 роки тому +1

    Thx Clement for this video. Helped me out because I'm learning to use JavaScript with my Flask Webpage. Can you make a video about CoffeeScript and how you made the homepage animations of AlgoExpert. Thank you for your convenience. :D

  • @tbtitans21
    @tbtitans21 4 роки тому +14

    5:44 made me literally lol

  • @DonPaul
    @DonPaul 4 роки тому +4

    OMG, my Google internship will be based on TypeScript!!

  • @chennngg
    @chennngg 3 роки тому

    awesome explanation! thanks man.

  • @karnavdesai477
    @karnavdesai477 4 роки тому +3

    You have an amazing portfolio. Can you make a video on how to stop procrastinating and get stuff done? Coz that's one thing that is pulling me down a lot

  • @bot_matrix
    @bot_matrix 2 роки тому

    ok you got me. liked and subscribed! Love the channel Clement. Will buy AlgoExpert Web Development package soon!

  • @ericsproles
    @ericsproles 4 роки тому

    awesome video! Make more like this one. Subbed!

  • @quangvo4563
    @quangvo4563 4 роки тому

    You got me !!!. Now I'm gonna smash the like button twice

  • @jestingigi4261
    @jestingigi4261 2 роки тому

    Best Explaination on youtube!!!

  • @emersonjjsouza
    @emersonjjsouza 2 роки тому

    nice arguments about the use of Typescript nowadays. keep going with this nice job.

  • @firststrandtypename1866
    @firststrandtypename1866 9 місяців тому

    Bro, Im not going to lie. You got me at first. I was like 'finding bugs before runtime? sounds chill.' then you said something about challenging yourslef as a developer and I swear to the almighty I heard David Goggins calling laughing at me and calling me weak on the back of my mind.. thanks man this video helped me a great deal. take love

  • @davide4607
    @davide4607 4 роки тому +2

    I'm proud of myself I just started learning programming and was able to spot the bug.

  • @ben7226
    @ben7226 3 роки тому

    you are amazing dude !!!
    you really deserve a sub 😉

  • @darkogele
    @darkogele 4 роки тому +1

    If you like Ts that much just try C# is made from the same person :) Also for frontend devs now you can use it with webassembly

  • @mattmidtvedt2555
    @mattmidtvedt2555 4 роки тому

    You really did get me. I couldn’t believe what I was hearing...

  • @ismaeltechnow
    @ismaeltechnow 4 роки тому

    just subscribed. thanks for instructions :)

  • @kennyhendricks4293
    @kennyhendricks4293 4 роки тому +1

    From the get-go I knew you were messing around, it is impossible to not like TypeScript. It is hands down the best practice guys and gals...

    • @aussieexpat
      @aussieexpat 4 роки тому

      I dislike typescript. Everything you have to do for typescript is more verbose and really the worst part of programming. And your unit tests need to cover typing issues anyway because in production, typescript is just javascript so all the same bugs apply with respect to unexpected data.

  • @ryantjoa
    @ryantjoa 4 роки тому

    i love you so much clément. i look up to you.

  • @nurseitkalbaev
    @nurseitkalbaev 3 роки тому

    I think I was that person when Clement said 80% of people !!! , 80%!!!! who watches his videos are not subscribed, and I decided to smash that red button😁

  • @ostap418
    @ostap418 3 роки тому

    I just watched one video and subscribed right away after you fooled me

  • @Chi_di
    @Chi_di 4 роки тому +9

    Paused at 7:56 - the bug is that you didn’t dot into the data object to access the message property on line 9.

  • @bryanurizar
    @bryanurizar 4 роки тому

    Boom. Great video!

  • @Erenyeager50slk
    @Erenyeager50slk 2 роки тому

    you really got me i was so confused

  • @riteshpatil1422
    @riteshpatil1422 7 місяців тому

    thank you for this beautiful video

  • @lyingcat9022
    @lyingcat9022 2 роки тому

    1:40 you could be right :) But if you like eliminating bugs and runtime errors than Elm has to be up there with the best thing to happen to Frontend!

  • @bonnysinha1229
    @bonnysinha1229 4 роки тому

    Whoa...ok ok...Subscribed...there you go!!

  • @yogendrahada1972
    @yogendrahada1972 4 роки тому

    Big Fan Clement!

  • @inesborges4857
    @inesborges4857 3 роки тому

    definitely convinced

  • @JayMaverick
    @JayMaverick Рік тому

    Damn. Just started learning Javascript, I was scratching my head about these exact issues. I figured I'm just being a noob and not understanding, but something about it seemed like a fundamental problem/weakness of Javascript. I feel validated after learning about the existence of Typescript. =)