TypeScript Crash Course

  Рет қаралды 286,237

Traversy Media

Traversy Media

7 жыл бұрын

In this TypeScript tutorial we will look at how to install the TypeScript Compiler, all of the different data types, functions, interfaces and classes

Пікірлер: 328
@anabeatriz8835
@anabeatriz8835 3 жыл бұрын
SLIDES 00:07 - What is TypeScript? 01:12 - What does TypeScript offer? 02:45 - Static type checking 03:27 - TypeScript types 04:07 - Class based objects 05:02 - TypeScript compiler (TSC) GETTING STARTED 06:01 - NodeJS and Visual Studio Code 06:35 - Installing TypeScript 07:41 - Opening project in text editor 09:41 - DATA TYPES 15:30 - Arrays 18:52 - Tuple 20:22 - void, undefined and null 22:01 - FUNCTIONS 22:47 - getSum function 24:42 - mySum function 27:28 - getName function 29:25 - myVoid function 30:16 - INTERFACES 34:40 - CLASSES 35:26 - User class 41:05 - Member class 44:37 - UserInterface interface
@LeetCodeSimplified
@LeetCodeSimplified 3 жыл бұрын
Thanks, man!!!
@anabeatriz8835
@anabeatriz8835 3 жыл бұрын
@@LeetCodeSimplified I'm woman lol. U r welcome
@CodingTutorials360
@CodingTutorials360 6 жыл бұрын
Started a new job that uses TypeScript and Angular 4. Your crash courses are always the best to get up to speed asap.
@TraversyMedia
@TraversyMedia 6 жыл бұрын
Thanks man :) Good luck with the new job
@peggy7744
@peggy7744 6 жыл бұрын
Same here! Angular 4 and TS has been my life this week, haha :( These videos do help a lot though!
@SogMosee
@SogMosee 6 жыл бұрын
How is the job going, 5 months later?
@CodingTutorials360
@CodingTutorials360 6 жыл бұрын
Excellent!
@gopikrishnan4881
@gopikrishnan4881 5 жыл бұрын
i just started
@LookNumber9
@LookNumber9 7 жыл бұрын
Great job, Brad! I was hoping that we'd see something from you on TypeScript. Very clear and concise, as usual.
@attilagyen1446
@attilagyen1446 5 жыл бұрын
just a little note: when you create a function you can use the lambda syntax so instead of function(x: number): number { return x } you can use let x = (x: number): number => { return x } p.s. thanks for this tutorial, it was really helpful
@amannan-123
@amannan-123 3 жыл бұрын
It is a good point but your example doesn't show the best use of lambda expressions.
7 жыл бұрын
In the past couple years I went from Lamp to Java to Mean. Now after a while, I'm slow learning Ionic 3 and consequentially Angular 4 and Typescript. I thought that my heart was JS but it's TS! Omg such elegant. For those Node developers out there, give a look into Nest!!
@thriftsimple561
@thriftsimple561 6 жыл бұрын
It's super rewarding after a month of learning programming to see so much of this and get one "aha" moment after another when things are clicking (ex I knew ahead that we'd need a super() call with the child class constructor, felt good). Soooo motivated now. Thanks Brad! Your stuff has been a huge contributor! Much appreciated!!
@retiar2111
@retiar2111 6 жыл бұрын
I learned OOP in c++ and java and i was still unsecure about this. I thought theres more to it but actually its simple as it gets. TY BRAD!
@ja909
@ja909 7 жыл бұрын
One of the key advantages with Typescript compared to Javascript is that it enables better tooling. The tools such as Visual Studio Code can provide intellisense, detect more errors prior to compiling, all due to the use of types.
@alenjose3903
@alenjose3903 3 жыл бұрын
what about now? Is classes and stuff now available in Javascript?
@pauls6277
@pauls6277 3 жыл бұрын
I started a new job like 1 week ago and this crash course has helped me a lot! Can't never go wrong with your videos, thank you! :D
@uhN0id
@uhN0id 3 жыл бұрын
As always, thank you! You speak at such a perfect pace. For people like me who are experienced programmers we can speed up the video 1.5x without it sounding sped up and weird while others can listen at your normal pace so they can retain it better. Thanks for everything you do! Such a good channel!
@coding_ss632
@coding_ss632 7 жыл бұрын
I'm doing angular2 these days and this video is helpful ... Thank you very much brad. Keep posting awesome crash course & tutorials like this.
@volodymyrselevertov
@volodymyrselevertov 4 жыл бұрын
I started learn angular and for work with it I need to know TypeScript Thank you, Brad, now I have basic knowledge about TS :)
@davidofug
@davidofug 5 жыл бұрын
I have to admit, your courses are the best. Thank you Brad.
@muzafferhassan
@muzafferhassan 7 жыл бұрын
thanks for this introduction video of Typescript... you guys are doing well....
@ibrahimmohammed3484
@ibrahimmohammed3484 7 жыл бұрын
2 days ago i was searching for something similar as long as i didn't see it in your channel, thanx brad :)
@sarahmattar
@sarahmattar 4 жыл бұрын
Short, sweet, and very informative! You're distilling down what takes others a few hours to explain. Thank you Brad!
@curiousprogrammer90
@curiousprogrammer90 7 жыл бұрын
Thanks Brad! :) Keep em coming!
@User-beta8347
@User-beta8347 7 жыл бұрын
Great Video Tutorial. I have used Sublime Editor for working the TypeScript. I would like to say thankyou for providing this video tutorial.
@albertoakpos8595
@albertoakpos8595 4 жыл бұрын
Short and to the point. Nice work Brad!
@mahmoudabdelfattah9019
@mahmoudabdelfattah9019 5 жыл бұрын
Best crash course about TypeScript, thanks a lot.
@elciesstv
@elciesstv 6 жыл бұрын
Like the others, i started work in a new JS/Angular5 project in my actual job, and i rly need to say ty for this crash course, i just love the way u explain. Already bougth Angular, bootstrap and JS courses at udemy!
@Drag0n_Master_
@Drag0n_Master_ 7 жыл бұрын
Thanks for the video, it's a nice overview of TypeScript - exactly what I was looking for!
@mehmedbazdar9038
@mehmedbazdar9038 7 жыл бұрын
Great tutorial as always. It looks like the syntax of TypeScript is similar to that of C# and Java :D
4 жыл бұрын
Came here to learn TS in order to understand better the Deno JS engine. Thanks for sharing. 👏🏽 The TS classes remind me the time developing using Java on the university projects. ;) Good old times I could say. 😊
@egro-marketplace
@egro-marketplace 5 жыл бұрын
Your courses are always efficient and clear !!!Your courses are always efficient and clear !!!
@ASoftwareEngineer
@ASoftwareEngineer 7 жыл бұрын
thanks so much, been learning much from your playlist, keep up the great work. Great for FE community
@samuelweb6595
@samuelweb6595 7 жыл бұрын
Great tutorials Sir. God Bless You!!
@daniel71626
@daniel71626 5 жыл бұрын
I am going to use typescript on my job, So this is nice to have.
@GaryParkin
@GaryParkin 7 жыл бұрын
Thank you! Finally I understand why I'd want to use TypeScript.
@nanonerd100
@nanonerd100 7 жыл бұрын
Nice intro to cover basics. Would be nice if at the end, you spent 30 sec to explain the point/benefit of creating the UserInterface interface. Thanks !
@sugaadai
@sugaadai 5 жыл бұрын
Because class User is not a type
@NeuePerspektiveCH
@NeuePerspektiveCH 5 жыл бұрын
Was just going to write the same exact thing .... last 4 or 5min were a bit fast and feel incomplete
@TroenderTass
@TroenderTass 4 жыл бұрын
Yeah, It's not explained, only demonstrated. But for those that might not be aware. Interfaces are implemented to make a commonality between different classes. Person class/type and a Car class/type might not have anything in common, but they both might need a method to wash. So they both can implement an Interface that enforces these classes to implement a wash method. The implimentation of this interface might not be that useful to these two classes, but it is very useful for a third class that stores a collection of classes that implements this method. This class might have a collection/list/array of items that it wants to perform some kind of cleanup on. In order for it to do this it loops trough each item and perform their own wash method. If the items don't have a wash method then this class can't perform what it was intended to do on multiple item. So it can say it want a type/class that implements the interface that enforces the wash method. That's all intefaces does, they enforces a set ot properties and methods, and other classes can enforce implementation of this, if they find it nessasary. That means it can perform a wash on the Car class, Person class and any kind of class that implements that interface that inforce the wash method. Might not make that much sense in javascript, since encaptulation and class inherritance is not that common.
@rennishj
@rennishj 6 жыл бұрын
Thank you for taking the time to do a very nice intro
@ThePCxbox
@ThePCxbox 3 жыл бұрын
Thank you ive been developing games forever which mainly uses C based languages, and ive been following your node.js crash course videos to branch out my knowledge of computers. Its always bugged me that in js you dont declare the variable type ahead of time. Its not exactly as smooth as c based languages but i think i found my new favorite framework/tool or whatever you want to call it :)
@atepoc7412
@atepoc7412 6 жыл бұрын
Thanks! Learning something new in every video you create!!
@DEVDerr
@DEVDerr 6 жыл бұрын
20:08 For guys watching this in 2018 => They already fixed it!
@ourmodernworldofficial
@ourmodernworldofficial 5 жыл бұрын
ye, thx! :)
@DononovanKeith
@DononovanKeith 4 жыл бұрын
Haha, I was just about to post this!
@shuangli5466
@shuangli5466 3 жыл бұрын
Thx
@LeetCodeSimplified
@LeetCodeSimplified 3 жыл бұрын
Lol, I wasted 10 minutes trying to expand tuples in Typescript's playground, hahaha.
@Thaidakarium
@Thaidakarium 7 жыл бұрын
God, finally I understand xD, thanks Traversy!
@christopherbilliau1308
@christopherbilliau1308 7 жыл бұрын
Very helpful and easily understood explanation of TS basics!
@lianglyu4237
@lianglyu4237 6 жыл бұрын
Nice beginner tutorial! keep it up!
@pcmckar
@pcmckar 5 жыл бұрын
Totally useful. Nice and in a nutshell, things explained very well! Not sure why disliked this ?
@pavzutube
@pavzutube 7 жыл бұрын
console.log can take arguments, so its not required to concatenate strings. great tutorial for starting in typescript
@alaaaltounji6374
@alaaaltounji6374 3 жыл бұрын
best crash course for learning typescript keep going
@generalg007
@generalg007 7 жыл бұрын
Brad, good job and well explained. Thanks a lot!
@oras4940
@oras4940 6 жыл бұрын
wonderful crash course!
@DiegoArcega1
@DiegoArcega1 5 жыл бұрын
Your crash courses are the best
@raazs35
@raazs35 7 жыл бұрын
Thanks a lot.. i've been waiting for this you are awesome man.
@razorsharpshady
@razorsharpshady 7 жыл бұрын
great tutorial.. very neat n clean
@btcls
@btcls 5 жыл бұрын
The simple and the best course ever find
@mostafafawzy2681
@mostafafawzy2681 4 жыл бұрын
always your crash courses are the best choices for me to start learning any new technology, so I ask you to make another crash course of using TypeScript with React, please
@abdelbakibelhajslimene8278
@abdelbakibelhajslimene8278 7 жыл бұрын
Thanks Brad, a fantastic work and clear explanations
@RushSonictron
@RushSonictron 5 жыл бұрын
You crash courses are the best :)
@ad_asquare
@ad_asquare 3 жыл бұрын
Great tutorial. Thanks Brad👍
@FredoCorleone
@FredoCorleone 6 жыл бұрын
Watch it 2x speed, good overview! I've enjoyed it
@iltafkhalid5146
@iltafkhalid5146 6 жыл бұрын
Perfect, very much to the point tutorial.
@daymaker_trading
@daymaker_trading 4 жыл бұрын
Thank you soo much!!! Such an awesome crash course!
@jonasdevries7260
@jonasdevries7260 7 жыл бұрын
Thanks Brad!!!! Way to go!!!!
@eddiehernandez70
@eddiehernandez70 4 жыл бұрын
Amazing video. Great primer man. Thanks!
@mahmoudhosain9542
@mahmoudhosain9542 3 жыл бұрын
Great Content always 👌😍
@joakimkarlberg9289
@joakimkarlberg9289 4 жыл бұрын
Congrats on 1 million subscribers!
@leg875
@leg875 7 жыл бұрын
Its a real crashcourse, short and sweet :)
@maskman4821
@maskman4821 6 жыл бұрын
awesome tutorial, you are the best!
@mattcramer9187
@mattcramer9187 4 жыл бұрын
Great tutorial, thank you!
@surajmistry4034
@surajmistry4034 7 жыл бұрын
Sir Brad You doing amazing great helpful tutorials.Would like you to do project tutorial for Laravel with admin panel please.Thank you so much for your great tutorials.. :)👍
@AmxCsifier
@AmxCsifier 7 жыл бұрын
Glad I subbed :)
@asharma741
@asharma741 4 жыл бұрын
I'm a beginner but knows js and this video is really helpful to learn ts
@idynxcode6390
@idynxcode6390 4 жыл бұрын
Excellent!
@warunsharma3995
@warunsharma3995 3 жыл бұрын
Great content.
@proit324techlead9
@proit324techlead9 5 жыл бұрын
As always, it is really awesome.
@pmahesh6789
@pmahesh6789 4 жыл бұрын
Nice video... Simplest way of explanation. I am sure if you add one video on generics then beginners will enjoy & increase there confidence. I was confused with generics when i was learn TypeScript first time even i have experience in C#. So, I am also interested....
@NIDHISHARMA-ep6nc
@NIDHISHARMA-ep6nc 4 жыл бұрын
Thanks a lot man! You save my day
@user-hd2bn4vp9r
@user-hd2bn4vp9r 4 жыл бұрын
Have watched this vedio, thank you
@Enzarro
@Enzarro 7 жыл бұрын
Come getSum()
@TheSclare
@TheSclare 6 жыл бұрын
LUL
@AionAngell
@AionAngell 5 жыл бұрын
Reaaly great video, Thanks a lot!
@martinnov8k
@martinnov8k 7 жыл бұрын
this helped me a lot, thank you :)
@pascalcasehkv
@pascalcasehkv 3 жыл бұрын
Typescript versions are getting updated and it will be nice if you've specified the used version here in the description for a particular video.
@sudhanmadhu1251
@sudhanmadhu1251 4 жыл бұрын
Thank you so much .this great one for new guys..
@iancarr3923
@iancarr3923 5 жыл бұрын
Very helpful as usual!
@novailoveyou
@novailoveyou 4 жыл бұрын
Thanks! You're the best!
@boujemaa8059
@boujemaa8059 7 жыл бұрын
Brad You Are the Rock!
@himelrana6594
@himelrana6594 6 жыл бұрын
Thanks, man. You helped me a lot.
@pola478
@pola478 5 жыл бұрын
great, clear tutorial. Thanks
@PezhvakIMV
@PezhvakIMV 6 жыл бұрын
that was awesome just one thing, you didn't need to put payInvoice in the User class, it belonged to Member class and that was a great example for those who don't know what Inheritance is and they can extend the base class. i'm a teacher myself i think maybe those who just started coding get confused. anyway, this 46minutes worth by all means. i just understood typescript. thank you.
@FitLife6767
@FitLife6767 6 жыл бұрын
This is wonderful...thank you
@alekseikorkh9010
@alekseikorkh9010 7 жыл бұрын
amazing video. Thanks a lot
@nilanjanmajumder8508
@nilanjanmajumder8508 4 жыл бұрын
great video
@applesaucebiatch
@applesaucebiatch 7 жыл бұрын
vs code has a built in cmd prompt to access it press the hotkey control and backtick( tilda key not single quote) ctrl + `
@calvinnewton7749
@calvinnewton7749 6 жыл бұрын
Thanks, nice tip!
@phanirithvij
@phanirithvij 5 жыл бұрын
We can use var x : typename[ ] ; instead of var x : Array; example: var a : number[]; a.push(2,3,4,2);
@skrezwan12
@skrezwan12 6 жыл бұрын
I am your fan forever.......
@ATSPARIStransfers
@ATSPARIStransfers 6 жыл бұрын
awesomeness !! thanks !
@allecoqqq
@allecoqqq 7 жыл бұрын
Hmm, another good point you kind of missed is the autocompletion that the IDE offers. For instance when u created interface for Todo and passed it as an argument type for showTodo(), it automatically knew which fields are available of todo object.
@KresnaPermana
@KresnaPermana 3 жыл бұрын
Stright to the point as always
@thanus9096
@thanus9096 7 жыл бұрын
Nice tutorial !!! thanks
@isurumdev
@isurumdev 7 жыл бұрын
Thank you very much for the tutorial. But I have a question. Is it ok to put variables in the interface such as name, email and age?
@TheKievsash
@TheKievsash 4 жыл бұрын
Thanks! Waiting for advanced Generics types video
@ZenOfTube
@ZenOfTube 5 жыл бұрын
For those who question its value, note that if you are looking for work using Angular you will need TypeScript. Brad has great Angular tutorials, too. Note that in this tutorial you may get the squiggly line error "[ts] Cannot redeclare block-scoped variable..." which is easily fixed by making your TypeScript file into a module. Do this with an empty export statement (export {};) at the top of your file and the annoying errors will go away.
@danielstoicamusic
@danielstoicamusic 5 жыл бұрын
In this case you will get an error in your browser console.
@user-eh3ji1py2p
@user-eh3ji1py2p 6 жыл бұрын
simple and great!
@sergiumare7259
@sergiumare7259 4 жыл бұрын
Good tutorial!
@ghazwan2568
@ghazwan2568 6 жыл бұрын
Great one
@Imran-M-
@Imran-M- 4 жыл бұрын
Hey Brad, nice work!! How do i achieve method overloading in TypeScript? Have you got any videos on that?
@Chetan.Kothari
@Chetan.Kothari 3 жыл бұрын
Thank you so much!!!
@tericgreenan8816
@tericgreenan8816 6 жыл бұрын
You sir, are a legend.
@raj080288
@raj080288 6 жыл бұрын
Hi Brad, love the videos, keep it up. One thing though, why do we have to use Typescript when we can still use ES6 features in JS and use something like Babel to convert it to ES5 code that is understood by browsers?
TypeScript Crash Course
52:27
Traversy Media
Рет қаралды 597 М.
TypeScript - The Basics
12:01
Fireship
Рет қаралды 1,5 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 68 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 35 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 186 МЛН
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 262 М.
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
Vite Crash Course | Faster Alternative To CRA
16:24
Traversy Media
Рет қаралды 194 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
HTMX Crash Course | Dynamic Pages Without Writing Any JavaScript
56:47
Traversy Media
Рет қаралды 142 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 559 М.
Learn TypeScript in 50 Minutes - Tutorial for Beginners
48:11
Codevolution
Рет қаралды 840 М.
Learn TypeScript Generics In 13 Minutes
12:52
Web Dev Simplified
Рет қаралды 247 М.
JavaScript Higher Order Functions & Arrays
34:56
Traversy Media
Рет қаралды 981 М.
📱магазин техники в 2014 vs 2024
0:41
djetics
Рет қаралды 358 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 7 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 8 МЛН