microsoft/typescript-go
67.2
Adequate · 6 August 2026
1094.9k
lines of production code
JavaScript
with Go
2
measurements over time
What this system is
This system is a Go-based implementation of the TypeScript compiler and language server, designed to replace the original JavaScript/TypeScript codebase. It provides a complete type-checking engine, AST manipulation, and code generation capabilities, exposing these features through a JSON-RPC API and a Language Server Protocol (LSP) interface. The architecture includes a virtual file system, concurrent build and watch mode support, and extensive tooling for testing and baseline verification.
How it got here
2024–2025 — Go-based compiler and LSP implementation
140 changes.
This period focused on porting the TypeScript compiler and language server to Go, establishing the core infrastructure for type checking, AST manipulation, and file system abstraction. It introduced the initial project scaffolding, CLI entry points, and a comprehensive suite of internal packages for parsing, binding, and emitting code. The work also integrated the native preview extension and implemented the full LSP protocol with strict validation and concurrency safety.
2026 — Native preview and filesystem infrastructure
32 changes.
This period focused on establishing the native-preview package, introducing a synchronous TypeScript API and AST implementation for non-blocking compiler access. Concurrently, the codebase overhauled filesystem handling with new VFS wrappers and a pure Go file watcher, while also refactoring auto-import and reference-finding logic for improved reliability.
Features
Add --builders option and enforce build flag incompatibilities
The command-line parser now supports the new --builders flag to limit the number of projects that can build concurrently. Additionally, the parser now enforces that --clean, --verbose, and --watch cannot be combined with each other or with --dry, and that --singleThreaded is incompatible with --builders. Invalid values for --builders (zero, negative, or non-numeric) now produce specific error messages.
testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions · high confidence
Add ES2017+ downleveling transformers
The \internal/transformers/estransforms\ package now includes dedicated transformers for modern JavaScript features, enabling the compiler to transpile async/await, class fields, decorators, logical assignment, nullish coalescing, object rest/spread, exponentiation, and for-await. These new modules define the specific transformation logic for each feature and are chained together in \definitions.go\ to form the complete ES2016+ downleveling pipeline.
internal/transformers/estransforms · high confidence
Add Go-based baseline test utilities for TypeScript compiler testing
Added new Go files in \internal/testutil/tsbaseline\ to provide baseline comparison utilities for the TypeScript compiler's test harness. These utilities support generating and comparing baselines for error diagnostics, JavaScript emit, source maps, module resolution, and type/symbol information. The implementation includes helper functions for formatting diagnostics, handling test file paths, and managing baseline file extensions (e.g., \.errors.txt\, \.js\, \.map\), enabling consistent test verification across the codebase.
internal/testutil/tsbaseline · high confidence
Add IPC-based API transport with callback filesystem support
The API now supports an IPC-based transport layer, introducing \callbackFS\ to allow clients to provide a virtual filesystem via RPC callbacks. This enables features like in-memory file systems for testing. The change also introduces \AsyncConn\ and \SyncConn\ implementations for handling JSON-RPC and MessagePack protocols respectively, allowing the API to connect to an LSP process or run synchronously over STDIO. Additionally, the \StdioServer\ is updated to support both async (JSON-RPC) and sync (MessagePack) modes, and the \Session\ now tracks and releases API references for open projects and files to prevent memory leaks.
internal/api · high confidence
Add LSP test client infrastructure
Added the internal/testutil/lsptestutil package, which provides an LSP client implementation for testing. This includes a client transport that simulates editor-to-server communication using byte pipes, an LSPClient struct that manages message routing and request/response handling, and a MessageRouter goroutine that processes incoming server messages. This infrastructure enables tests to interact with the LSP server in a way that exercises the full marshal/unmarshal round-trip of protocol data structures.
internal/testutil/lsptestutil · high confidence
Add Node.js script evaluation utilities for tests
A new \node.go\ file introduces helper functions (\EvalNodeScript\, \EvalNodeScriptWithTS\) that allow tests to execute Node.js scripts and parse their JSON output. This enables test cases to run external JavaScript/TypeScript code during test execution, with automatic detection of the Node.js executable and support for injecting the TypeScript library into the script environment.
internal/testutil/jstest · high confidence
Add TypeScript source file transformers for import elision, type erasure, and decorator metadata
The \internal/transformers/tstransforms\ package now includes several new transformer modules that handle the core logic for stripping TypeScript-specific syntax and generating runtime metadata. \importelision.go\ removes unused or type-only imports and exports from the emitted JavaScript. \typeeraser.go\ strips all TypeScript-only constructs, including type annotations, interfaces, type aliases, and namespace declarations. \legacydecorators.go\ and \metadata.go\ process class and member decorators, with the latter generating the necessary type metadata arrays for decorator support. \runtimesyntax.go\ handles the transformation of TypeScript-specific runtime syntax. These changes implement the foundational transformer pipeline required to convert TypeScript source files into valid JavaScript.
internal/transformers/tstransforms · high confidence
Add file fixture utility for test helpers
A new \filefixture\ package is introduced in \internal/testutil/filefixture\, providing a \Fixture\ interface and implementations (\FromFile\, \FromString\) to simplify reading test fixture files in Go tests. This adds a new internal testing utility that allows tests to easily load and cache file contents, with automatic skipping if files are missing.
internal/testutil/filefixture · high confidence
Add in-process file watcher for LSP clients without dynamic registration
The LSP layer now includes a built-in file watcher implementation (internal/lsp/lspwatcher) that allows the LSP server to monitor file changes even when the client does not support dynamic registration of file watchers. This provides a fallback mechanism for file watching, ensuring that file change notifications are delivered to the LSP server regardless of client capabilities. The implementation includes a throttling window to coalesce adjacent filesystem bursts and handles edge cases like non-existent directories and symlinks.
internal/lsp/lspwatcher · high confidence
Add internal Go package for localizable diagnostic messages
The internal/diagnostics package was introduced to manage and localize diagnostic messages. It includes a core diagnostics.go file defining the Message struct and localization logic, a generated diagnostics\_generated.go file containing all diagnostic message definitions, and a generated loc\_generated.go file handling locale-specific translations for languages including German, French, Spanish, Japanese, Chinese, Korean, Russian, and others. The package also includes a test file (diagnostics\_test.go) verifying localization behavior, and an extraDiagnosticMessages.json file for additional diagnostic messages.
internal/diagnostics · high confidence
Add internal/fswatch filesystem watcher
Added the internal/fswatch package, a pure Go (no cgo) port of @parcel/watcher with significant modifications. It provides a unified WatchDirectory, WatchFile, and WatchDirectories API across Linux (fanotify/inotify), macOS (FSEvents), Windows, and BSD (kqueue). The implementation introduces a per-backend debouncer for event coalescing, shares FSEvents streams on macOS, and normalizes macOS paths to NFC. It also includes a CHANGES.md documenting the differences from the upstream C++ library.
internal/fswatch · high confidence
Add io/fs-based virtual file system implementation
A new \iovfs\ package provides a virtual file system implementation built on Go's \io/fs\ interface. It wraps a standard \fs.FS\ to support reading, writing, removing, and modifying files, with optional support for real paths and case sensitivity. Tests verify core file system operations like reading, walking directories, and handling paths.
internal/vfs/iovfs · high confidence
Add jsnum package for JavaScript-like number handling
The internal/jsnum package has been introduced to provide a \Number\ type and associated utilities that implement JavaScript's numeric behavior, including bitwise operations, string conversions, and special values like NaN and Infinity. This new component enables the language service to handle number parsing and formatting according to the ECMAScript specification, ensuring consistent numeric behavior across the codebase.
internal/jsnum · high confidence
Add lazy-loaded path resolution and TypeScript submodule checks
The internal/repo package now provides lazy, once-only resolution of the repository root, TypeScript submodule path, and test data path. A new SkipIfNoTypeScriptSubmodule helper allows tests to skip gracefully when the TypeScript submodule is missing, and a SkippableTest interface is exposed to support this skipping behavior.
internal/repo · high confidence
Add path utility functions and tests for file extension and path handling
The \internal/tspath\ package now includes new utilities for managing file extensions and path operations. This includes functions to identify, extract, and change file extensions (e.g., \ExtensionIsTs\, \ChangeExtension\, \GetDeclarationFileExtension\), as well as path manipulation functions like \CombinePaths\ and \StartsWithDirectory\. Additionally, a mechanism to filter out ignored paths (such as \node\_modules\ and \.git\ directories) has been added. These changes are accompanied by comprehensive test coverage for the new path and extension logic.
internal/tspath · high confidence
Add source map parsing and generation support
The \internal/sourcemap\ package now provides a complete implementation for parsing and generating source maps. This includes a \MappingsDecoder\ to parse existing source map strings into structured \Mapping\ objects, and a \Generator\ to construct source maps from source file and position data. The package also introduces a \DocumentPositionMapper\ to map between generated and source code positions, enabling features like 'go to definition' and 'find all references' to work with source maps. A test suite (\generator\_test.go\) validates the new functionality.
internal/sourcemap · high confidence
Add test utility functions for panic assertions and single-threaded program configuration
A new test utility package (internal/testutil) was added, providing AssertPanics for verifying expected panics in tests and RecoverAndFail for capturing stack traces on unexpected failures. Additionally, the package introduces a mechanism to determine if the test program should run in single-threaded mode, controlled by the TS\_TEST\_PROGRAM\_SINGLE\_THREADED environment variable and race detection status.
internal/testutil · high confidence
Added CommonJS and ES module transformers for module transformation
Added new module transformers for CommonJS and ES modules, including the \CommonJSModuleTransformer\ and \ESModuleTransformer\ in \internal/transformers/moduletransforms\. These components handle the transformation of source files into their respective module formats, managing imports, exports, and helper injections. The \ImpliedModuleTransformer\ routes source files to the appropriate transformer based on the target module format, while utility functions handle module specifier rewriting and external module name resolution.
internal/transformers/moduletransforms · high confidence
Added LSP-compliant glob pattern parsing
The internal/glob package now implements a parser for glob patterns compliant with the Language Server Protocol (LSP) specification. This adds support for standard glob syntax including wildcards (\, ?), multi-segment matching (\\*), grouping ({}), and character ranges (\[\]), enabling the application to correctly parse and validate document filter patterns used in LSP communication.
internal/glob · high confidence
Added Semver version and range parsing and comparison
The internal/semver package now includes new Go source files implementing the Semantic Versioning (Semver) specification. This adds the ability to parse, compare, and validate version strings (e.g., \1.2.3\, \1.2.3-pre.4+build.5\) and version ranges (e.g., \\>=1.2.3\, \\~1.2.3\, \1.2 \|\| 2.0.0\). The implementation supports major, minor, and patch wildcards, pre-release identifiers, build metadata, and logical OR disjunctions in ranges. Corresponding unit tests verify correct parsing, string formatting, and comparison logic for both single versions and range expressions.
internal/semver · high confidence
Added TypeScript enum definitions for the native-preview package
The native-preview package now includes a comprehensive set of TypeScript enum definitions, each provided in both ES2015 \enum\ format and a compiled \.ts\ variant for runtime compatibility. These files, located in \\_packages/native-preview/src/enums/\, map internal Go types to TypeScript constants, covering character codes, check flags, completion item kinds, diagnostic categories, element flags, emit options, internal symbol names, JSX emit modes, language variants, modifier flags, module detection and resolution kinds, and node/object flags. This enables the native-preview environment to access these internal compiler flags and configuration options directly in TypeScript.
_\packages/native-preview/src/enums · high confidence
Added a cached VFS wrapper for testing
A new \Wrap\ function and \FSMock\ struct were added to \internal/vfs/vfsmock\. The \Wrap\ function takes a \vfs.FS\ implementation and returns an \FSMock\ that delegates all file system operations to the provided instance, enabling easier mocking in tests.
internal/vfs/vfsmock · high confidence
Added const enum inlining transformer with synthetic comment support
A new const enum inlining transformer has been added to the inliners package. This transformer replaces property and element access expressions with their constant values, supporting numeric, string, and big integer literals. It also preserves original source comments as synthetic trailing comments on the replacement nodes, provided comments are not removed by compiler options.
internal/transformers/inliners · high confidence
Added filesystem baseline diffing utility
A new \fsbaselineutil\ package was introduced to provide filesystem snapshotting and diffing capabilities. This utility compares the current state of the virtual filesystem against a previous baseline, identifying new, modified, deleted, or rewritten files. It also includes logic to sanitize internal symbol names in file contents to ensure consistent baselines across runs.
internal/testutil/fsbaselineutil · high confidence
Added internal profiling utilities for CPU, memory, and heap profiles
The internal/pprof package now provides new functions and types to manage CPU, memory, and heap profiling. Users can start and stop CPU profiling via the CPUProfiler, or directly save heap and allocation profiles to specified directories. The package also exposes a RunGC function to trigger garbage collection, supporting internal debugging and performance analysis workflows.
internal/pprof · high confidence
Added new collection types: CopyOnWriteMap, OrderedMap, OrderedSet, Set, MultiMap, and SyncMap
The internal/collections package now includes several new data structures to support various use cases. CopyOnWriteMap and CopyOnWriteSet provide thread-safe, copy-on-write semantics for nested scopes. OrderedMap and OrderedSet maintain insertion order and support efficient iteration and cloning. The Set type offers standard set operations like union, intersection, and subset checks. MultiMap allows multiple values per key, useful for grouping items. SyncMap wraps Go's sync.Map for concurrent access, and SyncSet provides a thread-safe set. All new types include comprehensive test coverage.
internal/collections · high confidence
Added script to generate synchronous API from async source
A new build script, generateSync.ts, has been added to the native-preview package. This tool automatically generates synchronous versions of the async API by processing source files with custom directives and AST-based transformations. It removes async/await modifiers, unwraps Promise types, and handles specific code comments to control the generation process, ensuring the sync API stays in sync with the async source.
_\packages/native-preview/scripts · high confidence
Added string test utility for dedenting multi-line strings
A new \stringtestutil\ package was added to the codebase, providing a \Dedent\ function that processes multi-line strings by removing leading and trailing blank lines, normalizing tabs to spaces, and stripping common indentation. This utility is intended for use in tests to handle formatted string literals cleanly.
internal/testutil/stringtestutil · high confidence
Bundled TypeScript library files are now embedded in the binary
The \internal/bundled\ package now embeds the TypeScript library files (such as \lib.d.ts\ and other \lib.\*.d.ts\ files) directly into the binary using Go's \//go:embed\ directive. This allows the application to access these files from an in-memory file system rather than relying on the file system for these specific paths. The \WrapFS\ function now returns a wrapper that redirects embedded paths to this in-memory store, while non-embedded paths fall back to the original file system. A code generator (\generate.go\) creates the necessary Go source files (\embed.go\, \embed\_generated.go\, \libs\_generated.go\) to manage these embedded resources. This change supports both embedded and non-embedded builds, with the latter falling back to reading from the executable's directory.
internal/bundled · high confidence
Concurrent type checking and emit infrastructure
The compiler now supports concurrent type checking and file emission. A new \CheckerPool\ manages a pool of type checkers, allowing multiple files to be checked in parallel, which improves performance on large projects. Additionally, the \EmitHost\ and \emitter\ implementations have been refactored to support concurrent emission, ensuring thread-safe access to file system operations and resolver states during the emit phase.
internal/compiler · high confidence
Go to Source Definition for JavaScript and CommonJS modules
Developers can now use 'Go to Source Definition' to jump from TypeScript usage sites directly to the underlying JavaScript source files, including CommonJS modules, re-exports, and type declarations. This feature supports various import patterns (default, named, namespace), aliased imports, and property access on imported objects, ensuring that navigation respects source files over declaration files when appropriate.
testdata/baselines/reference/fourslash/goToSourceDefinition · high confidence
Implement code lens support for references and implementations
The language service now provides code lenses for references and implementations, allowing editors to display clickable links to all references and implementations of a symbol. The implementation includes \ProvideCodeLenses\ and \ResolveCodeLens\ methods in the \internal/ls\ package, which traverse the AST to identify valid nodes for code lenses, and resolve them to actual locations. This feature is controlled by user preferences (\ReferencesCodeLensEnabled\ and \ImplementationsCodeLensEnabled\).
internal/ls · high confidence
Implement declaration emit diagnostics and symbol tracking
The declaration emit system now includes comprehensive diagnostic reporting and symbol accessibility tracking. A new \SymbolTrackerImpl\ monitors symbol accessibility, reporting errors for inaccessible types, cyclic structures, and non-serializable properties. The \diagnostics.go\ file introduces logic to generate specific error messages for various declaration nodes, ensuring that users receive clear feedback when their code cannot be safely converted to type declarations.
internal/transformers/declarations · high confidence
Implement incremental build state management and file tracking
The incremental build system now manages its own state via a new \snapshot\ struct that tracks file signatures, affected files pending emit, and diagnostic information. This change introduces dedicated handlers for computing affected files (\affectedfileshandler.go\), managing build info serialization (\buildInfo.go\, \snapshottobuildinfo.go\, \buildinfotosnapshot.go\), and handling file emissions (\emitfileshost.go\). The \Program\ type now wraps the core compiler program to coordinate incremental checks, caching of semantic and emit diagnostics, and tracking of which files need re-emission based on shape changes or global scope effects. This enables the build system to efficiently determine which files have changed and require recompilation or re-emission without a full rebuild.
internal/execute/incremental · high confidence
Implement module specifier generation and auto-import preferences
Added new internal modulespecifiers package that generates module specifiers for imports and auto-imports. The implementation includes logic to determine specifier preferences (e.g., .js, .ts, or minimal extensions) based on user settings and compiler options, handles symlink resolution, and supports exclusion of auto-imports via regex patterns. A corresponding test file was added to verify the new specifier generation logic.
internal/modulespecifiers · high confidence
Implement output path calculation and common source directory logic
Added the internal \outputpaths\ package to handle TypeScript compilation output paths. This includes logic to compute the common source directory (defaulting to the config file's directory if \rootDir\ is not set), generate output file paths for JavaScript, source maps, and declarations, and manage file extensions. This change introduces the core path resolution mechanisms used by the compiler to determine where to emit generated files.
internal/outputpaths · high confidence
Initial implementation of the TypeScript type checker
The \internal/checker\ package is introduced, providing the core type-checking engine for the Go-based TypeScript compiler. This includes the main \Checker\ struct and its associated logic for flow analysis, grammar validation, and declaration emission resolution. The implementation exposes a public API for retrieving types, symbols, and signatures, enabling downstream components like the Language Server Protocol (LSP) and IDE integrations to perform static analysis on TypeScript and JavaScript code.
internal/checker · high confidence
Initial project scaffolding and configuration
The repository is initialized with essential configuration files that define the project's tooling and structure. A Go linter configuration (.golangci.yml) is added, enforcing a modern set of Go linting rules and custom lint checks. Formatting is standardized via .dprint.jsonc, which configures the dprint formatter for TypeScript, JSON, YAML, and Go (gofumpt). The build and test workflow is managed by a new Herebyfile.mjs script, which orchestrates tasks like building, testing, and generating code. Additionally, standard repository metadata files such as .gitattributes, .gitmodules (pointing to the TypeScript upstream), and a comprehensive NOTICE.txt for third-party licenses are included to establish the project's legal and structural foundation.
(repo-wide) · high confidence
Introduce AST schema and code generators for Go and TypeScript
Added a new \\_scripts/ast.json\ schema file and accompanying TypeScript generators (\generate-go-ast.ts\, \generate-ts-ast.ts\, \generate-encoder.ts\, \schema.ts\) that define the structure of the TypeScript AST. These scripts read the schema to produce Go and TypeScript code for AST node definitions, factories, visitors, and encoders/decoders, enabling the generation of type-safe, memory-efficient AST representations in both languages.
_\scripts · high confidence
Introduce CLI entry points for LSP and API modes
The \cmd/tsgo\ package now provides structured entry points for running the TypeScript Language Server and the asynchronous API server directly from the command line. Users can invoke \--lsp\ to start the language server or \--api\ to start the JSON-RPC-based API server, each with specific flags for communication (stdio, pipes, sockets) and profiling. The implementation includes platform-specific process monitoring to automatically shut down the LSP server if the parent editor process exits, and enables virtual terminal processing on Windows for better console output.
cmd · high confidence
Introduce Fourslash test conversion and management scripts
Added a new Go test conversion script (convertFourslash.mts) that parses TypeScript Fourslash test files and generates corresponding Go test files in the internal/fourslash/tests/gen directory. The scripts also manage lists of failing and crashing tests (failingTests.txt, crashingTests.txt) and provide a utility (makeManual.mts) to manually exclude specific tests from automatic conversion. This infrastructure supports the ongoing port of TypeScript's Fourslash test suite to Go.
_internal/fourslash/\scripts · high confidence
Introduce Go implementation of the TypeScript binder and name resolution
The \internal/binder\ package now contains the Go implementation of the TypeScript binder, including \binder.go\ for symbol binding and scope management, \nameresolver.go\ for name resolution logic, and \referenceresolver.go\ for resolving references. This adds the core symbol binding and name resolution capabilities to the Go compiler, enabling proper scoping, symbol table management, and reference resolution for TypeScript and JavaScript files.
internal/binder · high confidence
Introduce Go-based TypeScript compiler and watch mode entry points
The \internal/execute\ package now provides the primary entry points for the TypeScript compiler (\tsc\) and its watch mode. The \tsc.go\ file implements the command-line interface, routing build (\-b\) and compilation (\-c\) requests to their respective handlers, while \watcher.go\ implements the file-watching logic using a \WatchManager\ and \fswatch\ backend to trigger incremental rebuilds. This change replaces the previous Go implementation with a new structure that supports command-line parsing, diagnostic reporting, and watch-mode lifecycle management.
internal/execute · high confidence
Introduce Go-based tsc execution layer with improved diagnostics, timing, and config caching
The \internal/execute/tsc\ package now implements the core \tsc\ execution logic in Go, replacing the previous approach. This change introduces structured exit codes for better error reporting, accurate compile-time statistics (parse, bind, check, emit), and a thread-safe cache for extended \tsconfig.json\ files that prevents deadlocks on circular references. Additionally, the compiler now supports the \FORCE\_COLOR\ environment variable to control output coloring, provides a \--help --all\ flag for comprehensive option documentation, and generates a default \tsconfig.json\ via \tsc --init\.
internal/execute/tsc · high confidence
Introduce JSDoc parsing and reparsing infrastructure
The parser now supports parsing JSDoc comments for TypeScript and JavaScript files. This change introduces new files (\jsdoc.go\, \reparser.go\, \types.go\, \utilities.go\) and updates \parser.go\ to handle JSDoc parsing, including lazy parsing for TS files, reparsing of JSDoc tags into synthetic nodes, and handling of various JSDoc tags like \@typedef\, \@callback\, \@import\, and \@overload\. The \parser\_test.go\ file adds fuzz tests for the parser, and \references.go\ is updated to handle module references in the context of JSDoc.
internal/parser · high confidence
Introduce JSX transformer implementation
Added the core implementation for the JSX transformer, including the main transformer struct, visitor logic for JSX elements, fragments, and text nodes, and helper functions for generating React factory calls and managing implicit runtime imports.
internal/transformers/jsxtransforms · high confidence
Introduce NodeBuilder type definitions and interfaces
Added the \types.go\ file in \internal/nodebuilder\, which defines the \SymbolTracker\ interface and \Flags\/\InternalFlags\ constants used by the node builder and emit resolver. This establishes the type structure for node building operations.
internal/nodebuilder · high confidence
Introduce OS-backed virtual file system with symlink and semaphore support
The internal/vfs/osvfs package now provides an OS-backed file system implementation that supports symlinks and junctions, including a corrected realpath resolution for symlinked directories. File system operations are protected by semaphores to limit concurrent blocking syscalls, and the implementation includes a case-sensitivity detection mechanism for the underlying file system.
internal/vfs/osvfs · high confidence
Introduce TypeScript 7 (tsgo) as a native preview option
The extension now supports a new native TypeScript language server (tsgo) alongside the existing TSServer. Users can enable this preview feature by setting \js/ts.experimental.useTsgo\ to true, which triggers an extension host restart to activate the new server. The extension manages the lifecycle of both servers, allowing users to switch between them via command palette commands or settings. The implementation includes a new \SessionManager\ to handle server startup, shutdown, and restart logic, along with an \ExperimentationService\ to manage feature flags for the preview. Configuration is handled via a new \configurationMiddleware\ that merges settings from \js/ts\, \typescript\, and \javascript\ sections with correct precedence. Additionally, the extension registers new language features such as multi-document highlights, verbose hovers, and auto-insertion of closing tags, all implemented through the new LSP client. The extension also tracks the active JS/TS editor more robustly to handle cases where the user switches to output views or debug consoles.
_\extension/src · high confidence
Introduce VFS abstraction for file system operations
A new VFS package provides a file system abstraction that allows the application to interact with the file system through a consistent interface. This includes methods for reading, writing, and removing files, as well as checking file and directory existence. The implementation supports case-sensitive file names and includes a benchmark test to measure performance of file reading operations.
internal/vfs · high confidence
Introduce async TypeScript API for native preview
Added a new asynchronous API layer in the native-preview package, including an async client for IPC/stdio communication, a comprehensive set of type definitions for TypeScript's type system (e.g., Type, Signature, Symbol), and utilities for encoding/decoding AST nodes. This enables programmatic access to TypeScript's type-checking and completion features in a non-blocking manner.
_\packages/native-preview/src/api · high confidence
Introduce baseline test utilities and race detector helpers
Added a new \internal/testutil/baseline\ package that provides utilities for managing and comparing test baselines, including support for submodule diffs, accepted/triaged diff tracking, and first-class unused baseline tracking. Also added \internal/testutil/race\ package to detect if the Go race detector is enabled, allowing tests to conditionally skip or adjust behavior when race detection is active.
internal/testutil/baseline · high confidence
Introduce binary AST encoding and decoding for the internal API
Added a new binary serialization format for the TypeScript AST, enabling efficient encoding and decoding of source files. The \internal/api/encoder\ package now includes \encoder.go\ and \decoder.go\ to handle the binary format, along with generated files (\encoder\_generated.go\, \decoder\_generated.go\) that map node kinds to their binary representation. This change introduces a new protocol version (5) and a structured binary layout for AST nodes, strings, and extended data. Tests (\encoder\_test.go\, \decoder\_test.go\) verify the round-trip encoding/decoding of various AST structures, including variable declarations, function declarations, and template expressions. This binary format is likely used for IPC or caching, providing a more compact representation than JSON or other text-based formats.
internal/api/encoder · high confidence
Introduce build mode for incremental project builds
Added a new build mode that enables incremental compilation of TypeScript projects with inter-project dependencies. This change introduces an orchestrator that manages build tasks, resolves project references, and determines build order based on dependency graphs. The implementation includes caching of source files and build info, support for watch mode, and handling of up-to-date status to skip unnecessary rebuilds. A test suite validates the build order generation and dependency resolution.
internal/execute/build · high confidence
Introduce cached VFS wrapper for file system operations
Added a new cached VFS wrapper in internal/vfs/cachedvfs that wraps an underlying vfs.FS implementation to cache the results of directory, file, and stat checks. The wrapper supports enabling, disabling, and clearing the cache, which reduces redundant file system calls for repeated path lookups.
internal/vfs/cachedvfs · high confidence
Introduce core utility types and algorithms
The internal/core package now includes a suite of foundational utilities: an Arena allocator for efficient memory reuse, a parallel Breadth-First Search algorithm, a unique binary search function, and a PagedLinkStore for sparse key storage. Additionally, the package introduces core data structures such as Tristate, ScriptKind, and CompilerOptions, alongside helper types like TextRange and Pattern matching.
internal/core · high confidence
Introduce extensible filesystem wrapper for custom file operations
A new \wrapvfs\ package provides a wrapper around the standard filesystem interface, allowing specific file system methods (such as \ReadFile\, \WriteFile\, \Stat\, etc.) to be replaced with custom implementations. This enables the system to override default file system behavior for specific paths or conditions, supporting features like module specifier cache misses in symlinked directories.
internal/vfs/wrapvfs · high confidence
Introduce file-access tracking for watch mode
Added a new \trackingvfs\ package that wraps the existing VFS to record every file path accessed during compilation. This allows the watch mode to know exactly which files and directories the compiler depended on, including non-existent paths from failed module resolution, enabling more efficient file watching.
internal/vfs/trackingvfs · high confidence
Introduce internal AST package with comprehensive node types, factories, and utilities
The \internal/ast\ package has been introduced, providing the core data structures for the TypeScript AST. This includes generated code for all node kinds and their corresponding factory methods, along with supporting types for flags (node, function, modifier, check, and flow flags), deep cloning, and diagnostic handling. This change establishes the foundational layer for parsing and manipulating the abstract syntax tree.
internal/ast · high confidence
Introduce internal expression evaluator for type checking
Added a new internal \evaluator\ package that provides an \Evaluator\ function for evaluating TypeScript expressions. This component handles the evaluation of various expression types, including binary expressions (arithmetic, bitwise, string concatenation), unary expressions, template literals, and identifiers. The evaluator tracks metadata such as whether the result is syntactically a string, if it resolved references from other files, and if it contains external references. This is a foundational change for the type-checking system, enabling the compiler to compute constant values and resolve dependencies during type checking.
internal/evaluator · high confidence
Introduce native AST implementation in the native-preview package
The \@typescript/native-preview\ package now includes a complete, hand-written and generated AST implementation. This adds core type definitions and interfaces for all AST nodes, tokens, and keywords, alongside utility functions for navigation (\astnav.ts\), deep cloning (\clone.ts\), type guarding (\is.ts\), and JSDoc processing (\jsdoc.ts\). The change also introduces a text-based scanner (\scanner.ts\) and a factory for creating AST nodes (\factory.generated.ts\), providing the foundational building blocks for parsing and manipulating the AST in the native preview environment.
_\packages/native-preview/src/ast · high confidence
Introduce new Go-based test runner for compiler tests
The internal testrunner package has been replaced with a new Go implementation that parses TypeScript test cases, handles multi-file test units, and generates baselines. This new runner supports both regression and conformance test types, allowing the test suite to produce and compare baseline outputs for compiler tests.
internal/testrunner · high confidence
Introduce new package.json parsing and caching infrastructure
The \internal/packagejson\ package now features a comprehensive, type-safe parsing system for \package.json\ files. This includes a new \JSONValue\ type that preserves the original JSON type (string, number, boolean, array, object, or null) to enable precise validation and error reporting. The \Expected\[T\]\ generic type allows fields to track whether they were present and valid. The \ExportsOrImports\ type specifically handles the complex structure of \exports\ and \imports\ fields, distinguishing between subpaths, conditions, and imports. Additionally, a new \InfoCache\ provides thread-safe caching of parsed \package.json\ data, using a \sync.Once\ pattern for lazy initialization and a \SyncMap\ for concurrent access. This infrastructure supports features like \typesVersions\ resolution and dependency checking.
internal/packagejson · high confidence
Introduce pseudochecker for generating pseudo-types
Added a new pseudochecker package that provides a limited type-checking mechanism to generate 'pseudo-types' (skeletons of types) for expressions and declarations. This includes the core PseudoChecker struct, lookup logic for retrieving types from various AST nodes (accessors, variables, properties), and type definitions (Direct, Inferred, NoResult, etc.) to support declaration emit and isolated declarations features.
internal/pseudochecker · high confidence
Introduce structured diagnostic formatting with color and context
Added a new \internal/diagnosticwriter\ package that provides structured formatting for compiler and LSP diagnostics. This introduces a \Diagnostic\ interface and wrapper types (\ASTDiagnostic\) to abstract over different diagnostic sources, enabling consistent, colorized output with file locations, code snippets, and related information. This change supports improved error reporting in the CLI and IDE integrations by separating error reporting logic from the compiler's internal representation.
internal/diagnosticwriter · high confidence
Introduce transformer chaining and destructuring flattening infrastructure
The internal/transformers package now provides a new chaining mechanism that runs transforms sequentially on SourceFile nodes, allowing multiple transformation passes to be composed. Additionally, new utilities for flattening destructuring patterns into individual assignments and bindings have been added, enabling more granular control over how destructuring is processed during code generation.
internal/transformers · high confidence
Introduces core printer infrastructure for code generation
The \internal/printer\ package now includes foundational components for code generation, including an \EmitContext\ for managing transformation state, a \NodeFactory\ for creating AST nodes, a \NameGenerator\ for handling unique and temporary identifiers, and a \ChangeTrackerWriter\ for tracking node positions. These additions provide the necessary scaffolding for emitting JavaScript/TypeScript code from the AST.
internal/printer · high confidence
New LSP protocol implementation with strict JSON validation
The internal/lsp/lsproto package now includes a complete, generated implementation of the Language Server Protocol (LSP) types and a custom JSON codec. This introduces strict validation that rejects explicit null values for required and non-nullable fields, ensuring that the LSP message structures adhere to the protocol's type safety requirements. The new \structcodec\ and \jsonrpc\ modules provide a reflection-driven decoding mechanism that enforces required fields and rejects invalid nulls, while the generated \lsp\_generated.go\ file provides the full set of LSP types.
internal/lsp/lsproto · high confidence
New auto-import and import organization infrastructure
The language service now includes a new auto-import infrastructure and import organization utilities in the \lsutil\ package. This introduces functions to determine if a position is an Automatic Semicolon Insertion (ASI) candidate, identify completed nodes, and organize imports with configurable sorting (ordinal, natural, or Unicode collation) and type ordering. It also adds support for formatting code options, user preferences for auto-imports and code lens, and utilities for symbol display and quote preference detection.
internal/ls/lsutil · high confidence
New auto-import and type acquisition infrastructure
The project directory now includes a new auto-import and type acquisition (ATA) subsystem. This adds a \project/api.go\ file that exposes \APIUpdate\ and \APIUpdateTemporary\ methods for managing project and file state in the language service. A new \internal/project/ata\ package implements the core logic for discovering and installing TypeScript type definitions from npm, including a \TypingsInstaller\ and helpers for validating package names and discovering typings from \package.json\ and source files. The implementation is accompanied by comprehensive tests in \ata\_test.go\, \discovertypings\_test.go\, and \validatepackagename\_test.go\ that verify the behavior of the typings installer, discovery logic, and package name validation.
internal/project · high confidence
New auto-import infrastructure
The auto-import feature has been refactored into a new, modular architecture. This introduces a registry-based system that manages 'buckets' of exports from project files and node\_modules, tracking dirty state to avoid unnecessary recomputation. Key components include an \aliasResolver\ that implements the \checker.Program\ interface to resolve module imports, an \export\ module that extracts and categorizes module exports, and an \import\_adder\ that accumulates and coalesces import statements. The change also adds an \Index\ for efficient name-based lookups of exported symbols. These changes improve the reliability and performance of auto-import suggestions by handling edge cases like symlinks, case sensitivity, and concurrent updates more robustly.
internal/ls/autoimport · high confidence
New custom lint rules for Go code quality
The \\_tools/customlint\ package now includes several new linting rules to improve code quality and catch common mistakes. The \bitclear\ analyzer suggests using the \&^=\ operator instead of \&= ^\. The \checkchildren\ analyzer flags early returns in checker dispatch methods that skip checking child nodes, ensuring stable diagnostics. The \cleanup\ analyzer detects \t.Cleanup\ closures that capture testing variables from the enclosing function, which can lead to panics. The \emptycase\ analyzer finds empty switch/select cases. The \forbidparentaccess\ analyzer prevents accessing \.Parent\ in transformers. The \shadow\ analyzer identifies unintended variable shadowing. The \unexportedapi\ analyzer ensures exported APIs do not reference unexported types. These rules are registered in \plugin.go\ and tested via \plugin\_test.go\ and corresponding testdata files.
_\tools/customlint · high confidence
New test harness utilities for compiler testing
Added new test utility packages (harnessutil) that provide a comprehensive framework for running TypeScript compiler tests. This includes a test file and configuration model, a virtual file system wrapper that records output files, and a source map recorder that validates source map mappings against encoded data. These utilities enable the test runner to compile files, manage test configurations, and generate baselines for compiler diagnostics and emitted JavaScript/Source Maps.
internal/testutil/harnessutil · high confidence
New test utilities for auto-import and project lifecycle testing
Added new test utilities in internal/testutil/projecttestutil to support auto-import and project lifecycle testing. This includes fixture helpers for monorepo and project setups, along with generated mock implementations for the client and npm executor interfaces to facilitate testing of TypeScript project interactions.
internal/testutil/projecttestutil · high confidence
New vfstest package for in-memory filesystem testing
A new \internal/vfs/vfstest\ package has been introduced to provide an in-memory filesystem implementation for testing purposes. It supports configurable case sensitivity, symlink resolution, and case-insensitive path matching, allowing tests to interact with a virtual filesystem that mimics real OS behavior without touching the disk.
internal/vfs/vfstest · high confidence
Port Fourslash test harness to Go
The internal Fourslash test harness has been ported from the original TypeScript/JavaScript implementation to Go. This includes the core test runner (\fourslash.go\), the test parser (\test\_parser.go\), and supporting utilities for baseline comparison (\baselineutil.go\, \statebaseline.go\), semantic token verification (\semantictokens.go\), and a mechanism to skip known-failing tests (\skip\_if\_failing.go\). This change enables the Go-based LSP server to execute the existing suite of Fourslash tests, which cover features such as auto-imports, call hierarchy, code lenses, document highlights, and various navigation and editing commands.
internal/fourslash · high confidence
Port scanner and token navigation utilities to API client, include JSDoc in encoded ASTs, add more SourceFile properties
The scanner module has been ported to the API client, introducing new files for regular expression parsing (\regexp.go\), the main scanner logic (\scanner.go\), and utility functions (\utilities.go\). This change adds support for parsing regular expressions, including handling of flags like \d\, \g\, \i\, \m\, \s\, \u\, \v\, and \y\, as well as class set expressions and named capturing groups. The scanner now includes JSDoc in encoded ASTs and adds more SourceFile properties, enhancing the internal representation of source files for better navigation and analysis capabilities.
internal/scanner · high confidence
Ported the TypeScript code formatter to Go
The internal/code formatter has been ported from TypeScript's JavaScript implementation to Go. This change introduces a new \internal/format\ package that provides the core formatting logic, including indentation calculation, rule-based whitespace management, and context handling. The Go implementation exposes public API functions such as \FormatDocument\, \FormatSelection\, and \FormatOnEnter\ to the language server, enabling code formatting capabilities within the editor. The port includes comprehensive test coverage for various formatting scenarios, including JSDoc comments, tab indentation, and chained method calls.
internal/format · high confidence
Architecture
Refactor internal change tracking and deletion logic
The internal change tracking and deletion logic has been restructured into a new \internal/ls/change\ package, introducing a \Tracker\ that manages text edits and node deletions with specific handling for trivia (comments, whitespace) and formatting. This refactoring consolidates the logic for deleting various AST nodes (such as parameters, imports, and variable declarations) and applying text changes, ensuring that leading and trailing trivia is preserved or removed according to context-specific rules.
internal/ls/change · high confidence
Behavioural changes
Adopts go-json-experiment/json for JSON handling
The internal JSON package has been replaced with a wrapper around the go-json-experiment/json library. This change introduces support for invalid UTF-8 sequences by default and provides new wrapper functions for marshalling and unmarshalling, including streaming variants via jsontext.Encoder and io.Writer. Users will experience potentially different error handling for invalid UTF-8 and may see changes in JSON output formatting or performance characteristics due to the new underlying library.
internal/json · medium confidence
Fix build mode setup stall on large solutions
Resolved an issue where the TypeScript build mode could stall during setup on large solutions, ensuring smoother and more reliable incremental compilation workflows.
testdata/baselines/reference/tsbuildWatch/dependencyUpdate · medium confidence
Fix go-to-type-definition for tuple types
The 'go to type definition' navigation now correctly handles tuple types. Previously, navigating to the type definition for variables declared with tuple types (e.g., \\[number, number\]\) may have failed or behaved incorrectly. This change ensures that users can reliably jump to the definition of tuple types, including generic tuple types like \DoubleTupleTrouble\<number\>\, improving code navigation consistency.
testdata/baselines/reference/fourslash/goToType · medium confidence
Improved 'Find All References' for JSDoc, CommonJS, and dynamic imports
The 'Find All References' feature now correctly resolves references in more scenarios. It handles JSDoc function types (e.g., \@type {function}\), CommonJS exports (\module.exports\), and dynamic \import()\ calls. Additionally, it now finds references within JSDoc \@link\ and \@see\ tags, and correctly identifies references in catch clauses and class static blocks.
testdata/baselines/reference/submodule/fourslash/findAllReferences · high confidence
Improved LSP reliability and observability
The LSP server now uses a new dynamic queue for message handling to prevent deadlocks and improve concurrency safety. A new progress tracking system provides users with visual feedback during long-running operations like project loading, with a configurable delay before showing progress indicators. Additionally, a dedicated logger component has been introduced to manage log verbosity and message routing, ensuring that log messages are appropriately filtered based on severity and client capabilities.
internal/lsp · high confidence
Improved TypeScript watch mode file system event handling
The TypeScript watch mode now correctly detects and recompiles on a wider variety of file system changes, including newly added files in deep or non-existent include paths, symlinked node\_modules, and simultaneous file additions and deletions. This ensures that the incremental compiler accurately tracks changes to source files, type declarations, and directory structures, preventing stale build states and ensuring that the watch process responds reliably to all relevant file system events.
testdata/baselines/reference/tscWatch/commandLineWatch · high confidence
Improved command-line argument parsing and error reporting
The command-line parser now provides more precise error messages for invalid or missing arguments, including suggestions for misspelled flags (e.g., '--declarations' suggests 'declaration'), validation for empty or null values for options like --lib, --module, and --target, and stricter enforcement that certain options (e.g., --composite, --rootDirs, --paths) can only be set to 'null' on the command line. It also correctly handles edge cases such as trailing whitespace in --lib values and immediate following arguments for boolean flags.
testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine · high confidence
Improved document highlights for inherited properties, parameter properties, and various language features
The document highlights feature has been enhanced to correctly highlight inherited properties in interfaces and classes, as well as parameter properties (private, public, protected) in constructors. Additionally, highlights are now properly applied to keywords such as 'abstract', 'async', 'await', 'yield', 'in', 'switch', 'case', 'default', and 'export'. The implementation also supports highlighting for JSX tag names, template strings, JSDoc typedefs, and module imports/references across multiple files. These changes ensure that all relevant symbols and keywords are consistently highlighted during code navigation and search operations.
testdata/baselines/reference/fourslash/documentHighlights · high confidence
Improved error reporting for declaration emit failures and symlink resolution
The compiler now reports errors during declaration file generation even when incremental builds are enabled, ensuring that build failures in dependent projects are surfaced correctly. Additionally, the compiler provides more precise error messages for unsafe import errors and improves symlink resolution for module specifiers, leading to more accurate file tracking and build state management.
testdata/baselines/reference/tsc/declarationEmit · medium confidence
Improved inlay hints for element access, identifier location, and computed property names
The inlay hints system now correctly handles several previously problematic or unhandled cases, ensuring stable and accurate type information is displayed. Specifically, the system now supports identifier locations in inlay hints, accurately recognizes property access expressions, and handles computed property names. These changes prevent crashes and provide more precise type hints for element access, tuple types, and using declarations, improving the overall reliability of the inlay hint feature.
testdata/baselines/reference/fourslash/inlayHints · medium confidence
Improved rename behavior for imports and quoted property names
The rename feature now respects the \useAliasesForRename\ setting, meaning that when renaming an imported name, the editor will use the alias if configured. Additionally, the rename operation now correctly handles quoted single-character property names and unresolved re-exports, preventing crashes and ensuring consistent renaming across these edge cases.
testdata/baselines/reference/fourslash/findRenameLocations · medium confidence
Improved signature help for JSDoc and destructured parameters
Signature help now correctly handles JSDoc type annotations, including module paths, function signatures, and optional parameters. It also properly displays information for destructured function parameters, such as object and array patterns, ensuring the correct parameter is highlighted in the signature help tooltip.
testdata/baselines/reference/fourslash/signatureHelp · high confidence
Improved smart selection ranges for JSDoc tags and mapped types
The smart selection feature has been updated to provide more accurate and consistent selection ranges for JSDoc comments and mapped types. For JSDoc tags (such as @param, @type, @template, @callback, @constructor, and @this), the selection now correctly includes the full type annotation or the entire JSDoc block, rather than just the specific identifier. Similarly, for mapped types, the selection now properly encompasses the full mapped type expression, including modifiers like -readonly and optional markers. This change ensures that when users invoke smart selection on code elements, the resulting selection is more predictable and useful for further editing or copying.
testdata/baselines/reference/submodule/fourslash/smartSelection · high confidence
Improved tsconfig.json and jsconfig.json parsing and validation
The configuration file parser now correctly handles null overrides in extended tsconfig files, properly processes typeAcquisition settings in both tsconfig.json and jsconfig.json, and enforces stricter validation for file lists and include paths. The changes also add specific error messages for unknown type acquisition options, prevent parent directory traversal after recursive wildcards, and ensure that empty files or include lists generate appropriate errors. Additionally, dotted files and folders are now correctly ignored unless explicitly requested, and common package folders are implicitly excluded.
testdata/baselines/reference/config · high confidence
Improved type-checking and error reporting for JSDoc and destructured variables
The compiler now enforces stricter validation for JSDoc \@param\ tags, ensuring that parameter names in JSDoc comments match the actual function signatures, and correctly handles missing names in JSDoc param tags. Additionally, the handling of dependent destructured variables has been refined to prevent crashes and provide more accurate error messages for complex destructuring patterns, such as those involving self-referential initializers or type mismatches. These changes improve the reliability of type-checking for JavaScript files with JSDoc annotations and ensure that errors related to destructuring are reported consistently.
testdata/baselines/reference/conformance · medium confidence
Improved validation and error reporting for TypeScript project references
The \tsc\ compiler now enforces stricter validation on project reference configurations, providing clearer error messages for common misconfigurations. Specifically, the compiler now validates that referenced projects have the \composite\ option enabled, that all source files are listed in the \files\ or \include\ arrays, and that files do not reside outside the \rootDir\. Additionally, it now correctly handles default import interop for referenced projects and reports diagnostics for missing referenced projects. These changes ensure that build errors are caught earlier with more specific guidance, such as requiring \composite: true\ for referenced projects or flagging when a file is not listed in the project's file list.
testdata/baselines/reference/tsc/projectReferences · medium confidence
Improved validation and error reporting for invalid tsconfig.json fields
The compiler now enforces stricter type checking for the 'include', 'exclude', 'files', and 'paths' fields in tsconfig.json, producing specific error messages (e.g., TS5024) when non-string values are provided. Additionally, the tool resolves symlinks when processing extended configurations, ensuring that paths are correctly resolved in symlinked directories.
testdata/baselines/reference/tsc/extends · high confidence
Improved watch mode tracking of package.json files for module resolution
The TypeScript build mode now tracks changes to package.json files when resolving modules in watch mode. Previously, the build system might not have been aware of changes to package.json files that affect module resolution, potentially leading to stale builds. The updated behavior ensures that modifications to package.json files trigger appropriate rebuilds, improving the reliability of incremental builds in watch mode.
testdata/baselines/reference/tsbuildWatch/moduleResolution · high confidence
Introduces a thread-safe module resolution cache
The module resolution system now uses a new \moduleResolutionCache\ backed by a \SyncMap\ to store resolved modules and type reference directives. This change ensures that concurrent module resolution requests are handled safely without race conditions, as demonstrated by the added \TestResolveModuleNameTrailingSlashRace\ test which verifies that resolving the same package with different trailing slash spellings does not cause a crash or incorrect resolution.
internal/module · high confidence
Native preview package now includes executable resolution and version exports
The @typescript/native-preview package now bundles the core runtime files directly in its lib directory. This includes a new getExePath utility that dynamically locates the native executable across different environments (source, built output, and installed packages), with specific support for long file paths on Windows and compatibility with Node 16. Additionally, the package now exports version information (version and versionMajorMinor) via CommonJS and TypeScript declaration files, ensuring consumers can reliably access version data.
_\packages/native-preview/lib · high confidence
New command-line and tsconfig parsing infrastructure for compiler, build, and watch options
The \internal/tsoptions\ package has been restructured to introduce a unified, declarative model for all TypeScript compiler, build, and watch options. This change replaces the previous ad-hoc parsing logic with a structured \CommandLineOption\ definition that explicitly maps each flag to its type, validation rules, and metadata. As a result, command-line argument parsing, \tsconfig.json\ processing, and watch mode configuration now share a consistent, type-safe foundation. This enables more accurate error reporting, better 'did you mean' suggestions for typos, and a more robust handling of option values (including nulls and empty strings) across all entry points.
internal/tsoptions · high confidence
Refactor VFS internal implementation
The VFS package has been split, moving internal helper functions and types into a new 'internal' sub-package. This refactoring includes adding a 'Stat' method to the VFS interface, supporting Windows junctions via 'GetFileAttributesEx', and improving performance by converting read file content directly to strings.
internal/vfs/internal · medium confidence
Refactor language server conversion logic into a dedicated package
The internal language server conversion logic, previously embedded in the main package, has been extracted into a new \internal/ls/lsconv\ package. This refactoring includes the \Converters\ struct and its associated test suite, which handles the mapping between LSP positions and internal text offsets. The implementation now correctly handles invalid UTF-8 sequences by advancing the byte position by 1 (matching the behavior of Node's TextDecoder and the JS reference implementation), rather than overshooting by 3 bytes as the previous \utf8.RuneLen\-based approach did.
internal/ls/lsconv · medium confidence
Refactored file matching to use a custom glob algorithm
The file matching logic in \internal/vfs/vfsmatch\ has been rewritten to use a custom, non-regular-expression-based glob matching algorithm. This change introduces a formal specification (\MATCHING\_ALGORITHM.md\) and a new internal representation for glob patterns (e.g., \globPattern\, \component\, \segment\), replacing the previous implementation that relied on \regexp2\. The new implementation includes dedicated benchmark tests (\bench\_test.go\) and comprehensive unit tests (\vfsmatch\_test.go\) that cover various matching scenarios, including recursive wildcards, hidden files, and package folder exclusions.
internal/vfs/vfsmatch · medium confidence
Removed deprecated 'downlevelIteration' compiler option
The 'downlevelIteration' compiler option has been removed. Previously, using this option triggered a deprecation warning (TS5101) suggesting its removal in TypeScript 7.0. Now, the compiler emits error TS5102, requiring users to remove the option from their configuration. This change affects test baselines where the old deprecation message is replaced by the new removal error.
testdata/baselines/reference/submoduleAccepted/conformance · high confidence
Updated Find All References baselines for cross-project and module scenarios
The \findAllReferences\ test baselines in \testdata/baselines/reference/submoduleAccepted/fourslash/\ have been updated to reflect changes in how the editor reports references. Specifically, the \isDefinitionAcrossGlobalProjects\ baseline now includes \/// \<reference\>\ directives in the output, and the \localGetReferences\ baseline has been adjusted to reflect changes in line numbers and the removal of certain variable increment and return statements. Other baselines, such as \referencesForMergedDeclarations\ and \referencesForOverrides\, have been updated to reflect minor line number shifts and the removal of specific code blocks (e.g., \const enum\, \async function\, \export default class\).
testdata/baselines/reference/submoduleAccepted/fourslash/findAllReferences · medium confidence
Updated Go to Implementation baselines for TypeScript 6.0 behavior
The 'Go to Implementation' feature has been updated to align with TypeScript 6.0 behavior. This includes fixes for finding type-annotated implementations and resolving crashes on reparsed subtrees. The test baselines in \testdata/baselines/reference/submodule/fourslash/goToImplementation\ have been regenerated to reflect these changes, ensuring that navigation to implementations for classes, interfaces, enums, and local variables matches the new expected outputs.
testdata/baselines/reference/submodule/fourslash/goToImplementation · medium confidence
Updated LSP protocol generation tooling
The internal LSP protocol generation scripts have been updated to fetch the latest \metaModel.json\ and \metaModel.ts\ from the \vscode-languageclient\ repository. This ensures the generated Go types and handlers stay in sync with the latest Language Server Protocol specifications and client capabilities.
_internal/lsp/lsproto/\generate · medium confidence
Updated TypeScript build mode baselines
The test baselines for the TypeScript build mode (tsbuild) have been updated to reflect the latest compiler behavior. The changes include fixes for path handling, source maps, and declaration emit, as well as updates to support new features like the --builders flag for controlling concurrent builds and improved CommonJS support. These updates ensure that the build system's output, including .tsbuildinfo files and diagnostic messages, matches the expected state.
testdata/baselines/reference/tsbuild · medium confidence
Updated TypeScript build watch mode baselines for circular references and incremental updates
The test baselines for the \tsbuildWatch\ feature have been updated to reflect the current behavior of the TypeScript compiler's watch mode. The new reference files capture the expected output for scenarios including incremental updates in verbose mode, handling of circular project references, and error reporting during build changes. These changes ensure that the test suite accurately reflects the compiler's output for multi-project builds using the \-b\ (build) and \-w\ (watch) flags.
testdata/baselines/reference/tsbuildWatch/sample · high confidence
Updated TypeScript build watch mode baselines for noEmit scenarios
Updated the reference baselines for the \tsbuildWatch/noEmit\ test suite to reflect the new behavior of the TypeScript 6.0 build system. The changes cover incremental compilation scenarios with and without declaration file generation, ensuring that watch mode correctly handles file changes, updates the \.tsbuildinfo\ metadata, and reports diagnostics accurately when \noEmit\ is enabled. These updates ensure that the compiler's watch mode behaves consistently with the latest TypeScript 6.0 specifications for build mode.
testdata/baselines/reference/tsbuildWatch/noEmit · high confidence
Updated TypeScript compiler baselines for incremental builds and file casing
Updated test baselines in the tsc/incremental and forceConsistentCasingInFileNames directories to reflect current compiler behavior. This includes new baseline files for incremental compilation scenarios, such as handling case-insensitive file names and class expression modifiers, as well as updated error messages and build info structures for incremental builds. Additionally, new baselines cover file casing consistency checks, including cases with relative and non-relative resolutions, triple-slash references, and multiple file inclusions with different casing.
testdata/baselines/reference/tsc/incremental · high confidence
Updated TypeScript submodule to commit 4d4f005
The TypeScript submodule has been updated to commit 4d4f005c8541e0255a9d8791205fdce326e462bc. This change incorporates upstream TypeScript modifications, which may affect compilation behavior, type checking, or language features available to users of the product.
_\submodules · medium confidence
Updated Visual Studio QuickInfo baselines for symbol icons and colorized text
The Visual Studio QuickInfo baseline files for \vSQuickInfo\ have been updated to reflect enhanced hover states that now include symbol icons and colorized text. This change updates the expected output for various test cases, including aliases, function declarations, class methods, class properties, and function signatures, ensuring the test suite matches the new visual representation in the IDE.
testdata/baselines/reference/fourslash/vSQuickInfo · medium confidence
Updated accepted submodule error baselines
The accepted error baselines for the 'submoduleTriaged' test cases have been updated. Specifically, the 'augmentExportEquals2' test now expects no errors, while the 'exportAssignmentMembersVisibleInAugmentation' test now expects a TS4060 error regarding a private name in a return type. These changes reflect the current expected compiler behavior for these specific module augmentation scenarios.
testdata/baselines/reference/submoduleTriaged · medium confidence
Updated baseline expectations for JSX closing tag auto-insertion
Updated the four-slash test baselines for JSX closing tag auto-insertion to reflect the new behavior for complex tag names, including those with namespaces, hyphens, generic type parameters, and property access patterns. These changes ensure the editor correctly generates closing tags for elements like \<ns:sometag\>, \<my-namespace:my-tag\>, and \<someModule.SomeComponent\>.
testdata/baselines/reference/fourslash/closingTag · medium confidence
Updated baseline outputs for TypeScript build watch mode library resolution
The test baselines for the \tsbuildWatch/libraryResolution\ scenario have been updated to reflect the current behavior of the TypeScript build system in watch mode. The changes capture the specific module resolution paths and compilation logs for four test projects (project1 through project4), demonstrating how the compiler resolves library references (such as \es5\, \dom\, \webworker\, and \scripthost\) and tracks file changes during incremental builds.
testdata/baselines/reference/tsbuildWatch/libraryResolution · high confidence
Updated baselines for tsbuild watch mode
Updated test baselines for the TypeScript build watch mode, reflecting changes in how the compiler tracks file dependencies and reports errors in incremental builds. The new baselines include updated \tsbuildinfo\ structures and error reporting for re-exports, ensuring that watch mode correctly identifies out-of-date projects and resolves module paths according to the latest behavior.
testdata/baselines/reference/tsbuildWatch/extends · high confidence
Updated baselines for tsbuild watch mode to reflect new error-handling behavior
The test baselines for the \tsbuildWatch/programUpdates\ directory have been updated to reflect changes in how the TypeScript build system handles declaration emit errors during watch mode. Specifically, the compiler now correctly avoids emitting declaration files when a file contains a declaration emit error, and only emits the changed file when fixing errors. These changes are reflected in the new and modified \.js\ baseline files, which now show the expected output for scenarios such as introducing errors, fixing errors, and handling referenced project changes.
testdata/baselines/reference/tsbuildWatch/programUpdates · high confidence
Updated build watch baselines for path mapping and file inclusion
The test baselines for the TypeScript build watch mode have been updated to reflect changes in how the compiler handles file inclusion and path resolution. Specifically, the \tsbuildinfo\ output now correctly includes all files matched by the \include\ patterns in the \tsconfig.json\, ensuring that shared project files are properly tracked for incremental builds. Additionally, the module resolution for path mappings (e.g., \:shared/\*\) has been adjusted to correctly resolve to the expected source files, preventing stale build artifacts.
testdata/baselines/reference/tsbuildWatch/roots · medium confidence
Updated build watch mode baselines for TS 6.0
Updated the test baselines for the \tsbuildWatch/configFileErrors\ scenario to reflect the new behavior in TypeScript 6.0. The new baseline confirms that syntax errors in \tsconfig.json\ (specifically missing commas in the \files\ array) are correctly reported during watch mode, and the build process continues to watch for file changes despite the configuration error.
testdata/baselines/reference/tsbuildWatch/configFileErrors · medium confidence
Updated bundled TypeScript library definitions to TS 6.0
The internal/bundled/libs directory has been updated to the TypeScript 6.0 release, introducing new type definitions for modern JavaScript and DOM APIs. This includes lib.d.ts with standard library references, lib.decorators.d.ts and lib.decorators.legacy.d.ts for class and member decorator contexts, lib.dom.d.ts for browser APIs, and lib.es2015.\*.d.ts files covering ES2015 features like iterators, generators, promises, proxies, and reflection. These changes provide updated type support for developers using these language features.
internal/bundled/libs · high confidence
Updated bundled \`vscode-jsonrpc\` library
The \vscode-jsonrpc\ library in the native-preview vendor directory has been updated. This change refreshes the bundled version of the library, which provides the underlying JSON-RPC messaging protocol for the native preview environment.
_\packages/native-preview/vendor · high confidence
Updated compiler baselines for class declarations and error reporting
The compiler's reference baselines for class declarations (e.g., ClassDeclaration8-26) have been updated to reflect stricter enforcement of missing constructor/function implementations and invalid member modifiers (e.g., 'const' on class properties). Additionally, error baselines for arrow functions and export assignments have been adjusted to match the new error messages and spans, ensuring that diagnostics for issues like missing implementations and invalid syntax are accurately captured in the test suite.
testdata/baselines/reference/submodule/compiler · high confidence
Updated document symbol baselines for the navigation bar and outline features
The baseline files for the document symbols feature have been updated to reflect the current expected output for various TypeScript and JavaScript constructs. These changes cover the handling of anonymous classes and functions, computed property names, private class fields, and module declarations, ensuring the navigation bar and document outline tools correctly identify and display symbols in the editor.
testdata/baselines/reference/fourslash/documentSymbols · high confidence
Updated go-to-definition baseline for JSX call expressions
The baseline for the 'goToDefinition' test in JSX call expressions has been updated to reflect a change in how the definition link is resolved. Specifically, the expected output for the 'goToDefinitionJsxCall' test now points to the 'Thing' component directly, rather than including additional interface or constant declarations in the result. This indicates a refinement in how the editor resolves definitions for JSX components.
testdata/baselines/reference/submoduleAccepted/fourslash/goToDefinition · medium confidence
Updated go-to-definition baselines for TypeScript 6.0 behavior
The test baselines in the go-to-definition test suite have been updated to reflect the new behavior introduced in TypeScript 6.0. This includes porting and fixing tests for various scenarios such as const references, declaration maps, ambient modules, dynamic imports, and function overloads, ensuring the IDE's navigation features align with the latest language specifications.
testdata/baselines/reference/submodule/fourslash/goToDefinition · medium confidence
Updated module resolution baselines for Node 16 and pnpm-style layouts
The test baselines for module resolution have been updated to reflect the new behavior for the Node 16 module resolution strategy. This includes new baseline files for alternate package.json structures, scoped package resolution, and pnpm-style layouts. These changes ensure that the compiler correctly resolves modules in modern Node.js environments, including handling conditional exports, peer dependencies, and symlinked directories in pnpm-style monorepos.
testdata/baselines/reference/tsc/moduleResolution · high confidence
Updated stringutil casing and comparison to match ECMAScript/ESLint conventions
The internal/stringutil package was refactored to provide JavaScript-compatible case mapping and string comparison. A new script (generate-unicode-data.mts) generates Go source files (js\_case\_generated.go, identifier\_parts\_generated.go) from the @unicode/unicode-15.1.0 package, pinning casing behavior to Unicode 15.1. This ensures that ToLowerJS and ToUpperJS match the ECMAScript default casing rules, including context-sensitive mappings like Final\_Sigma for the Greek sigma. Additionally, a new CompareStringsCaseInsensitiveEslintCompatible function was added to align import sorting with ESLint's lowercase-based comparison, preventing conflicts with TypeScript's uppercase-based sorting.
internal/stringutil · high confidence
Updated test baselines for multi-project builds with concurrent builders
Updated the reference baselines for the \tsbuildWatch/projectsBuilding\ test suite to reflect the new behavior of the TypeScript build system. The changes include support for the \--builders\ flag to limit the number of projects that can build concurrently, as well as updates to handle multi-project requests such as find all refs, rename, and workspace symbols. These updates ensure that the test outputs for various project configurations (e.g., 3, 5, and 23 projects) accurately reflect the current state of the build process.
testdata/baselines/reference/tsbuildWatch/projectsBuilding · medium confidence
Updated test baselines for submodule conformance tests
The test baselines in the submodule conformance directory have been updated to reflect 381 commits, including 135 fixes. These changes cover a wide range of TypeScript compiler behaviors, including fixes for template string escaping, JSDoc type checking, CommonJS/ESM module handling, JSX emit, and various type-checking and declaration emit corrections. The updated baselines ensure that the test suite accurately reflects the current state of the TypeScript compiler's output and error messages.
testdata/baselines/reference/submodule/conformance · high confidence
Updated test baselines for the compiler
The test baselines in the \submoduleAccepted\ directory have been updated to reflect accepted differences in the compiler's output. These changes include updated type and symbol information for various test cases, such as \abstractClassInLocalScopeIsAbstract\, \accessorDeclarationEmitJs\, and \aliasErrors\. The diffs show adjustments to type signatures, error messages, and symbol representations, indicating that the compiler's behavior for these specific scenarios has been reviewed and accepted.
testdata/baselines/reference/submoduleAccepted/compiler · high confidence
Updated tsc command-line baseline tests for TypeScript 6.0 behavior
The test baselines for the \tsc\ command-line interface have been updated to reflect the new behavior introduced in TypeScript 6.0. This includes support for the \FORCE\_COLOR\ environment variable to control output coloring, handling of empty or zero-byte \tsconfig.json\ files, and stricter validation of compiler options such as reporting errors for misplaced options at the root of the config file. The tests also cover the \--init\ command, \--project\ (or \-p\) path resolution, and error reporting for missing files or invalid option values.
testdata/baselines/reference/tsc/commandLine · medium confidence
Updated tsc watch mode baselines and added --init template
The test baselines for the tsc watch command-line interface have been updated to reflect current TypeScript behavior, including the addition of a new baseline for the \--init\ command which generates a \tsconfig.json\ with recommended settings such as \strict: true\ and \jsx: react-jsx\. Additionally, the reference output for parsing the \--watchInterval\ option has been updated to include the full list of supported compiler options and their default values in the help text.
testdata/baselines/reference/tscWatch/commandLine · medium confidence
Updated tsc watch mode baselines for TypeScript 6.0
Updated the \tscWatch/noEmit\ test baselines to reflect the new expected output for TypeScript 6.0. The changes cover scenarios involving syntax errors, semantic errors, and declaration (.d.ts) errors, ensuring that the watch mode correctly handles file changes and error states in these specific configurations.
testdata/baselines/reference/tscWatch/noEmit · medium confidence
Fixes
Add module path validation tool
A new command-line tool, checkmodpaths, has been added to the \_tools/cmd directory. This utility recursively scans a specified directory to verify that all file paths are valid for inclusion in a Go module, reporting any invalid paths found.
_\tools/cmd · medium confidence
Compiler test baselines updated for 322 commits
The test baselines in testdata/baselines/reference/compiler have been updated to reflect 322 commits, including 165 fixes. These changes cover a wide range of compiler behaviors, including fixes for declaration emit, CommonJS export handling, JSX parsing, and various crash conditions. The updated baselines ensure that the compiler's output and error messages match the expected state after these numerous bug fixes and improvements.
testdata/baselines/reference/compiler · high confidence
Fix --generateTrace baseline for analyze-trace
Updated the reference baselines for the \--generateTrace\ feature to align with the current behavior of \analyze-trace\. The test data files \generateTrace-generates-types-file.js\ and \generateTrace-with-multiple-files-and-complex-types.js\ have been refreshed to reflect the correct trace output, ensuring that the \analyze-trace\ tool works as expected against the generated trace files.
testdata/baselines/reference/tsc/generateTrace · high confidence
Fix \`--showConfig\` output to include implied and explicit compiler options
The \--showConfig\ command now correctly reports all active compiler options, including those that are implied by other settings (such as \moduleResolution\ and \moduleDetection\ when using \nodenext\) and those passed via the command line. The output now accurately reflects the resolved configuration, ensuring that users see the complete set of effective options rather than just the explicitly defined ones.
testdata/baselines/reference/tsc/showConfig · high confidence
Fixes for 'Go to Implementation' crashes and missing results
Resolved several crashes and incorrect behaviors in the 'Go to Implementation' feature. The tool no longer crashes when navigating to implementations for type-annotated variables, dynamic imports of UMD modules, triple-slash references, re-exported type-only namespaces, or invalid CommonJS shorthand exports. Additionally, the feature now correctly handles cases where start and end positions for mapped locations are in different files.
testdata/baselines/reference/fourslash/goToImplementation · medium confidence
Improved 'Go to Definition' for object binding patterns and decorators
The 'Go to Definition' navigation is now more robust and accurate for several edge cases. It now correctly handles object binding patterns, including destructuring and rest properties, as well as shorthand object literal properties. Additionally, the feature no longer crashes when encountering invalid decorator targets, and it properly resolves definitions for binding elements in object patterns. These changes ensure that navigation commands work reliably across these specific language constructs.
testdata/baselines/reference/fourslash/goToDefinition · medium confidence
Test coverage
Add baseline files for inlay hints; Add benchmark fixtures for performance testing; Add test utilities for parsing and emitting TypeScript; Add testing VFS helper for tsconfig parsing; Added JSDoc conformance test cases; Added JSDoc conformance test for default exports; Added conformance tests for JavaScript/TypeScript interop scenarios; Added conformance tests for dependent destructuring narrowing; Added conformance tests for type tag application to multiple variable declarations; Added const enum conformance test; Added test baseline for type acquisition parsing in tsconfig.json; Added test case for module resolution with .d.ts imports; Added test for node\_modules declaration emit with package exports; Added test harness for TypeScript compiler execution; Added test utilities for Fourslash completion items; Added tests for native-preview package; Added tests for the native-preview API and AST navigation; Code Lens support for functions, interfaces, and cross-project references; Compiler test suite expanded with 275 new and updated test cases; Expanded fourslash test coverage for auto-imports and completions; Expanded manual test coverage for editor features; Improved token navigation and JSDoc handling in AST navigation; Updated QuickInfo baseline tests for JSDoc and type display; Updated baseline references for JavaScript syntax and semantic diagnostics; Updated library resolution baselines for TypeScript 6.0 behavior; Updated reference-finding baselines for edge cases; Updated rename location baselines for various edge cases; Updated test baselines for composite projects; Updated test baselines for fourslash state tests; Updated tsc noEmit test baselines for incremental, composite, and declaration scenarios; Updated watch-mode test baselines for TypeScript build errors.
Dependencies
Updated Go and npm dependencies
The project has been updated to use Go 1.26 and updated various npm dependencies, including \vscode-jsonrpc\ v9.0.0 and \vscode-languageclient\ v10.0.1. The Go module file (\go.mod\) and lockfiles (\package-lock.json\, \go.sum\) have been refreshed to reflect these changes.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 67.
Lenses
- Code Health 63
- Architecture 89
- Maturity 88
- Readiness 57
- Security 92
Changes since last survey
- 300 commits — 196 feature/other, 104 fixes
By area
- testdata/baselines — 106 commits
- _packages/native-preview — 46 commits
- internal/fourslash — 17 commits
- internal/checker — 13 commits
- internal/project — 12 commits
- (root) — 10 commits
- internal/lsp — 9 commits
- _extension/src — 8 commits
- internal/execute — 8 commits
- internal/tsoptions — 8 commits
- internal/compiler — 7 commits
- internal/fswatch — 7 commits
- internal/ls — 7 commits
- internal/transformers — 7 commits
- .github/workflows — 5 commits
- internal/api — 4 commits
- internal/parser — 4 commits
- internal/ast — 3 commits
- internal/format — 3 commits
- internal/module — 3 commits
Notable commits
- fix: Better fix bug with this types and instantiateSymbol (#4307)
- fix: Fix "Not a subspan" crash in signature help on error-recovered JSX (#4778)
- fix: Fix "Token end is child end" crash when range formatting is inside a JSDoc comment (#4594)
- fix: Fix ${configDir} path candidate resolving in extended config (#4362)
- fix: Fix CommonJS export destructuring emit (#4404)
- fix: Fix CommonJS rewrites in shorthand destructuring defaults (#4111)
- fix: Fix O(K^2) OOM issue in go-to-implementation (#4796)
- fix: Fix RemoteNode.forEachChild visiting array children twice when a visitList callback is supplied (#4473)
- fix: Fix RemoteNodeList inherited array methods throwing this.view.getUint32 is not a function (#4346)
- fix: Fix TS2871 false positive for ?? operator in nullish coalescing check (#4586)
- fix: Fix .await member access mis-parsed as top-level await in JS modules with JSDoc (#4169)
- fix: Fix js/ts.reportStyleChecksAsWarnings not being read from VS Code config (#4429)
- fix: Fix a slew of UTF-8/UTF-16 related issues (#4181)
- fix: Fix async arrow this capture in static field emit (#4103)
- fix: Fix auto-accessor type resolution (#4184)
- fix: Fix auto-import crash from unimplemented aliasResolver.IsSourceFileDefaultLibrary (#4323)
- fix: Fix backwards sort order for redirects in getAllModulePaths (#4193)
- fix: Fix build mode setup stall on large solutions (#4658)
- fix: Fix bulk cache invalidation of non-existent referenced configs (#4547)
- fix: Fix computed name error emit reusing the name expression cache (#4641)
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
microsoft/typescript-go was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 86cc4767d4ebadb9b7845d0ab8eb2b05785c3fee — the exact code this score is about.
- Scored under rubric-2026.08.19 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer latest.