TS7 Native Go Port Delivers 10x Faster Type Checking
Visual Studio Codego watch the original →
the gist
TypeScript team ports compiler to Go for native speeds and multi-threading, enabling 10x faster type checking; VS Code now uses it, halving build times, with live demo of TS7 websites upcoming.
Native Compiler Port Unlocks Massive Speed Gains
TypeScript's compiler, originally self-hosted in TypeScript (bootstrapped), faced scalability issues for large codebases with complex types, causing slow type checking on every keystroke. A year and a half ago, the team began porting it to Go for native performance and multi-threading—JavaScript's single-threaded nature limited sharing memory across workers. This tsgo compiler delivers ~10x faster type checking for most projects by processing in parallel, with configurable thread counts for beefier machines trading memory for speed.
Daniel Rosenwasser, TypeScript PM, emphasized low-risk testing via the 'Native Preview' VS Code extension: install from extensions view, enable, and it activates on TS/JS files without config changes. CLI users install @typescript/native-preview via npm and run tsgo instead of tsc. TS 6.0 acts as an alignment release (March 2024) matching TS 7 behaviors/deprecations on the legacy JS codebase, ensuring clean compiles on 6.0 predict smooth 7.0 upgrades. Nightly previews help catch breaks early.
Real-World Adoption and Benchmarks
Internal Microsoft teams, including VS Code, now build entirely with the native compiler: full VS Code codebase compiles in 30s (down from 60s, 2x faster), Copilot extension from 22s to 4s (5x). External adopters like Slack, Vanta, Notion, Figma report 4-5x gains on massive repos despite custom parallel stacks. "We've been really pushing for a lot of teams inside and outside of Microsoft to actually try out the new experience," Rosenwasser noted, highlighting seamless integration without API breaks.
VS Code Insiders 1.89 integrates this deeply, type-checking its own codebase with TS 7. James Montemagno demoed related updates: browser tab attachment to agents for context/actions, OpenTelemetry export for tracing Copilot sessions (spans GitHub MCP, Opus 47, tools), Markdown preview toggle for full-view editing, and network-enabled sandboxes.
Live Coding Workflow with TS7 and VS Code
The stream shifts to hands-on: Montemagno, a non-TS daily driver (.NET/MAUI/Swift), shares his 'stream timer' app (countdown/up for OBS streamers, popularized during pandemic). They set up VS Code Insiders as the sole browser for clean screen shares, agent integration, and incognito-like history. Plans: build 7 modern websites from scratch leveraging TS 7's LSP enhancements, real-time workflows, and optimized dev env—focusing on end-to-end DX from type system to completions/jumps.
Broader context ties into VS Code's new agents page (code.visualstudio.com), covering local/cloud/CLI agents, model swapping (Ollama/Foundry), skills/hooks/prompts, with courses on foundations/customization/documentation. OpenTelemetry standardization (like MCP for agents) enables observability across JS/TS apps, exporting traces/metrics/logs to providers like Aspire dashboard.
"Daniel Rosenwasser: 'for most projects it's going to actually be 10x faster'—core promise of native port, validated by VS Code's halved builds."
"Rosenwasser: 'if you're on 6.0 now and everything compiles cleanly you should have no problem using 7.0'—alignment release minimizes upgrade friction."
"Montemagno: 'VS Code's mentioning that um everything can be built in about 30 seconds Um previously it was like 60 seconds'—concrete win for 7M+ line codebase."
"Rosenwasser: 'they're hitting like at least four to 5x a lot of the time'—on Slack/Vanta/Notion/Figma gains despite optimizations."
"Montemagno: 'it's less about whatever we're cooking and more about the immensity of the cook'—captures stream's insider hype on rapid releases."
Key Takeaways
- Install Native Preview extension for instant 10x type checking in VS Code—no config, toggle off anytime.
- Use
@typescript/native-previewnpm for CLI:tsgo compilereplacestsc; test on TS 6.0 first for alignment. - Expect 2-10x build speeds scaling with threads/memory; large repos (e.g., VS Code) halve times.
- VS Code 1.89+ leverages TS 7 natively; try Insiders for LSP/agent/OpenTelemetry integrations.
- Attach browser tabs to agents for page analysis/actions; export Copilot traces via OpenTelemetry.
- Build TS sites with full Markdown preview toggle, network sandboxes for realistic testing.
- Early adopters (Slack, Figma) validate on monorepos; nightly previews catch breaks fast.
- Explore code.visualstudio.com/agents for local/cloud model swapping, prompt skills, courses.