THIS is EASY TypeScript Setup in VSCode

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

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

  • @vinicius18103
    @vinicius18103 ปีที่แล้ว +70

    Alex is the type of guy I would like to have as a coworker! 😂

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

      Or definitely our supervisor!

  • @gokulambalavanan3592
    @gokulambalavanan3592 ปีที่แล้ว +7

    I spent my day , querying chatgpt and running around stack overflow , and watching TH-cam videos to learn the compiling process, thanks man you are a life saver ❤

    • @hihohihoi1325
      @hihohihoi1325 3 หลายเดือนก่อน

      claude ai is good

  • @williamimbert4124
    @williamimbert4124 11 หลายเดือนก่อน +1

    Thank you very much for this video !!! I have been reading articles, forums and asking chatGPT the last 2 days to get my typescript app compile and execute using tsc, tsc-node, ... and playing with all possible options in the config files, without success and with your help, in 10 minutes, I have it working directly, and from VSC and with the integrated debugging support ! Thanks A LOT !

  • @sofiaknyazeva
    @sofiaknyazeva ปีที่แล้ว +16

    by the way, you can just initialize empty package.json with npm init -y where y basically says "yes".
    yarn, pnpm also have similar functionality

    • @AZisk
      @AZisk  ปีที่แล้ว +26

      not as fun as pressing enter a bunch of times without looking 👀:)

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

      @@AZisk i totally agree! :3
      Npm init
      Enter
      Enter
      Enter
      Enter
      Enter
      Is fun

    • @toadlguy
      @toadlguy ปีที่แล้ว +4

      @@AZisk You could even make a modified Schwarzenegger that repeatedly hit enter 😂 (for even more fun)

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

      @@toadlguy Wow, I don't even know why I didn't think of that. Missed opportunity to use Schwarzenegger 2.0

  • @leooel4650
    @leooel4650 7 หลายเดือนก่อน

    I was having a headache for the past 6 hours... what a painkiller you are man!
    Thanks.

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

    Alex, thanks so much, your video and explanation helped so much as I was getting up on Typescript.
    I was reading the book Programming Typescript on p.14, on compiling and running, and he lost me. I'm so glad I found your video..🎉

  • @Jeff-k2o
    @Jeff-k2o 8 หลายเดือนก่อน

    Love seeing true ninjas giving the real, straight forward and clearly explained answers. I have literally run into suggestions about kernel level and /usr/lib mods to get this exact same functionality. Thank you for a great - and VERY helpful video.

  • @davidelmakias5545
    @davidelmakias5545 5 หลายเดือนก่อน

    i spent 2 days trying to figure out how to do that. thanks a lot!

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

    This is exactly what I was looking for, thanks !

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

    Thank you for this! This saved me from so much hell starting to learn TypeScript.

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

      Glad it helped!

    • @jonathanmalloy9711
      @jonathanmalloy9711 6 หลายเดือนก่อน

      @@AZisk 8 months later, greatly appreciated! You're a great teacher!

  • @jonnysharan4393
    @jonnysharan4393 10 หลายเดือนก่อน

    typescript helps you to find the error and solve it during development process. is add the code on terminal tsc --init it add typeconfig file which help you to not add the js file if it is an error on ts file which is no Emit on Error tsc will help you to add the type of the variable and function array .

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

    all the commands but still need to watch the video :)
    node --version
    npm init
    npm i -g typescript
    tsc
    tsc --version
    tsc --init --sourceMap --rootDir src --outDir dist
    tsc
    npm i --save-dev typescript

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

      thx!

  • @lodewykduminy9511
    @lodewykduminy9511 8 หลายเดือนก่อน

    this video is absolutely amazing but if I could make 1 suggestion - when showcasing commands that need to be typed into the console to follow your tutorial, it might be worth putting in a hovering textbox over the video for a couple of extra seconds or something, just so that people don't need to pause on the exact half-second that the full command is visible

    • @hihohihoi1325
      @hihohihoi1325 3 หลายเดือนก่อน

      its fully visible g
      just look

  • @yoyo26-34
    @yoyo26-34 ปีที่แล้ว

    Very interesting, even have been programming TS for 4 years in VScode, I've never used these VSCode tasks.

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

    Video Suggestion/Recommendation:
    Please make a video explaining TypeScript Callbacks, Promises, and Async/Await. I have yet to find a tutorial in which all of the details regarding such phenomena are fully explained.
    > Thanks!

  • @lucastaonline
    @lucastaonline 6 หลายเดือนก่อน

    AMAZING! The only explanation that worked for me... ty very much

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

    Thanks man , i need it as a cloud engineer since we are using aws cdk.

  • @echobucket
    @echobucket ปีที่แล้ว +7

    Typescript and node needs to get this module stuff figured out, it's a complete and utter mess

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

    this is really useful! when i was doing a project that use typescript i had no idea what to do. how everything works.

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

    What a god you are. The real MVP. Stay sharp!

  • @Renreal-y9h
    @Renreal-y9h ปีที่แล้ว

    you just made it very easy to understand. thank you for this!

  • @bestchoice7431
    @bestchoice7431 11 หลายเดือนก่อน

    Wow. You have done a great job. Can you please advise me on how to learn TypeScript very fast after learning JavaScript?

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

    wow this is some whole new way of doing it!

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

    Thanks for your work👍🏻

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

    well this was easy specially for a noob :)) now all I have to do is watch it again at half speed at least 33 times

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

    I find it easier nowadays just opening a js debug terminal in vscode and running ts-node to run the app, you don't need to have a ts watch task, and no launch.json file, still useful when you need to run the app with multiple env variables and some other custom configs like specific node version without switching with nvm

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

      what about debugging?

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

      @@AZisk the js debug terminal automatically attaches any process running to the debugger process

  • @ryzexop454
    @ryzexop454 2 วันที่ผ่านมา +1

    Hello sir,
    I got errors in these steps:
    > tsc --version
    > tsc --init
    It says Unauthorised Access
    &
    No further steps can be done unless these commands run successfully
    Why is it so???

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

    Hahaha nice videos as always. Someone is in a good mood today 😂😂

  • @PRIYANSHU-no4ir
    @PRIYANSHU-no4ir 2 หลายเดือนก่อน

    super man of compiler

  • @55jugalo
    @55jugalo ปีที่แล้ว

    You're a blessing man!!! fixed my headache

  • @hamstertheadventure827
    @hamstertheadventure827 3 หลายเดือนก่อน

    Very helpful. Thank you!

  • @Holiday21
    @Holiday21 6 หลายเดือนก่อน

    God bless this man.

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

    Today, we use vite or bun. But It's nice to explain in a clear way how to configure vscode to watch typescript code for debugging.

  • @martintaanlee
    @martintaanlee 19 วันที่ผ่านมา

    excellent stuff, thank you!

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

    You are awesome, man!

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

    Best tutorial. But I now need some help on the folder structure please. Like if I put the HTML, JS, TS, CSS files in the src folder, where should I move the tsconfig and package files so it still compiles without having to also type "tsc"?

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

    Next step would be to containerise this setup, I assume ;)

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

    Awesome, thank you

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

    Best tutorial ever ;-)

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

      Glad it helped!

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

    That's the way to do it. Very useful video and it helped me a lot. Thank you very much! I would also look into how to set up the test environment, e.g. with Jest. I tried it, but I got stucked.

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

    Awesome tutorial, thanks

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

    Really good video, thank you!

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

    Many thanks Alain, very helpfull

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

    you are great teacher thank you soo much

  • @justicefor_sandwichlord
    @justicefor_sandwichlord 5 หลายเดือนก่อน

    Eyy thnx mate highly appericiated

  • @marcelo8038
    @marcelo8038 7 หลายเดือนก่อน

    excellent video. helped a lot.

  • @fordprefect5433
    @fordprefect5433 13 วันที่ผ่านมา

    Thank You So Much!

  • @native-nature-video
    @native-nature-video ปีที่แล้ว +1

    What camera do you use for recording this video? Amazing picture quality

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

      Thanks! I use the Sony A7iv

  • @hanes2
    @hanes2 ปีที่แล้ว +5

    I would just do ‘pnpm create vite tsdev -template vanilla-ts’… (or vue-ts, or react-ts etc.)….. and easy as that… and pnpm and vite is just awesome.

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

      yes, if creating a web project and then a specific ui framework, sure. but you’re also adding a bunch of extra dependencies.

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

      @@AZisk if it’s not web project then I don’t know what TS is used for to be honest… at best maybe electron but then u can use create electron-vite which ask for vue/react/vanilla since it’s still just web.

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

      @@hanes2 I made several command line utilities using nodejs + ts, so vite is a bit overkill.
      Until I switched to Deno for those kind utilities because of ability to bundle/build code as executable (also easier to configure).

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

      @@crushfire2004 it wouldn’t even cross my mind to use JS/TS for CLI tools. Then I my mind would be like depending if need; bash->python->rust

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

      @@hanes2 python should be great, but my past companies mainly use js and everyone already familiar with so we decide to go with Deno to avoid additional learning curve & tooling setup.
      Maybe not a great choice, but it works for us lol.

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

    Life saviour.

  • @raushankumargupta7018
    @raushankumargupta7018 6 หลายเดือนก่อน

    Thank's Alex❤

  • @KeshenMac
    @KeshenMac 7 หลายเดือนก่อน

    insanely helpful

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

    great video. very helpful

  • @NicolaMarino1978
    @NicolaMarino1978 6 หลายเดือนก่อน

    wow!! it' s amazing !!!!

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

    Thankyou, you are great

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

    Thanks, man!

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

    Thanks for clear concise video. Unfortunately, all has changed again. Duplicated exactly your set up (with later versions of software- TS 5.1.6). On initial compile of your index.ts, got following error message: [Running] ts-node "c:\Users\Owner\Desktop\PROJECT\CODE\TSDEV\src\index.ts"
    'ts-node' is not recognized as an internal or external command, operable program or batch file.

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

    Thanks for the great video. BTW, why do you use a watch task instead of a build task? Isn't the build task automatically triggered every time you start debugging anyway?

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

    Hi Alex, you're a life saver with stuff like this. One Question nevertheless, does this also work for debugging Angular applications?

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

    This is good tutorial!

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

    can;t believe it's 2023 and things are still that complicated

  • @iDoc_Elf
    @iDoc_Elf 3 วันที่ผ่านมา

    very good man

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

    Do I need to do this process every single time? Wich steps can I skip?

  • @rusted.dreams
    @rusted.dreams 29 วันที่ผ่านมา

    thanks man

  • @EduardoHernandez-ux6gg
    @EduardoHernandez-ux6gg ปีที่แล้ว

    thx bro, you should create a complete ts tutorial

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

      Not disagreeing exactly, but there are loads of typescript videos, but very few on how to just set up your project quickly unless using a specific framework. The comments tend to also add possible variations that might conform your particular situation. If an easier way to do this in VS Code comes out (which it should, btw), we might get a comment or if Alex sees it, a new video 😃

  • @MohammedAli-p7e9d
    @MohammedAli-p7e9d 4 หลายเดือนก่อน

    8:57 you didn't need to tell me to subscribe because you deserve it 😊

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

    Thanks!

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

      Wow thanks so much!

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

    Hi! Have you tried dotnet core + angular on mac? Can you recommend any nswag studio alternative on apple silicon?

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

    We know that we can export a file to another file with export, but the imported file gives an error in Google Chrome, is this normal or do you get an error like 'Export is not defined' when you export this process?

  • @isynera
    @isynera 11 หลายเดือนก่อน

    What if we want to attach the debugger to an existing instance instead of launching?
    Having to run the watch task every time we do this is not a great solution imo, we should use something like ts-node or nodemon to do the watching.

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

    It would be good to see how to do the same for Visual Studio proper. For a web project.

  • @Zulf-l6l
    @Zulf-l6l ปีที่แล้ว

    the best!

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

    what about text autofill?

  • @priyankasachan672
    @priyankasachan672 8 หลายเดือนก่อน

    Hi, I am getting error import { Chicken } from "./chicken.TS"; While importing

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

    Been switched to Deno & Go for past 1 year, does ts-node (& ts-node-dev) still relevant?

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

    I have this weird issue when importing TS files. it imports them with .js prefix but its a ts file. why is that?

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

    My vscode is not highlighting errors in the 'ts' file. Any insight?

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

    'npm init -y' uses all the defaults.

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

      yes, but is it as fun 🤩

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

      @@AZisk Think of the money saved from otherwise replacing worn out enter keys!

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

      @@joostschuur this is very true, but it’s such a liberating feeling to let go of efficiency and throw caution to the wind ;)

  • @MaciejLisCK
    @MaciejLisCK 6 หลายเดือนก่อน

    tsc --init --sourceMap --rootDir src --outDir dist

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

    i have a problem while writing command (tsc --versiov)

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

    You are so cool 👍

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

    supper!

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

    Alex I have terminal issue where terminal text is so small it's hard to read. Tried changing terminal font size, but no change. Have you any issues with this or how to change the size to normola size. I went into zsh settings and it wont change. M1

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

    nvm - gives issues, why do we need v 18 of node? nbm needs bash to properly install now. Ah it has all changed AGAIN.

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

    I know this is a good tutorial and I'm just dumb but in the first minute I don't even know where you typed does commands, what does commands are, how did they open visual studio...

  • @jsonslim
    @jsonslim 6 หลายเดือนก่อน

    3:58 ${workspaceFolder} makes the wrong path, causing "Cannot find module" error

    • @jsonslim
      @jsonslim 6 หลายเดือนก่อน

      in my case i just deleted the launch.json and it worked

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

    glad to see using js has improved since 1996... looks even more dumpster firey today :D

  • @AlThePal78
    @AlThePal78 5 หลายเดือนก่อน

    why didn't you use npm init -y

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

    Buenisimo

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

    try „npm init -y“

  •  ปีที่แล้ว

    Too more zooms and outs ;) BTW Nice topic.

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

    Great video - little less cutting to the side of your face and not showing the screen and commands

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

    in some messed up way, this video, too, will be outdated haha

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

      probably already is

  • @RajatkumarJena-u3c
    @RajatkumarJena-u3c 10 หลายเดือนก่อน

    it's complicated way it's not beginner-Friendly

  • @4444-c4s
    @4444-c4s ปีที่แล้ว

    Warning: Don't follow along with him, just watch whole video and understand what to do and what not to do...😜😜

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

    Alex, I like your videos, but I'm not sure what was the purpose of this video, nobody is coding TS like you did in this video, there are tons of tools that remove all those overheads, Vite for example and lots of others that require way less config, or almost zero config. I've never seen any developer around me doing typescript development like you tried to do in this video. I've seen lot's of reasons to not use tools like vite for example, or webpack or whatever... but adding those tools doesn't hurt performance, nor it affects transpiled version, it's just a DX tools that make your life way easier, both when setting up new project and for larger projects. so I don't know, especially it's problematic when you upgrade to new version of node, it's very problematic when you are not using those tools. I'm developer 18 years already and I just wanted to say that, reinventing the wheel, doesn't make it better, you just wasted lots of time to make something that already existed and worked absolutely fine, same goes for people who think writing application without frameworks and existing tools are bad and they are trying to write everything from scratch by themselves and they can't realize that all those tools were tested by thousands of people and now as you try to not use all those tools, you have to do everything on your own. Especially for Javascript/Typescript right? it changes so quickly, if you are doing everything on your own, you are wasting time on something that you don't need, if you are building application, why not focus on doing that, instead of wasting time on re-creating something that already exists.

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

    Thanks for this video. For the auto compilation could we just use: tsc -w ?

  • @fantabarack
    @fantabarack 20 วันที่ผ่านมา

    Dude, very good content, but this cuts are crazy. I'm watching the code, than your face, then your face from the side. I think the content is good, but this part is completely unnecessary. Put yourself on the corner and let us see the code instead, you are a coder, we are interested in the code, not your face in different angles. really.

  • @pabloetcheverry5553
    @pabloetcheverry5553 3 หลายเดือนก่อน

    THANKS A LOT, this was the only tutorial that actually works for me! Thanks again!!!

  • @Oaks64
    @Oaks64 5 หลายเดือนก่อน +1

    Thanks!

    • @AZisk
      @AZisk  5 หลายเดือนก่อน

      wow thank you so much!