Тёмный

TypeScript Tutorial #2 - Compiling TypeScript 

Net Ninja
Подписаться 1,5 млн
Просмотров 247 тыс.
50% 1

Hey gang, in this tutorial I'll show you how we can compile typescript files into JavaScript files.
🐱‍👤🐱‍👤 JOIN THE GANG -
/ @netninja
----------------------------------------
🐱‍💻 🐱‍💻 My Udemy Courses:
+ Modern JavaScript - www.thenetninja.co.uk/udemy/m...
+ Vue JS & Firebase - www.thenetninja.co.uk/udemy/vu...
+ D3.js & Firebase - www.thenetninja.co.uk/udemy/d...
🐱‍💻 🐱‍💻 Course Files:
github.com/iamshaunjp/typescr...
🐱‍💻 🐱‍💻 Other Related Free Courses:
+ HTML & CSS Crash Course - • HTML & CSS Crash Cours...
+ Modern JavaScript - • Modern JavaScript Tuto...
🐱‍💻 🐱‍💻 TypeScript Docs:
www.typescriptlang.org/docs/h...
🐱‍💻 🐱‍💻 The Net Ninja Community Boards:
community.thenetninja.co.uk/

Опубликовано:

 

6 май 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 92   
@rumertovar
@rumertovar 2 года назад
I don't know much English, but your way of speaking is so clean that I can understand everything perfectly. Thanks a lot!
@nicbongo
@nicbongo 4 года назад
I love how after all these videos you're still doing the upward intonation on "query selector" lol. Great content, as always!
@RufatNuriev
@RufatNuriev 4 года назад
Waiting for this course a long time 🙏🙏❤️
@TechBuddy_
@TechBuddy_ 4 года назад
Hey thanks waiting for this ts series for a very long time thanks!
@abeechr
@abeechr 4 года назад
Thank you Net Ninja! I would love to see a series which built a React app in typescript. Cheers!
@asunali313
@asunali313 Год назад
I came here after your React tutorial. As I said there in the comments, I get a new job, and there are projects on react + typescript. but mostly i know Java. That's why I'm here. Don't want to watch javascript tutorials because they are so long. Arigato, Ninja!
@amirazouak5298
@amirazouak5298 2 года назад
Just wow can't wait to see your react typescript series :)
@Shakeel714
@Shakeel714 3 года назад
Thanks Shaun Pelling. Learning a lot from your TypeScript Series.
@LatromiPL
@LatromiPL 4 года назад
Looking forward for the next parts!
@desabisc
@desabisc 3 года назад
Thank you very much for sharing your knowledge.
@kasmr6860
@kasmr6860 4 года назад
Thanks! My man is there going to be the Typescript-React tutorial? Highly needed
@jmbeatsbbx
@jmbeatsbbx 4 года назад
As soon as I started watching this tutorial I went on google to check whether you can write ts in react or not :D
@idiot7leon
@idiot7leon 2 года назад
+1
@shakilkhanprogrammer
@shakilkhanprogrammer 4 года назад
I have learned two things from Shaun Pelling sir Computer programming and English language first of all he explain each code line by line so that's why I have learned programming from Shaun Pelling sir and second his accent is very clear so because of that I have also learned English language from Shaun Pelling sir.
@bemalsdvanitha2090
@bemalsdvanitha2090 4 года назад
Thanks for new series
@Ish-YouTube
@Ish-YouTube 9 месяцев назад
Why would you give a a class called list-item?
@gradientO
@gradientO 4 года назад
Just finished previous series! You're amazing⚡
@NetNinja
@NetNinja 4 года назад
Thankyou :)
@alexmerz4084
@alexmerz4084 4 года назад
Thank you for your straight forward explanation. :) Would you recommend writing frontend apps with typescript? Typechecking and compilation into 'older' javascript for cross-browser-support seems like quite an advantage. Greetings from Germany. Love watching your videos!
@NetNinja
@NetNinja 4 года назад
Hey, I think that it definitely helps you to think more about about your code & will lead to cleaner code in the long-run, so yeah. I still use plain JS for a lot of projects, especially when trying to fix something up quickly. But more frameworks/libs are quickly adopting TS support and I see that as a good thing.
@raullapuste2417
@raullapuste2417 Год назад
U're AWESOMEE. I had a problem with ts and js (i am new in frontend) and couldnt figure out why it wasn't working
@alejandrosauqueperez931
@alejandrosauqueperez931 Год назад
Thank you so much! You are really important for many people.
@NetNinja
@NetNinja Год назад
Thanks for your support Alejandro :)
@Anonymous-sq6eo
@Anonymous-sq6eo 3 года назад
I have a question regarding the compiler, and I was not able to find a concrete answer to this. Can you maintain the line breaks from the TS file? Or will the compiler always ignore them and pack everything together?
@johnconnor9787
@johnconnor9787 4 года назад
You are the best!
@marlonmorales6441
@marlonmorales6441 2 года назад
What theme are you using for VSCode ?
@jeffinj7707
@jeffinj7707 3 года назад
Great, thanks
@learningit2572
@learningit2572 Год назад
I love you so much! its amaizing course
@NetNinja
@NetNinja Год назад
Thanks! :)
@GamerPromedio02
@GamerPromedio02 Год назад
Nice video, really helpful
@NetNinja
@NetNinja Год назад
Thanks! Glad it helped :)
@Mysterious_debris_1111
@Mysterious_debris_1111 2 года назад
and for me... it asked to include the allowJs flag... this is specific to newer versions of typescript. It might be different in the future too
@shivashankar6043
@shivashankar6043 3 года назад
i'm getting this error when converting ts to js tsc : File C:\Users\\AppData\Roaming pm\tsc.ps1 cannot be loaded because running scripts is disabled on this system.
@Huseynlkin
@Huseynlkin 2 года назад
Switching from powershell to command prompt solved the issue for me.
@salahalhashmi6528
@salahalhashmi6528 3 года назад
thanks
@ARZ10198
@ARZ10198 4 года назад
can you show me how to use anime js for onload animation ?
@gabyguzman9589
@gabyguzman9589 4 года назад
How can i use tsc with nodemon? is it possible?
@ivanyosifov2629
@ivanyosifov2629 4 года назад
Shaun, you're missing the doctype in the index.html file
@osmeig6025
@osmeig6025 4 года назад
what theme do you use in vscode?
@ninostephen
@ninostephen 2 года назад
My broke ass can't afford to join and support you. But I'll watch every add that's on your video. Even if it's 2 mins long. I hope it helps. Cheers mate!
@ridl27
@ridl27 4 года назад
ty.
@vortex5244
@vortex5244 4 года назад
What theme are you using?
@8o8inSquares
@8o8inSquares 4 года назад
Fantastic
@howuseehim
@howuseehim 3 года назад
Hi, i am learning JavaScript and I keep seeing everywhere "please don't use car use let or const" but if I use typescript and it's converting my const or let to var isn't it bad ?
@sibusisomkhwanazi9800
@sibusisomkhwanazi9800 4 года назад
I can smell Ionic tut after this series. Shaun, please make Ionic and React tut after this series. Thank you so much for all your tut.
@tobitibesti
@tobitibesti 2 года назад
Is there like a live compiler that can be used instead of having to convert all TypeScript file to JS manually each time. In case someone's working on a bigger project
@phillipanselmo8540
@phillipanselmo8540 2 года назад
idk if there is but you can always make a batch file
@joeyammar699
@joeyammar699 2 года назад
which theme you are using ?
@damiansopel9871
@damiansopel9871 4 года назад
I had to add npx prefix "npx tsc sandbox.ts sandbox.js" to make it work
@abdulla2abduljaleel309
@abdulla2abduljaleel309 4 года назад
U uploaded both part 1 and part 2 within 1 min
@thundy_0472
@thundy_0472 4 года назад
He's a Ninja after all ;)
@somyadeepshrivastava1447
@somyadeepshrivastava1447 12 дней назад
used npm install @types/node, if you get Typescript error TS2583 Cannot find name 'Set' while compiling ts to js
@Etheriiss
@Etheriiss 4 года назад
Shaun, do you have some special plan for 500k subs? Some event or smth?
@contentshark5122
@contentshark5122 Год назад
Good video and explanation but can you tell why did we create the .ts file ...and convert it to a same to same js file ? What's the advantage
@phraggers
@phraggers 2 месяца назад
It looks like nobody replied to you so in case you still need an answer: The .ts file is TypeScript code. you can write JavaScript in a TypeScript file but not the other way round. TS is an extension on top of JS so it can do a lot more than JS can. (It's the same with other languages like C and C++, you can generally write C code in a .cpp but you can't write c++ code in a .c file)
@contentshark5122
@contentshark5122 Месяц назад
@@phraggers hmm makes sense thanks !
@contentshark5122
@contentshark5122 Месяц назад
@@phraggers Thanks for your reply
@abhijeetsinha9333
@abhijeetsinha9333 3 года назад
error TS2339: Property 'forEach' does not exist on type 'NodeListOf'. i am getting this error after forEach compilation in terminal
@thebrothershow5826
@thebrothershow5826 4 года назад
please, can you make a video about Typescript-vue-vuetify?
@ankitaswal2894
@ankitaswal2894 Год назад
Sir which theme it is?
@oncayt8831
@oncayt8831 Год назад
Great videoo
@NetNinja
@NetNinja Год назад
Thank you Onca :)
@rafmyles
@rafmyles 4 года назад
Greate video but why put the form in the footer instead of a section or a div? That's really not semantic. 😅
@danutzz8
@danutzz8 3 года назад
Hi there, need advice because something is not working: after node js installation I go to my command prompt window and when run 'npm install -g typescript' but outcome is only "changed 1 package, and audited 1 package in 2s found 0 vulnerabilities" and when I go to VS terminal and type 'TSC sandbox.ts ' is giving me an error saying: , which means the first part was not completed which I don't understand but I managed to find a way to install a JSon file on for now to carry on using this in my terminal (npm install --save-dev typescript), but still I want to figure out why my first part is not working. Cheers!
@wildpat03
@wildpat03 2 года назад
A recent change added a security flag to run ps1 scripts in Powershell following global installs. 2 solutions: 1) Compile with the command `tsc.cmd` - 2) Run the compile command in Command Prompt, not Powershell
@janpieters9840
@janpieters9840 Год назад
I tried to follow this, but compilation doesn't give a result instead it comes back with an error: allowJs isn't true. what am I missing?
@nedataghinezhad8796
@nedataghinezhad8796 2 года назад
hi .where is the link of git hub ?
@jeomongeorge9280
@jeomongeorge9280 4 года назад
If anyone facing problem in compiling TS just put this code in PowerShell (in Admin) and compile---> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
@briansimiyuj
@briansimiyuj 3 года назад
Thank you😀
@wildpat03
@wildpat03 2 года назад
THIS is dangerous, you reduce the security level, and it won't work on administered machines. Better use "tsc.cmd" from the Powershell terminal or compile from the Command Prompt terminal.
@arthurlara852
@arthurlara852 3 года назад
Hey, man, i liked your theme! What is it?
@NetNinja
@NetNinja 3 года назад
Hey it's Monokai++ :)
@arthurlara852
@arthurlara852 3 года назад
@@NetNinja thanks!
@you3667
@you3667 3 года назад
Live Server is good
@praf2
@praf2 Год назад
i don't understand why is a server used. Can't the html just be opened in the browser ?
@rockfield64returns67
@rockfield64returns67 Год назад
It's easier to open it via live server because it automatically refreshes the changes that you made in your code on your browser.
@alessiocarnino5773
@alessiocarnino5773 3 месяца назад
Nice tutorial but the project setup is not shown and I can't follow because I'm probably missing something
@MrVisheshsingh
@MrVisheshsingh 4 года назад
🎉🎃
@surfinbird71
@surfinbird71 4 года назад
I did a git clone but the only thing there is a README.md :(
@NetNinja
@NetNinja 4 года назад
Hey, you just need to checkout the correct lesson branch in the terminal. E.g. git checkout lesson-4
@tushaar9027
@tushaar9027 2 года назад
If somebody is getting this error (While running tsc command) File C:\Users\AppData\Roaming pm\tsc.ps1 cannot be loaded because running scripts is disabled on this system . Open powershell in admin mode and write this cmd (Set-ExecutionPolicy -ExecutionPolicy RemoteSigned)
@wildpat03
@wildpat03 2 года назад
THIS is dangerous, you reduce the security level, and it won't work on administered machines. Better use "tsc.cmd" from the Powershell terminal or compile from the Command Prompt terminal.
@derekc.gorman595
@derekc.gorman595 2 года назад
@@wildpat03 Thank you! I literally was stuck on this problem for the past 3 hours. I really didn't want to mess with the execution policy and had no idea about tsc.cmd or just running it using the cmd terminal in VSCode. I'm surprised no one mentioned it, because this solution is quicker and safer. I don't know why everyone is so quick to jump the gun and say "Just let all scripts run on your computer"
@wildpat03
@wildpat03 2 года назад
@@derekc.gorman595 Thanks. Re. your last question, yup, it's ... puzzling to say the least. I'm a dev, this is my job, and it seems that a lot of people including pros don't think about security. Nowadays, this should be at the forefront along documenting and code architecture, IMHO.
@almudza9803
@almudza9803 4 года назад
Typescript with deno
@maskman4821
@maskman4821 4 года назад
I use svelte to develop projects now, so typescript is irrelevant, but thank you Mr. Shaun Pelling for this series anyway, it helps a lot of people who are still addicted to reactjs and not recovered yet, let those who are reactjs dependent embrace typescript !!!
@AkamiChannel
@AkamiChannel 3 года назад
I don't like that the way you teach this is dependent on a specific text editor/IDE. I use WSL
@unknownworld9815
@unknownworld9815 8 месяцев назад
query selecTAAURR
@GoDShift
@GoDShift Год назад
Hey Shaun I think you lack self-confidence, what you mean "possibly the best website on the internet", that`s 100% the best website on the internet ,come on.
@otter4247
@otter4247 2 года назад
translate to korean....plz
@jertfelt
@jertfelt 2 года назад
Headsup, if you get error with tsc sandbox.ts, try instead to write tsc.cmd sandbox.ts
Далее
TypeScript Tutorial #3 - Type Basics
7:35
Просмотров 172 тыс.
TypeScript in React - COMPLETE Tutorial (Crash Course)
53:21
Looks realistic #tiktok
00:22
Просмотров 13 млн
100+ Linux Things you Need to Know
12:23
Просмотров 245 тыс.
The TSConfig Cheat Sheet
5:36
Просмотров 32 тыс.
Typescript Is SURPRISINGLY OK For Compilers??
25:09
Просмотров 50 тыс.
TypeScript Tutorial for Beginners
1:04:28
Просмотров 1,2 млн
Learn TypeScript Generics In 13 Minutes
12:52
Просмотров 232 тыс.