Quick take: TypeScript 7's native
tscruns a GitHub Actions type-check job in around 11 seconds where TypeScript 6 took roughly 95. Cache your dependencies, pin the Node version, and add--checkerson multi-core runners. Fewer runner-minutes, faster PR feedback.
TypeScript 7 went GA on July 8, 2026, and the native Go compiler ships as the ordinary tsc binary. There's no separate tsgo command to wire up. That matters for CI because your existing tsc --noEmit step gets 8x to 12x faster the moment you bump the typescript dependency. On a mid-size React app I maintain, the GitHub Actions type-check job dropped from about 95 seconds to 11. That's not a rounding error. It's the difference between reviewers waiting and reviewers reviewing. This tutorial wires the native compiler into a real workflow, with caching, --checkers, and a note on matrices. If you still need to migrate the project itself, start with the Project Corsa hub; here we're strictly talking CI.
Why bother putting type-checking in CI?
Because your editor lies to you. Local tsc reads whatever's cached, whatever branch you last touched, whatever node_modules you forgot to reinstall. CI runs clean. A dedicated type-check job on every pull request is the only thing that guarantees main actually compiles for the next person who clones it.
The old objection was cost. A full tsc --noEmit on a big codebase could eat 90 seconds or more per run, and on a busy repo that's thousands of runner-minutes a month. When we ran the numbers on a 40,000-line frontend last year, the type-check job alone accounted for nearly a third of our Actions bill. TypeScript 7 mostly deletes that objection. An 11-second job costs almost nothing and finishes before a reviewer has opened the diff.
What does the type-check workflow look like?
Here's a complete workflow that runs tsc --noEmit on every push and pull request. Nothing exotic, just the native compiler plus dependency caching.
name: Type Check
on:
push:
branches: [main]
pull_request:
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npx tsc --noEmit
Two things are doing the work here. The actions/setup-node step with cache: npm restores your dependency cache keyed off the lockfile, so npm ci skips the slow network fetch on a cache hit. And tsc --noEmit type-checks without writing a single .js file, which is all you want a CI gate to do. Prefer pnpm? Swap in pnpm/action-setup, set cache: pnpm, and run pnpm install --frozen-lockfile. The shape is identical.
How much does dependency caching actually save?
More than people expect. A cold npm ci on a project with 900-odd dependencies can run 40 to 60 seconds on a GitHub-hosted runner. With a warm cache it's closer to 8. So the caching step often saves more wall-clock time than the compiler upgrade did. Do both and the job that used to take two minutes finishes in under fifteen seconds.
One caveat I learned the hard way: the cache key has to include your lockfile hash, or you'll serve a stale node_modules after a dependency bump and get baffling type errors that don't reproduce locally. setup-node handles that for you when you point cache at the right lockfile. Don't hand-roll it unless you have to.
When should you reach for --checkers?
TypeScript 7 can split type-checking across CPU cores with the --checkers flag. On a default 2-core ubuntu-latest runner it barely moves the needle, since the work doesn't have enough cores to spread across. On a larger runner it's a real win. Microsoft's own VS Code numbers show default type-checking at 10.6 seconds dropping to 7.51 seconds with --checkers 8 (TypeScript Blog, July 2026).
So the rule of thumb is simple. Small repo on a 2-core runner? Leave it alone. Big monorepo on an 8-core box? Match the flag to the cores you've paid for:
# On a larger runner, spread type-checking across cores
npx tsc --noEmit --checkers 8
# Confirm you're on the native compiler (TS 7.0 or newer)
npx tsc --version
Is it worth paying for a bigger runner just to shave three seconds? Usually not on a small app. On a 500,000-line monorepo where the check still takes 30-plus seconds, absolutely, because you're also parallelizing across a dozen contributors hitting CI at once.
Do you still need a build matrix?
Sometimes, but not for this job. A type-check doesn't need to run on three Node versions, because types don't change between Node 20 and Node 22. So for the pure tsc --noEmit gate, skip the matrix and run once. Save the matrix for your test job, where runtime behavior actually differs across versions. Splitting type-checking into its own single job also means a type error fails fast and cheap, without spinning up your whole test grid first.
How does this pair with AI code review?
This is where it gets good. A green type-check tells you the code compiles. It says nothing about whether the code is any good. That's the gap automated review fills, and it's a core pillar here at Coding Dunia: fast deterministic checks for correctness, AI review for judgment. Wire a tool like CodeRabbit alongside the workflow above and every PR gets both a sub-15-second tsc gate and a contextual review pass. I walk through that exact setup in AI code review for TypeScript. The compiler catches the type errors; the AI catches the logic the types can't express.
The honest takeaway? TypeScript 7 doesn't just make CI faster, it makes a fast type-check job cheap enough that there's no excuse to skip it. Turn it on this week.
Related
- tsgo speed benchmarks for TypeScript 7 - the full methodology behind the 95-to-11-second numbers, measured repo by repo