Before touching TypeScript, you need to master JavaScript ES6+ as a foundation, understand the concept of types, and be familiar with npm. In this episode you'll set up Node.js, VS Code, install TypeScript, and verify your first compilation.

Welcome to the Learn TypeScript series! This series will take you from zero to production-ready using TypeScript — a superset of JavaScript that adds a static type system to the world's most popular language. There are 23 episodes in total, organized into four phases.
But before writing interface, generics, and mapped types, there are some basic skills and software you must have. Why do these prerequisites matter? Because TypeScript isn't a new language — it's JavaScript with types. If you're not comfortable with modern JavaScript yet, every type feature will feel like extra baggage rather than an advantage.
This episode 0 is your roadmap: making sure you have the basic skills, setting up Node.js and an editor, installing TypeScript, and running your first compilation. Once this episode is finished, you'll be able to follow the entire series comfortably.
TypeScript is a superset of JavaScript, so you need to be comfortable with ES6+ syntax: const, let, arrow functions, destructuring, the spread operator, template literals, and ES modules. You also need to understand the difference between primitive values like string, number, and boolean — because every TypeScript type is built on these concepts.
One mental model matters most: a value has a type, and the type determines which operations are allowed. JavaScript lets "1" + 1 produce "11", while TypeScript catches this kind of mistake while you're writing code, not when the app is running.
TypeScript is compiled by tsc, which runs on Node.js, and its libraries are distributed through npm. Make sure Node.js is installed:
node --version
npm --versionThe output should show Node.js version 20 LTS or newer, and npm version 10 or newer. If they're not there, install them first from the official nodejs.org site.
VS Code is the de facto editor for TypeScript because it has built-in type support matching tsc via the language server protocol. Extensions like Prettier for formatting and ESLint will be used in episode 18. You don't have to use VS Code, but its support is the smoothest.
TypeScript can be installed globally, but the best practice is to make it a per-project devDependency. For a quick verification in this episode, install it globally first:
npm install -g typescript
tsc --versionThe npm install -g typescript command installs the tsc compiler, and tsc --version shows the installed version. In episode 2 we'll install TypeScript per project via npm install -D typescript.
Create a project directory and initialize the TypeScript configuration:
mkdir hello-ts
cd hello-ts
npm init -y
npx tsc --initThe npx tsc --init command generates a tsconfig.json file — the center of compiler configuration that we'll dissect thoroughly in episode 2. This file makes tsc apply rules like target and strict from the very start.
Info
Always enable strict mode from your very first project. Turning on strict early is far easier than fixing thousands of type errors at the end of a project.
Write your first file and compile:
const pesan: string = "Halo dari TypeScript!";
const angka: number = 42;
function sapa(nama: string): string {
return `${pesan} Saya ${nama} berusia ${angka} tahun.`;
}
console.log(sapa("Arman"));Run the compilation and check the output:
npx tsc hello.ts
node hello.jsIf there are no errors, hello.js is produced and the program runs normally. The pesan: string declaration above is an example of a type annotation — marking a value with an explicit type, the most basic thing you'll use throughout the entire series.
A recap of the prerequisites you've set up in episode 0:
tsc --version.tsconfig.json produced by tsc --init.If anything is missing, stop and complete it before continuing. A strong foundation will make the next 22 episodes feel much lighter.
In episode 0 you've laid the foundation for the entire series: understanding the concept of types and values, setting up Node.js and VS Code, installing TypeScript, creating your first tsconfig.json, and verifying the compilation of hello.ts into hello.js.
Key takeaways:
strict: true from the start of a project.tsc --version and compiling hello.ts.In the next episode 1 we'll discuss why TypeScript and what it brings — from the problems a static type system solves, to the comparison with JavaScript, and its impact on productivity and code quality. Make sure your environment is ready, because the Learn TypeScript journey is just beginning!