How to Install TypeScript on Windows, macOS and Linux

Installing TypeScript always starts with the same building blocks: install Node.js, confirm that npm works, then install the TypeScript compiler and verify it with tsc -v. The exact commands vary by operating system, so this page is the central guide for choosing the right walkthrough.

If you already know your platform, jump straight to the matching guide: install TypeScript on Windows, install TypeScript on macOS, or install TypeScript on Linux.

Choose Your Platform

Quick Comparison

PlatformTypical Node.js PathBest For
WindowsNode.js installer or wingetDeveloper workstations, Visual Studio Code, PowerShell users
macOSHomebrew or Node.js installerMac developer laptops, Apple Silicon, Intel Macs
Linuxapt, dnf, or distro package managerServers, cloud VMs, developer workstations, containers

Shared Install Flow

  1. Install Node.js and confirm both node and npm are available.
  2. Install TypeScript globally with npm install -g typescript, or use a project-local install with npm install --save-dev typescript.
  3. Verify the compiler with tsc -v.
  4. Compile a test file or run npx tsc --init in a project to generate a tsconfig.json file.
npm install -g typescript
tsc -v

Global vs Project-Local TypeScript

A global install is convenient when you want the tsc command available everywhere on your system. A project-local install is usually better for team projects because the TypeScript version is pinned in package.json and stays consistent across environments.

npm install --save-dev typescript
npx tsc --init

Which Guide Should You Read?

Use the OS-specific guides when you need platform-native troubleshooting, such as PATH issues on Windows, Homebrew setup on macOS, or package-manager differences on Linux.

Next Steps

Once TypeScript is installed, create a simple project, generate a tsconfig.json, and compile a small test file. If you work across multiple operating systems, keep this hub bookmarked and use the child guides for the exact commands and troubleshooting notes for each platform.

Elsewhere On TurboGeek:  How to Install TypeScript on Linux (npm, apt and dnf Guide)

Richard Bailey

Richard Bailey is the founder of TurboGeek and has spent more than a decade working across Windows Server, Linux, virtualization, cloud infrastructure and automation. He writes hands-on technical guides for sysadmins, engineers and IT teams, with a focus on clear instructions, practical troubleshooting and real-world infrastructure work.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »