Skip to main content
Important Note: All code changes should be submitted to the typescript-go repo. Development in this codebase is winding down and PRs will only be merged if they fix critical 6.0 issues.

Prerequisites

Before you start contributing to TypeScript, you’ll need:
1

Find an Issue

Browse Help Wanted issues to find a bug or feature to work on.
2

Set Up GitHub

Create a GitHub account if you don’t already have one.
3

Install Node.js

Download and install Node.js. Both Current and LTS versions work.
node --version  # Verify installation (requires >= 14.17)
4

Choose Your Editor

VS Code is recommended for TypeScript development.

Initial Setup

Fork and Clone

Create your own copy of TypeScript and clone it locally:
1

Fork the Repository

Go to github.com/microsoft/TypeScript and click Fork.
2

Clone Your Fork

git clone --depth=1 https://github.com/YOUR_USERNAME/TypeScript.git
cd TypeScript
The --depth=1 flag speeds up cloning by fetching only recent history.

Install Dependencies

Install the hereby build tool and project dependencies:
# Install hereby globally
npm install -g hereby

# Install project dependencies
npm ci
Use npm ci instead of npm install to ensure you get the exact dependency versions specified in package-lock.json.

Verify Your Setup

Run the test suite to ensure everything is working:
hereby runtests-parallel
This command builds the compiler and runs all tests in parallel. It may take several minutes on the first run.

Development Container (Optional)

If you prefer containerized development, TypeScript includes a dev container configuration:
Use VS Code’s Clone Repository in Container Volume command to set up a fresh environment.

Common Setup Issues

Windows users may need to enable long paths:
git config --global core.longpaths true
Run this before cloning the repository.
If you encounter memory issues during build or test:
export NODE_OPTIONS="--max-old-space-size=4096"

Using Local Builds

After making changes, build the compiler:
hereby local
Then use your local build instead of the installed TypeScript:
node built/local/tsc.js --version
node built/local/tsc.js myfile.ts
You can also run in watch mode:
node built/local/tsc.js --watch test.ts

Contribution Guidelines

Bug Fixes

TypeScript accepts bug fixes that:
  • Have an approved issue (labeled “help wanted” or in the “Backlog” milestone)
  • Include a link to the issue in the PR description
  • Add tests that fail without the fix

Features

Feature contributions:
  • Must be pre-approved by a TypeScript maintainer
  • Need to be labeled “help wanted” or in the “Backlog” milestone
  • Should not require language design changes
  • Cannot be adequately satisfied with external tools
Do not leave “I’m working on this” comments on issues. Many issues are harder than they appear, and such comments discourage others from trying. Just start working on issues marked “help wanted” - no permission needed!

Before You Submit

Before submitting a pull request, read the Building and Testing guides to ensure your changes pass all checks.

Resources

FAQ

Common questions and answers

Coding Guidelines

Style and conventions

Compiler Notes

Understand how the compiler works

Stack Overflow

Ask development questions

Next Steps

Building

Learn how to build TypeScript

Testing

Write and run tests

Build docs developers (and LLMs) love