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
@LeetCodeSimplified3 жыл бұрын
Thanks, man!!!
@anabeatriz88353 жыл бұрын
@@LeetCodeSimplified I'm woman lol. U r welcome
@CodingTutorials3607 жыл бұрын
Started a new job that uses TypeScript and Angular 4. Your crash courses are always the best to get up to speed asap.
@TraversyMedia7 жыл бұрын
Thanks man :) Good luck with the new job
@peggy77447 жыл бұрын
Same here! Angular 4 and TS has been my life this week, haha :( These videos do help a lot though!
@SogMosee6 жыл бұрын
How is the job going, 5 months later?
@CodingTutorials3606 жыл бұрын
Excellent!
@gopikrishnan48815 жыл бұрын
i just started
@attilagyen14465 жыл бұрын
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-1233 жыл бұрын
It is a good point but your example doesn't show the best use of lambda expressions.
@ja9097 жыл бұрын
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.
@alenjose39033 жыл бұрын
what about now? Is classes and stuff now available in Javascript?
@pauls62773 жыл бұрын
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
@thriftsimple5616 жыл бұрын
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!!
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!!
@uhN0id4 жыл бұрын
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!
@ZenOfTube6 жыл бұрын
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.
@danielstoicamusic6 жыл бұрын
In this case you will get an error in your browser console.
@egro-marketplace6 жыл бұрын
Your courses are always efficient and clear !!!Your courses are always efficient and clear !!!
@DEVDerr6 жыл бұрын
20:08 For guys watching this in 2018 => They already fixed it!
@ourmodernworldofficial6 жыл бұрын
ye, thx! :)
@DononovanKeith5 жыл бұрын
Haha, I was just about to post this!
@shuangli54663 жыл бұрын
Thx
@LeetCodeSimplified3 жыл бұрын
Lol, I wasted 10 minutes trying to expand tuples in Typescript's playground, hahaha.
@sarahmattar5 жыл бұрын
Short, sweet, and very informative! You're distilling down what takes others a few hours to explain. Thank you Brad!
@mahmoudabdelfattah90196 жыл бұрын
Best crash course about TypeScript, thanks a lot.
@christopherbilliau13087 жыл бұрын
Very helpful and easily understood explanation of TS basics!
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. 😊
@DiegoArcega15 жыл бұрын
Your crash courses are the best
@alaaaltounji63744 жыл бұрын
best crash course for learning typescript keep going
@muzafferhassan7 жыл бұрын
thanks for this introduction video of Typescript... you guys are doing well....
@LookNumber97 жыл бұрын
Great job, Brad! I was hoping that we'd see something from you on TypeScript. Very clear and concise, as usual.
@coding_ss6327 жыл бұрын
I'm doing angular2 these days and this video is helpful ... Thank you very much brad. Keep posting awesome crash course & tutorials like this.
@nanonerd1007 жыл бұрын
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 !
@sugaadai6 жыл бұрын
Because class User is not a type
@NeuePerspektiveCH5 жыл бұрын
Was just going to write the same exact thing .... last 4 or 5min were a bit fast and feel incomplete
@TroenderTass4 жыл бұрын
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.
@retiar21117 жыл бұрын
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!
@albertoakpos85954 жыл бұрын
Short and to the point. Nice work Brad!
@davidofug5 жыл бұрын
I have to admit, your courses are the best. Thank you Brad.
@asharma7414 жыл бұрын
I'm a beginner but knows js and this video is really helpful to learn ts
@elciesstv6 жыл бұрын
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!
@pavzutube7 жыл бұрын
console.log can take arguments, so its not required to concatenate strings. great tutorial for starting in typescript
@volodymyrselevertov5 жыл бұрын
I started learn angular and for work with it I need to know TypeScript Thank you, Brad, now I have basic knowledge about TS :)
@Seb162916293 жыл бұрын
Hi Brad, i followed your MERN courses, how would you deploy to heroku when you add typescript ? I am very confused with the scripts and concurrently -watch etc . Could you please provide a tuto? It s very difficult to find online how to do for this setup with typescript. Thanks
@ThePCxbox3 жыл бұрын
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 :)
@User-beta83477 жыл бұрын
Great Video Tutorial. I have used Sublime Editor for working the TypeScript. I would like to say thankyou for providing this video tutorial.
@mahmoudhosain95423 жыл бұрын
Great Content always 👌😍
@daniel716265 жыл бұрын
I am going to use typescript on my job, So this is nice to have.
@joakimkarlberg92894 жыл бұрын
Congrats on 1 million subscribers!
@ibrahimmohammed34847 жыл бұрын
2 days ago i was searching for something similar as long as i didn't see it in your channel, thanx brad :)
@Enzarro7 жыл бұрын
Come getSum()
@TheSclare6 жыл бұрын
LUL
@pcmckar6 жыл бұрын
Totally useful. Nice and in a nutshell, things explained very well! Not sure why disliked this ?
@CamdenBloke5 жыл бұрын
@26:00 Just always parseInt or parseFloat. If you provide an int it will return the same. Also, it's no quicker to run the typeOf test first, I'm just javascript does that internally on parseInt, except on a lowe level.
@ad_asquare3 жыл бұрын
Great tutorial. Thanks Brad👍
@btcls5 жыл бұрын
The simple and the best course ever find
@PezhvakIMV6 жыл бұрын
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.
@phanirithvij5 жыл бұрын
We can use var x : typename[ ] ; instead of var x : Array; example: var a : number[]; a.push(2,3,4,2);
@pascalcasehkv4 жыл бұрын
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.
@applesaucebiatch7 жыл бұрын
vs code has a built in cmd prompt to access it press the hotkey control and backtick( tilda key not single quote) ctrl + `
@calvinnewton77496 жыл бұрын
Thanks, nice tip!
@markay_3 жыл бұрын
Can this crash course still be used as reference in 2021?
@bobobobbyboy3 жыл бұрын
i'm wondering the same thing, considering the version as of August 3, 2021 is v4.3.5
@razorsharpshady7 жыл бұрын
great tutorial.. very neat n clean
@samuelweb65957 жыл бұрын
Great tutorials Sir. God Bless You!!
@allecoqqq7 жыл бұрын
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.
@atepoc74127 жыл бұрын
Thanks! Learning something new in every video you create!!
@warunsharma39953 жыл бұрын
Great content.
@mostafafawzy26814 жыл бұрын
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
@FredoCorleone6 жыл бұрын
Watch it 2x speed, good overview! I've enjoyed it
@GaryParkin7 жыл бұрын
Thank you! Finally I understand why I'd want to use TypeScript.
@RushSonictron5 жыл бұрын
You crash courses are the best :)
@elorating4 жыл бұрын
As in Jan, 2020. Tuples has to match length as well. So at 20:40, strNumTuple = ["Hello", 4,3,4] will cause an error.
@mehmedbazdar90387 жыл бұрын
Great tutorial as always. It looks like the syntax of TypeScript is similar to that of C# and Java :D
@rennishj7 жыл бұрын
Thank you for taking the time to do a very nice intro
@aaronhall80395 жыл бұрын
Your link to the full course doesn't seem to be working.
@NeuePerspektiveCH5 жыл бұрын
Still not working (August 2019)
@qwang60384 жыл бұрын
I believe this is the one: www.eduonix.com/courses/Web-Development/the-complete-typescript-programming-guide-for-web-developers
@nilanjanmajumder85084 жыл бұрын
great video
@pmahesh67895 жыл бұрын
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....
@idynxcode63905 жыл бұрын
Excellent!
@TheKievsash4 жыл бұрын
Thanks! Waiting for advanced Generics types video
@leg8757 жыл бұрын
Its a real crashcourse, short and sweet :)
@iltafkhalid51466 жыл бұрын
Perfect, very much to the point tutorial.
@ASoftwareEngineer7 жыл бұрын
thanks so much, been learning much from your playlist, keep up the great work. Great for FE community
@rsruo83315 жыл бұрын
useful course
@skrezwan126 жыл бұрын
I am your fan forever.......
@braker375 жыл бұрын
I think you got confused there with the payInvoice() function in the Member class. The way you implemented it, it doesn't even need to be there, since you put it in the super class first. It would've been more useful if you had shown overriding instead of that. Other than that - great video. 1.5x speed recommended.
@JoshYates7 жыл бұрын
I replaced 'let' with 'var' to eliminate the 'Cannot redeclare block-scoped variable 'myString', 'myNum', etc.
@ericdecolsales30666 жыл бұрын
my hero. Way better then creating an explicit lib property in tsconfig.json without DOM
@tjblackman085 жыл бұрын
I just wrapped my code in an IIFE
@lianglyu42377 жыл бұрын
Nice beginner tutorial! keep it up!
@curiousprogrammer907 жыл бұрын
Thanks Brad! :) Keep em coming!
@ksks9417 жыл бұрын
How do you stop that compiler in command prompt??
@Mackingzie7 жыл бұрын
CTRL+c * 2 Recommend cmder, its like the linux terminal.
@eddiehernandez704 жыл бұрын
Amazing video. Great primer man. Thanks!
@oras49407 жыл бұрын
wonderful crash course!
@Drag0n_Master_7 жыл бұрын
Thanks for the video, it's a nice overview of TypeScript - exactly what I was looking for!
@kkingbd5 жыл бұрын
What vs extension do you use to catch error ? Please let me know.
@michelange51025 жыл бұрын
I believe is a built-in extension
@CodingPhase7 жыл бұрын
I've been wanting to jump to typescript
@sudhanmadhu12514 жыл бұрын
Thank you so much .this great one for new guys..
@KresnaPermana4 жыл бұрын
Stright to the point as always
@abdelbakibelhajslimene82787 жыл бұрын
Thanks Brad, a fantastic work and clear explanations
@azimjonsodikov6 жыл бұрын
Run `tsc --init` if you are getting weird type errors in VS code
@nhrnjez5 жыл бұрын
ty :)
@ghazwan25687 жыл бұрын
Great one
@水果饭子4 жыл бұрын
Have watched this vedio, thank you
@daymaker_trading4 жыл бұрын
Thank you soo much!!! Such an awesome crash course!
@Imran-M-4 жыл бұрын
Hey Brad, nice work!! How do i achieve method overloading in TypeScript? Have you got any videos on that?
@raj0802886 жыл бұрын
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?
@fabianmarcus4 жыл бұрын
Is this crash course still up to date?
@dreznik6 жыл бұрын
at 43:30 do you have to implement payInvoice() in the child class? in C# it would automatically inherit that method from the parent!
@droidgeist6 жыл бұрын
20:06 - Adding additional elements after the matched tuple causes an error now. "error TS2322: Type '[string, number, string]' is not assignable to type '[string, number]'. Types of property 'length' are incompatible."
@subham-raj5 жыл бұрын
They fixed it.
@pola4785 жыл бұрын
great, clear tutorial. Thanks
@trups11trupti4 жыл бұрын
Nice tutorial. Any plan on creating any project on typescript with react.js?
@philippaubert29473 жыл бұрын
@20:18 no. I'm receiving an error: "Type '[string, number, number, number]' is not assignable to type '[string, number]'. Source has 4 element(s) but target allows only 2." Must have been changed...
@thefreeze60235 жыл бұрын
What I dont understand is... Let's say I'm building a nodejs app. I wanna use Typescript. But the compiler will just turn the .ts file into a .js file. And I'll only be able to use that .js file, which doesn't have any Typescript functionality, like strictly typed variables. So the thing is, how am I supposed to use Typescript if it just turns into regular old javascript.
@Oswee5 жыл бұрын
I think you should use TS to write more error resistant code. TS is all about DX (developer experience). As well, if you have a small project, then you probably dont need TS. It really shines in larger projects and multi-team projects. Also, you can configure to what ES version you want to transpile your TS code. Lets say, you need only evergreen browsers, then you can transpile down just to ES2017. Or down to IE11. TS compiler will turn on all your fancy modern codebase to that old javascrip version which will run on that IE11. I just recently included this build step in my Webpack and i really like it. But i wish i had start my project to write in TS from very beginning.
@thefreeze60235 жыл бұрын
@@Oswee yeah but that doesn't answer the question. There is no TS runner engine, just tsc which simply turns it into javascript for me to use. Why not just write that JS file from the beginning myself?
@Oswee5 жыл бұрын
@@thefreeze6023 How would you implement strong typing in vanilla JS? Or interfaces? I think it is worth for you to watch more on TS. You will get it. :) And you will like it. :)
@thefreeze60235 жыл бұрын
@@Oswee Exactly, how would you? If I want to use JavaScript, but with strong typing or interfaces, TypeScript won't let me do that. Why even write TS code if it will become JS and completely act like JS?
@grassCrow5 жыл бұрын
The Freeze iThink this is a really good question. I do javascript as a hobby and one thing i like about the language is that i don’t have to declare a type and another is that there is no compiling. Its my understanding that Typescripts allows the editor to find errors that it could not otherwise find in Javascript. And also development on larger projects are easier to manage and the code is easier to read. Its not what your question assumes, its not that the browser runs better with declared types, but rather the Typescript compiles to better written, and less error prone, code. Thats my understanding ... I have no experience with Typescript.
@giovanigenerali7 жыл бұрын
Brad, good job and well explained. Thanks a lot!
@boujemaa80597 жыл бұрын
Brad You Are the Rock!
@mcs4uweb7 жыл бұрын
good inheritance reference, TS is the future
@Thaidakarium7 жыл бұрын
God, finally I understand xD, thanks Traversy!
@franciscogiancarelli94554 жыл бұрын
"this" does not reference the class but the instance you are 'constructing'.