<< Click to Display Table of Contents >> Navigation: Languages > TypeScript > VScode |
Before launching the projects, it’s important to understand why TypeScript is used instead of plain JavaScript.
TypeScript is a typed superset of JavaScript. This means it adds optional static typing and other helpful features to JavaScript — without removing anything from the original language.
Thanks to its type system, TypeScript helps you catch errors early, document your code more clearly, and write more predictable applications. Everything is more structured and organized “on the shelves” — especially helpful as your project grows.
If you’re already familiar with JavaScript, you shouldn’t be afraid of TypeScript — most of your JS knowledge applies directly. You can start using it gradually and benefit from autocomplete, better code navigation, and error checking right in your editor.
Launching TypeScript Projects in VS Code
To start working with IntraWeb 17 TypeScript projects, follow these steps:
1.Install Visual Studio Code
If you haven’t yet installed VS Code, download it from the official website.
2.Start the Apache Server
Before running the projects, make sure the Apache Server is running. If it hasn’t been installed or configured yet, refer to the earlier setup section.
To launch the server:
•Open the folder C:\Apache24\bin
•Run the file httpd.exe
This will start the local Apache HTTP server, which is needed to serve your application files.
3.Open the Project in VS Code
Launch Visual Studio Code.
Then in the top menu, go to File - Open Folder... (or press Ctrl + O)
In the folder selection dialog, navigate to C:\src\IW17\source\TypeScript. Select this folder and click Open.
This will load the IntraWeb 17 TypeScript projects into VS Code.
4.Open launch.json
Inside the .vscode directory, you’ll find a file called launch.json.
This file contains launch configurations — instructions for how VS Code should run and debug the different TypeScript projects.
To access it:
•Use the left sidebar in VS Code
•Click the Run and Debug panel (or press Ctrl + Shift + D)
5.Launch the Guess Project
From the dropdown menu, choose Guess (Chrome).
Then click the green Run button or press F5.
If everything is configured properly, a browser window will automatically open with the Guess application running.
Possible Issue: Missing Browser
If you see an error like:
That means Google Chrome is not found on your system.
To fix this:
Download and install Google Chrome.
Once installed, the launch should work normally.
6.Launching a Different Project
Let’s try launching another example: Work (Chrome).
This time, we’ll manually adjust the URL of the project:
•In the launch menu, click the gear icon next to the dropdown.
•This will reopen the launch.json file.
•Find the section where the current URL is specified.
•Comment it out by selecting the line and pressing Ctrl + /, or by manually adding // at the start.
•Scroll down to the section titled Loadable - CHJS.
•Uncomment the desired URL by removing // or using Ctrl + /.
After making the changes, run the project again.
This will launch a different example — a ChartJS integration inside an IW17 application.