In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to configure TypeScript automatic compilation in VSCode. I hope you will get something after reading this article. Let's discuss it together.
Install the TypeScript compiler
Visual Studio Code includes TypeScript language support, but does not include the TypeScript compiler tsc. You need to install the TypeScript compiler in the global or workspace to convert the TypeScript source code to JavaScript (tsc HelloWorld.ts).
The easiest way to install TypeScript is through npm, the Node.js package manager, where-g means global installation.
Install npm install-g typescript check version-output version information tsc-- versionxm@xm-Vostro-3670:~/project$ tsc-- versionVersion 3.3.3333 New HelloWorld folder and hello_world.ts file mkdir HelloWorldconst text:string = 'hello world';console.log (text)
New Tsconfig.json {"compilerOptions": {"target": "es5", "module": "commonjs", "outDir": "out", "sourceMap": true}} New tasks Tenimal- > Run Task
Select tsc:build-tsconfig.json
Press F5 when the configuration is complete
It is found that there is an extra out folder under the directory, which is configured with "outDir": "out" and DEBUG CONSOLE output hello world.
Modify text to save and press F5
After reading this article, I believe you have some understanding of "how to configure TypeScript automatic compilation in VSCode". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.