Hello World
Visual Studio Code Best IDE for Type Scripts. So First we start with Hello World Programm.
1. Download Visual Studio Code from here
2. Download Node Js from here
3.npm install -g typescript
After Install these Software
1. Open Visual Studio Code .
Create a Workspace folder and open it.
Create a Hello World.ts file:-
For Compile your HelloWorld.ts file Use tsc command
D:\TypeScripts\1> tsc HelloWorld.ts
For Build Your HelloWorld.ts user npm command
D:\TypeScripts\1>node HelloWorld.js
Output:- Hello World
You Get your Output.
1. Download Visual Studio Code from here
2. Download Node Js from here
3.npm install -g typescript
After Install these Software
1. Open Visual Studio Code .
Create a Workspace folder and open it.
Typically the first step in any new TypeScript project is to add in a
tsconfig
.json
file. This defines the TypeScript project settings such as the compiler options and the files that should be includedCreate a Hello World.ts file:-
class HelloWorld
{
public static StartUp():number {
console.log("Hello World");
return 0;
}
}
HelloWorld.StartUp();
For Compile your HelloWorld.ts file Use tsc command
D:\TypeScripts\1> tsc HelloWorld.ts
For Build Your HelloWorld.ts user npm command
D:\TypeScripts\1>node HelloWorld.js
Output:- Hello World
You Get your Output.
Comments
Post a Comment