Prerequisites
Before you start contributing to TypeScript, you’ll need:Find an Issue
Browse Help Wanted issues to find a bug or feature to work on.
Set Up GitHub
Create a GitHub account if you don’t already have one.
Install Node.js
Download and install Node.js. Both Current and LTS versions work.
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:Fork the Repository
Go to github.com/microsoft/TypeScript and click Fork.
Install Dependencies
Install the hereby build tool and project dependencies: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:Development Container (Optional)
If you prefer containerized development, TypeScript includes a dev container configuration:- Clone in Container
- Open Existing
Use VS Code’s Clone Repository in Container Volume command to set up a fresh environment.
Common Setup Issues
Filename too long on Windows
Filename too long on Windows
Windows users may need to enable long paths:Run this before cloning the repository.
Out of memory errors
Out of memory errors
If you encounter memory issues during build or test:
Using Local Builds
After making changes, build the compiler: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
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