microsoft/TypeScript
How to contribute
🚨 Read AGENTS.md first. This repository is in maintenance mode. TypeScript 6.0 is the last JavaScript-based release. Most code changes belong in microsoft/typescript-go, not here.
The maintainers will accept PRs in this repository only for:
- Crashes introduced in 5.9 or 6.0 that also reproduce in 7.0 and have a portable fix without behavioural changes.
- Security issues.
- Language-service crashes that substantially impact mainline usage.
- Serious 5.9 regressions that affect a large proportion of users.
- Non-disruptive
lib.d.tsupdates.
Anything else — new features, refactors, general bug fixes — should go to typescript-go. The compiler team has explicitly asked contributors to direct their effort there.
This section assumes you have an issue that fits the maintenance criteria and you are preparing to submit a PR.
Pages
- Development workflow — branch, fork, build, test, PR.
- Testing — runners, fourslash syntax, baseline workflow.
- Debugging —
printf-debugging,Debug.assert*, the inspector. - Patterns and conventions — coding style and architectural conventions.
- Tooling — hereby, dprint, ESLint, knip, esbuild, dtsBundler.
Quick checklist before submitting a PR
- Tests pass locally.
npx hereby runtests-parallel— 10–15 minutes is normal. - Lint passes.
npx hereby lint. Fix all issues; no exceptions. - Format is clean.
npx hereby format. - Baselines match.
git diff tests/baselinesshows only intentional, justified changes. - The PR description references the issue. Link to the bug and quote the relevant
AGENTS.mdcriterion. - AI assistance is disclosed. Per
CONTRIBUTING.md, if AI tools were used in producing the PR, say so in the description. Undisclosed AI-authored PRs are closed without review. - Line endings. Source files use CRLF. Make sure your editor and Git config preserve them.
Communication
- The issue tracker is for bugs and suggestions, not questions. Use Stack Overflow or the TypeScript Community Discord for questions.
- Don't post "I'm going to work on this" comments on issues — see the CONTRIBUTING.md rationale. Pick an issue tagged
Help WantedorBacklog, do the work, send the PR. - Avoid force-pushing — the team reviews the PR title and description rather than the commit history, but force-pushes make it harder to review iterations.
Maintainer expectations
- PRs should be against
main. - Tests must change in a way that demonstrates the fix.
- Baseline diffs should be reviewed line-by-line — surprising baseline changes often indicate unrelated regressions.
- Don't add automated comments to issues or PRs. Per the recently added comment-automation policy in CONTRIBUTING.md, automated comments will trigger an immediate block.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.