TypeScript adds static typing to JavaScript, improving maintainability and tooling for large applications. It compiles to JavaScript and runs anywhere JavaScript runs.
const message: string = "Hello, World!";
console.log(message);
Run:
tsc hello.ts
node hello.js
Or run directly:
ts-node hello.ts