Skip to content
CAI
Software that uses CAICheck a score

microsoft/typescript-go

64.9

Adequate · 13 November 2026

1058.2k

lines of production code

JavaScript

with Go

3

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add AST token navigation utilities with JSDoc and JSX support

The \internal/astnav\ package now provides functions to locate tokens at specific positions within a source file, including \GetTokenAtPosition\, \GetTouchingToken\, and \GetTouchingPropertyName\. These utilities handle complex scenarios such as JSDoc type assertions and JSX text, ensuring that token lookup does not panic on degenerate JSDoc tags or error-recovered JSX. The implementation includes a token cache to reuse synthesized tokens and supports baseline testing against the TypeScript reference implementation to ensure behavioral parity.

internal/astnav · high confidence

Add CommonJS and ES module transformers for TypeScript emit

The \internal/transformers/moduletransforms\ package now includes the implementation of the CommonJS and ES module transformers (\CommonJSModuleTransformer\ and \ESModuleTransformer\). These components handle the transformation of TypeScript module syntax into the target module format (CommonJS or ES modules) based on compiler options, including logic for import/export rewriting, helper injection, and ancestor tracking during AST traversal.

internal/transformers/moduletransforms · high confidence

Add LSP test client infrastructure for protocol round-trip testing

The internal test utility now includes a new LSP client implementation that connects to an LSP server using real JSON-RPC communication over byte pipes. This allows tests to exercise the full marshal/unmarshal round-trip of protocol data structures, ensuring that message serialization and deserialization work correctly in both directions. The client handles concurrent message routing, server-initiated requests, and notifications, providing a robust foundation for testing LSP server behavior.

internal/testutil/lsptestutil · high confidence

Add TypeScript test baseline utilities for diagnostics, emit, and type checking

The \internal/testutil/tsbaseline\ package now provides a comprehensive suite of baseline generation helpers for the TypeScript test harness. This includes \contentmapper\_baseline.go\ for capturing original and transformed source code with diagnostics, \error\_baseline.go\ for structured error reporting with file-level context, \js\_emit\_baseline.go\ for verifying JavaScript and declaration file outputs (including \noCheck\ consistency checks), \sourcemap\_baseline.go\ and \sourcemap\_record\_baseline.go\ for validating source map generation and records, \type\_symbol\_baseline.go\ for capturing type and symbol walker results, and \module\_resolution\_baseline.go\ for tracing module resolution. These utilities standardize how test results are captured and compared against expected baselines.

internal/testutil/tsbaseline · high confidence

Add bundled package for embedded TypeScript lib files

The new \internal/bundled\ package provides access to TypeScript's standard library definition files (lib.d.ts and related ES2015–ES2025/ESNext definitions). It supports two modes: when embedding is enabled, the library files are compiled into the binary via Go's \embed\ directive and served through a custom virtual file system; when embedding is disabled, the package falls back to reading the files from the executable's directory. A code generator (\generate.go\) creates the necessary embedding and listing code from the TypeScript submodule's \libs.json\, and platform-specific utilities handle executable path resolution on Android (Termux).

internal/bundled · high confidence

Add internal LSP-compliant glob pattern parser

Introduces a new internal \glob\ package that implements glob pattern parsing compliant with the Language Server Protocol (LSP) specification. This component supports standard glob syntax including wildcards (\\\, \?\), recursive directory matching (\\\*\), character ranges (\\[a-z\]\), negated ranges (\\[!...\]\), and grouped alternatives (\{}\), enabling consistent pattern matching for document filters within the application.

internal/glob · high confidence

Add internal expression evaluator for compile-time constant folding

The \internal/evaluator\ package now provides an \Evaluator\ function that recursively evaluates TypeScript expressions (such as numeric literals, string literals, binary operations, and template expressions) to determine their constant values at compile time. This enables the compiler to resolve literal types and enum members more accurately, handling edge cases like type assertions and outer expressions conservatively to maintain compatibility with tools like Babel.

internal/evaluator · high confidence

Add internal pprof profiling utilities

The internal/pprof package now provides a new set of functions and types for managing CPU, memory, heap, and allocation profiles. Users can start and stop CPU profiling sessions via the CPUProfiler, save heap and allocation profiles to specified directories, and trigger garbage collection, with all profile data written as compressed protobuf files named with process ID and timestamp.

internal/pprof · high confidence

Add io/fs-based virtual file system implementation

The \iovfs\ package introduces a new virtual file system implementation that wraps Go's standard \io/fs\ interface. This allows the TypeScript compiler to operate on file systems provided via \fs.FS\, supporting read-only operations as well as writable operations (write, append, mkdir, remove, chtimes) when the underlying file system implements the \WritableFS\ interface. It also supports real path resolution via the \RealpathFS\ interface and handles URL-based roots gracefully.

internal/vfs/iovfs · high confidence

Add localizable diagnostic message infrastructure

The \internal/diagnostics\ package now provides a complete system for generating and localizing compiler error and warning messages. It includes a code generator (\generate.go\) that produces Go source files from diagnostic definitions, a runtime localization engine that caches and retrieves translated strings for 14 supported languages (including English, German, French, Spanish, Japanese, and Chinese), and a set of tests verifying correct message formatting and locale fallback behavior.

internal/diagnostics · high confidence

Add test fixture utility for managing test data

A new internal test utility package (internal/testutil/filefixture) has been added to help manage test fixtures. It provides a Fixture interface with implementations for loading content from files (with caching and error handling) and from strings, along with a helper to skip tests if a file-based fixture does not exist.

internal/testutil/filefixture · high confidence

Added benchmark fixtures for compiler and DOM sources

A new benchfixtures.go file was added to the internal/testutil/fixtures package, defining a set of benchmark fixtures that reference specific TypeScript compiler sources (checker.ts, dom.generated.d.ts) and test cases via the repo package. This enables benchmarks to operate on real, large-scale TypeScript files rather than synthetic empty strings, improving the realism of performance testing.

internal/testutil/fixtures · high confidence

Added internal SemVer version and range parsing logic

The \internal/semver\ package now includes implementations for \Version\ and \VersionRange\ types, enabling the system to parse, compare, and validate semantic version strings and ranges. This change introduces support for standard SemVer 2.0.0 precedence rules, including numeric and lexical comparison of pre-release identifiers, as well as parsing capabilities for wildcard ranges (e.g., \1.\*\, \x.x.x\), hyphen ranges, and logical OR disjunctions. Comprehensive test coverage has been added to verify correct behavior for version string formatting, comparison edge cases, and range matching.

internal/semver · high confidence

Added mock VFS wrapper for testing

A new mock implementation of the virtual file system (FSMock) and a corresponding Wrap utility have been added to the internal/vfs/vfsmock package. This allows tests to easily wrap existing file system implementations with a mock that tracks method calls, facilitating more robust testing of code that interacts with the file system.

internal/vfs/vfsmock · high confidence

Added path validation tool for module files

A new command-line tool, \checkmodpaths\, has been added to the \\_tools/cmd\ directory. This utility validates that all file paths within a specified module directory conform to Go module naming conventions, helping to catch invalid paths before they cause build or import issues.

_\tools/cmd · high confidence

Added script to generate synchronous API from asynchronous source

A new script, \generateSync.ts\, has been added to the \native-preview\ package to automatically generate synchronous versions of the API from its asynchronous source files. This tool reads the async source code, applies directive-based comments (such as \@sync-skip\ or \@sync-only\) for fine-grained control, and uses the TypeScript compiler API to remove \async\ modifiers, \await\ expressions, and \Promise\ type wrappers, outputting the resulting synchronous types and API functions.

_\packages/native-preview/scripts · high confidence

Added vendored vscode-jsonrpc library to native-preview

The native-preview package now includes a vendored copy of the vscode-jsonrpc library, providing the core JSON-RPC messaging protocol implementation. This addition introduces browser-specific runtime support (via BrowserMessageReader/Writer) alongside the standard Node.js streams, enabling JSON-RPC communication in web environments such as VS Code webviews or workers. The included files cover the full API surface, including message handling, cancellation tokens, progress tracking, and connection management.

_\packages/native-preview/vendor · high confidence

File-system access tracking for watch mode

The new \trackingvfs\ package wraps the virtual file system to record every file path accessed during compilation, including non-existent paths from failed module resolution. This allows the watch mode to know exactly which files and directories the compiler depended on, ensuring that changes to these specific paths trigger recompilation.

internal/vfs/trackingvfs · high confidence

Go to Source Definition now navigates to JavaScript implementation files

Developers using TypeScript can now use Go to Source Definition to jump directly to the underlying JavaScript source files for imported modules, rather than being limited to \.d.ts\ declaration files. This change improves code navigation by allowing you to inspect the actual implementation of dependencies, including CommonJS modules, re-exports, and aliased imports, even when only type definitions are available (in which case it falls back to the declaration).

testdata/baselines/reference/fourslash/goToSourceDefinition · high confidence

Implement incremental build state management and content mapper integration

This change introduces the core incremental build infrastructure for the TypeScript compiler, enabling the reuse of previous compilation results to speed up subsequent builds. It adds a new \incremental\ package that manages build state through \BuildInfo\ serialization (including file signatures, reference maps, and diagnostics) and snapshot handling. The implementation includes logic to determine affected files based on shape changes and global scope impacts, handle declaration file (\.d.ts\) emission and caching, and integrate with content mappers by validating their identities to ensure stale programs are discarded when mapper configurations change. It also provides the necessary handlers for emitting files incrementally and managing diagnostic chains.

internal/execute/incremental · high confidence

Initial AST package implementation

The \internal/ast\ package has been introduced to centralize the Abstract Syntax Tree definitions, node factories, and visitor infrastructure. This change provides the foundational data structures for parsing and analyzing TypeScript and JavaScript code, including generated node types, token kinds, and utility functions for deep cloning and diagnostic handling.

internal/ast · high confidence

Initial implementation of declaration emit diagnostics and symbol tracking

This change introduces the core infrastructure for TypeScript declaration file generation in the Go port, specifically within the \internal/transformers/declarations\ package. It adds \diagnostics.go\ to handle symbol accessibility checks and error message selection for exported members, \tracker.go\ to implement the \SymbolTracker\ interface for detecting inaccessible types, cyclic structures, and unsafe imports during serialization, and \supplementalreferences.go\ to manage triple-slash path references for supplemental files. These components provide the foundational logic required to validate and emit \.d.ts\ files, ensuring that generated declarations correctly reflect visibility constraints and type dependencies.

internal/transformers/declarations · high confidence

Initial implementation of the binder and name resolution subsystem

The \internal/binder\ package has been introduced to handle symbol binding, name resolution, and reference tracking for the compiler. This change adds the core \Binder\ struct which manages symbol tables, control flow, and container scopes, along with a \NameResolver\ for resolving identifiers against local and module scopes, and a \ReferenceResolver\ for linking identifier usages to their declarations. The implementation includes support for CommonJS module exports, class/enum scoping, and deferred expando assignments, providing the foundational symbol infrastructure required for subsequent type checking and emit phases.

internal/binder · high confidence

Initial implementation of the tsc command-line interface and watch mode

The \internal/execute\ package now provides the core entry points for the TypeScript compiler CLI. This includes the \tsc.go\ file which handles command-line argument parsing, routing to build (\-b\) or standard compilation modes, and managing flags like \--init\, \--version\, and \--help\. It also introduces the \watcher.go\ file, which implements the file-watching logic using the \fswatch\ backend, manages source file caching to optimize rebuilds, and coordinates incremental builds and content mapping during watch cycles.

internal/execute · high confidence

Initial implementation of the type checker package

The \internal/checker\ package has been introduced to provide the core type-checking engine for the language. This change adds the foundational logic for analyzing TypeScript and JavaScript code, including flow analysis, grammar validation, and declaration emit resolution. It exposes a public API for retrieving symbols, types, and signatures, and includes a test suite to verify symbol resolution and benchmark checker instantiation performance.

internal/checker · high confidence

Initial parser implementation with JSDoc support

The \internal/parser\ package now provides a complete parser implementation, including dedicated modules for JSDoc parsing (\jsdoc.go\), re-parsing of JSDoc annotations into TypeScript constructs (\reparser.go\), and module reference collection (\references.go\). This change introduces lazy JSDoc parsing for TypeScript files to improve performance, while fully parsing JSDoc in JavaScript files to enable type inference. It also adds fuzz testing (\parser\_test.go\) to ensure robustness against malformed inputs and edge cases.

internal/parser · high confidence

Initial release of the native-preview AST package

The \@typescript/native-preview\ package now includes a complete AST implementation in the \src/ast\ directory, providing the foundational types, navigation, and manipulation capabilities for TypeScript source code. This release introduces hand-written type definitions (\ast.ts\) alongside generated node factories, type guards, and syntax kind enums (\ast.generated.ts\, \is.generated.ts\, \factory.generated.ts\). It also adds core utilities for traversing the tree (\astnav.ts\), cloning nodes (\clone.ts\), scanning source text (\scanner.ts\), and handling JSDoc comments (\jsdoc.ts\), effectively establishing the public API surface for AST operations in the native preview environment.

_\packages/native-preview/src/ast · high confidence

Initial repository scaffolding and configuration for TypeScript Go

This change establishes the foundational structure for the TypeScript Go (tsgo) project. It introduces configuration files for the build system (Herebyfile.mjs, .gulp.js), code formatting (dprint.jsonc), and linting (golangci.yml, .custom-gcl.yml). It also sets up repository metadata and policies, including .gitattributes, .gitmodules (pointing to the TypeScript source submodule), CONTRIBUTING.md (with AI usage guidelines), and NOTICE.txt. Additionally, CHANGES.md documents the intentional behavioral differences between the legacy TypeScript compiler and the new Go-based implementation.

(repo-wide) · high confidence

Introduce Go-based JSX transformer implementation

The JSX transformation logic has been implemented in Go within the \internal/transformers/jsxtransforms\ package. This new component handles the conversion of JSX syntax (elements, fragments, text, and expressions) into JavaScript runtime calls (such as \jsx\, \jsxs\, or \jsxDEV\), managing implicit imports from the React runtime and preserving source file metadata. This replaces or supplements previous regex-based or external parsing approaches with a native AST-aware transformer integrated into the compiler's emission pipeline.

internal/transformers/jsxtransforms · high confidence

Introduce OS-backed virtual file system with semaphore-limited concurrency and symlink support

The \internal/vfs/osvfs\ package now provides the concrete OS implementation of the virtual file system interface. It introduces concurrency control by wrapping blocking OS calls (reads, writes, directory walks, and stat operations) behind semaphores to prevent resource exhaustion. The implementation includes robust handling of symlinks and reparse points (including Windows junctions) and provides a \Realpath\ function that resolves paths to their canonical form, correctly following symlinks. It also detects file-system case sensitivity at startup and exposes this via \UseCaseSensitiveFileNames\.

internal/vfs/osvfs · high confidence

Introduce asynchronous TypeScript API with native IPC client

The \native-preview\ package now exposes an asynchronous API layer (\\_packages/native-preview/src/api/async\) that communicates with a TypeScript compiler server via JSON-RPC over either a spawned process (STDIO) or a Unix domain socket. This change introduces a \Client\ class to manage the connection lifecycle, a \FileSystem\ interface for delegating file operations to the server, and a comprehensive set of TypeScript type definitions (including \Type\, \Symbol\, \Signature\, and various literal types) that map to the server's responses. The implementation includes a custom MessagePack encoder/decoder for efficient binary serialization of AST nodes and a virtual file system implementation for testing, enabling consumers to interact with the TypeScript language service asynchronously.

_\packages/native-preview/src/api · high confidence

Introduce baseline testing infrastructure with diff tracking and race detector utilities

This change adds the \internal/testutil/baseline\ package, providing a new system for managing test baselines. It supports comparing output against reference files, generating unified diffs using the \patience\ algorithm, and handling submodule-specific baselines via \submoduleAccepted\ and \submoduleTriaged\ lists. It also introduces first-class tracking for unused baselines to help maintain test hygiene. Additionally, \internal/testutil/race\ is added to expose whether the Go race detector is enabled at runtime.

internal/testutil/baseline · high confidence

Introduce binary AST encoding and decoding for the TypeScript API

The \internal/api/encoder\ package now provides a binary serialization format for TypeScript AST \SourceFile\ objects, enabling efficient transfer of parsed code structures (for example, over IPC). The encoder compresses AST nodes into a compact binary layout (protocol version 7) that deduplicates strings and stores node metadata in a flat array, while the decoder reconstructs the full in-memory AST tree from that binary data. This capability allows consumers to send or cache parsed code without re-parsing the source text, and includes comprehensive tests verifying that round-trip encoding and decoding preserves all node kinds, flags, and structure.

internal/api/encoder · high confidence

Introduce content mapper support in tsconfig

Users can now define content mappers in their tsconfig.json to handle non-standard file extensions. The new \contentMappers\ compiler option accepts an array of mapper configurations, each specifying a package name that must declare a \typescript.contentMapper\ field in its package.json with an \exec\ command. The system resolves these packages from node\_modules, validates their manifests, and uses them to map source files to outputs based on their extensions.

internal/tsoptions · high confidence

Introduce content-mapping converters for LSP position translation

The \internal/ls/lsconv\ package now provides a new \Converters\ type that handles the translation of positions and ranges between the Language Server Protocol (LSP) and internal script representations. This implementation introduces support for content-mapped files (such as those from Svelte, Vue, or Astro), where virtual code is generated from original source files; the converters automatically map LSP coordinates through span maps to ensure features like hover and diagnostics reference the correct original locations. It also includes a robust line map calculation that correctly handles invalid UTF-8 sequences by treating them as single code units, preventing offset errors in files with malformed encoding.

internal/ls/lsconv · high confidence

Introduce core library with foundational data structures and compiler options

The \internal/core\ package now provides a set of foundational utilities and types for the TypeScript compiler implementation. This includes an arena allocator for efficient memory management, parallel breadth-first search and binary search algorithms, and core data structures like link stores, stacks, and text ranges. It also defines the \CompilerOptions\ struct, which exposes the full set of TypeScript compiler settings, along with supporting types for module kinds, script targets, and tristate logic. Additionally, the package includes utilities for pattern matching, Node.js core module resolution, and build options.

internal/core · high confidence

Introduce fourslash test conversion and maintenance scripts

Added a new set of Node.js scripts in \internal/fourslash/\_scripts\ to automate the conversion of TypeScript's upstream \fourslash\ test suite into Go tests. The \convertFourslash\ script parses TypeScript test files from the submodule and generates corresponding Go test files, while \updateFailing\ monitors test execution to automatically update lists of failing and crashing tests. Supporting files include \manualTests.txt\ for tests requiring manual intervention, \tsconfig.json\ for the scripts' type checking, and lists for tracking test status.

_internal/fourslash/\scripts · high confidence

Introduce in-process LSP file watcher for clients without dynamic registration

Added an in-process file watcher (internal/lsp/lspwatcher) that acts as a drop-in replacement for LSP-based file watching when the client does not support dynamic registration of file watchers. The implementation manages file system subscriptions, handles non-existent or symlinked directories by installing ancestor watches, batches change events to match the workspace/didChangeWatchedFiles notification format, and includes tests for create/change/delete events and kind filtering.

internal/lsp/lspwatcher · high confidence

Introduce internal fswatch package with fanotify support and platform-specific optimizations

Added a new internal \fswatch\ package, ported from \@parcel/watcher\ with significant modifications, providing a pure Go filesystem watcher without cgo dependencies. The package introduces a new \fanotify\ backend for Linux (kernel ≥ 5.13) that avoids inotify limits by using FID-based event reporting, and implements shared FSEvents streams on macOS to reduce system resource usage. It simplifies the event model to \EventUpdate\ and \EventDelete\, removes in-memory directory trees for most backends to eliminate unnecessary syscalls, and adds per-backend debouncers to prevent callback starvation. The API includes functional options like \WithRecursive()\ and \WithIgnore()\, and handles symlinked watch roots and error delivery via sentinel errors.

internal/fswatch · high confidence

Introduce internal virtual file system abstraction

Adds a new \internal/vfs\ package that defines an \FS\ interface for file system operations, including reading, writing, removing, and walking directories, along with support for symlinks and case-insensitive path handling. This abstraction decouples the compiler from the underlying OS file system, enabling easier testing and platform-specific implementations.

internal/vfs · high confidence

Introduce jsnum package for JavaScript-compliant number handling

The new internal/jsnum package provides a Number type and associated operations that mimic JavaScript's numeric behavior, including bitwise operations, remainder, exponentiation, and string conversions. It implements ECMAScript-specified conversions (such as ToInt32, ToUint32, and StringToNumber) and handles edge cases like NaN, Infinity, and safe integer limits. The package also includes support for parsing and formatting BigInt literals in binary, octal, and hexadecimal formats, ensuring consistent behavior with JavaScript engines.

internal/jsnum · high confidence

Introduce new tsc execution engine with build mode, diagnostics, and configuration support

The \internal/execute/tsc\ package now provides the core implementation for the TypeScript compiler CLI, introducing support for composite build mode (\tsc -b\) and watch mode (\-w\). This change adds proper exit code handling for diagnostics and outputs, fixes a deadlock in the extended configuration cache when handling \tsconfig\ \extends\ cycles, and implements the \tsc --init\ command to generate configuration files. It also adds \--all\ help output, localized diagnostics, and detailed compile-time statistics reporting.

internal/execute/tsc · high confidence

Introduce pseudochecker for isolated declarations type inference

Added a new \internal/pseudochecker\ package that provides a lightweight type-checking mechanism to infer types for isolated declarations without performing a full type check. This component introduces \PseudoType\ structures to represent direct type nodes, inferred expressions, and complex cases like union or const-location types, enabling the declaration emit system to generate accurate \.d.ts\ files for accessors, properties, and variables while deferring complex validation.

internal/pseudochecker · high confidence

Introduce schema-driven code generation for Go and TypeScript ASTs

Added a new code-generation pipeline in the \\_scripts\ directory that reads \ast.json\ and \ast.schema.json\ to produce the TypeScript and Go AST infrastructure. This includes generators for the AST node structures (\generate-go-ast.ts\, \generate-ts-ast.ts\), binary encoding/decoding logic (\generate-encoder.ts\), and the shared schema types (\schema.ts\), enabling the project to maintain a single source of truth for AST definitions across both languages.

_\scripts · high confidence

Introduce source map decoding, generation, and position mapping

The \internal/sourcemap\ package now provides the core infrastructure for handling source maps, including a decoder that parses VLQ-encoded mappings into structured \Mapping\ objects, a generator that constructs valid SourceMap v3 JSON output, and a \DocumentPositionMapper\ that resolves bidirectional mappings between generated and source file positions. This enables the tool to read existing source maps for debugging and navigation, as well as emit new source maps during compilation, supporting features like accurate error reporting and IDE code navigation.

internal/sourcemap · high confidence

Introduce tsgo CLI with LSP, API, and command-line modes

The \cmd/tsgo\ package now provides a unified Go-based TypeScript CLI that supports three distinct operational modes: a command-line compiler (\--lsp\ and \--api\ flags are handled separately, but the default path runs \execute.CommandLine\), a Language Server Protocol (LSP) server, and an API server. The LSP server (\lsp.go\) now includes a parent-process watchdog that monitors the editor's process and shuts down the server if the parent exits, preventing orphaned processes. It also supports named pipes for communication and configurable progress reporting delays. The API server (\api.go\) allows connecting via stdio or named pipes/Unix sockets, supports asynchronous JSON-RPC communication, and enables collection of per-request timing information. The CLI also implements platform-specific process-alive checks (Unix/Windows) to support the watchdog feature and enables virtual terminal processing on Windows for better console output.

cmd · high confidence

Introduce wrapvfs package for filesystem operation interception

Added a new \wrapvfs\ package that provides a \wrappedFS\ implementation of the \vfs.FS\ interface, allowing callers to intercept and replace specific filesystem operations (such as \ReadFile\, \WriteFile\, \Stat\, etc.) via a \Replacements\ struct while delegating unmodified operations to the underlying filesystem.

internal/vfs/wrapvfs · high confidence

Native TypeScript 7 preview extension with content mapping and language features

The extension now runs a native TypeScript 7 (tsgo) language server by default, replacing the previous TSServer-based implementation. This introduces a new configuration workflow where the \js/ts.experimental.useTsgo\ setting controls the server, with commands to enable or disable the native preview. The extension now supports content mapping, allowing other extensions to register custom file type handlers (e.g., for JSX, TSX, or custom languages) that are dynamically mapped to TypeScript/JavaScript for language services. Key language features include multi-document highlights, expandable hovers with verbosity controls, auto-insertion of closing tags, and a 'Go to Source Definition' command. Configuration is handled via a middleware that merges settings from \js/ts\, \typescript\, and \javascript\ sections with correct precedence, and the extension includes telemetry reporting and experimentation service integration.

_\extension/src · high confidence

Native preview package now includes generated TypeScript enum definitions

The \@typescript/native-preview\ package now ships with a comprehensive set of TypeScript enum files (e.g., \CharacterCodes\, \CheckFlags\, \ModuleKind\) in the \src/enums\ directory. These files are generated from the internal Go implementation and provide both native TypeScript enum syntax (\.enum.ts\) and legacy JavaScript object syntax (\.ts\) for internal compiler flags, language options, and LSP protocol types.

_\packages/native-preview/src/enums · high confidence

New ES2017–ES2022 downlevel transformers for async, class fields, and decorators

The \internal/transformers/estransforms\ package now includes dedicated transformers for ES2017 async/await, ES2018 for-await-of, ES2016 exponentiation, ES2019 optional catch binding, ES2020 nullish coalescing and optional chaining, ES2021 logical assignment, ES2022 class fields and ES decorators, and object rest/spread. These are wired into a target-aware pipeline (via \GetESTransformer\) that automatically applies the appropriate chain of transforms when the emit target is set to ES2016 through ES2021, ensuring that modern syntax is correctly downleveled for older JavaScript environments.

internal/transformers/estransforms · high confidence

New TypeScript emit transformers for import elision, type erasure, and decorators

The \internal/transformers/tstransforms\ package now includes several new Go-based transformers that handle TypeScript-specific syntax during JavaScript emission. The \ImportElisionTransformer\ removes unused type-only imports and exports from the emitted code, while the \TypeEraserTransformer\ strips TypeScript-only constructs such as type annotations, interfaces, type aliases, and accessibility modifiers. Additionally, the \LegacyDecoratorsTransformer\ and \MetadataTransformer\ implement the legacy decorator transformation logic, including the injection of runtime metadata for decorated classes and members. The \RuntimeSyntaxTransformer\ converts TypeScript-specific runtime syntax (like enums and namespaces) into standard JavaScript, and the \TypeSerializer\ provides the logic for serializing type information for decorator metadata. Corresponding tests verify the correct elision and transformation behavior for these features.

internal/transformers/tstransforms · high confidence

New auto-import infrastructure and automatic type acquisition

The project system now includes a new auto-import infrastructure that manages the discovery and installation of TypeScript type definitions (typings) for JavaScript projects. This change introduces a dedicated \ata\ (Automatic Type Acquisition) package that handles discovering missing types from \node\_modules\ and unresolved imports, validating NPM package names, and installing \@types\ packages via npm. The \project/api.go\ file exposes new \APIUpdate\ and \APIUpdateTemporary\ methods to manage project and file open/close states and apply temporary in-memory content overrides, which are utilized by the new auto-import and type acquisition logic to keep the language service program up to date with newly installed types.

internal/project · high confidence

New build orchestrator with content mapper support

The \internal/execute/build\ package now implements a new build orchestrator that manages project dependencies, up-to-date checks, and incremental builds. This change introduces support for content mappers, allowing non-TypeScript files (like Vue or Svelte) to be compiled via the \--build\ mode. The orchestrator handles task scheduling, dependency graph resolution, and watch mode integration, while also caching source files and build info to improve performance.

internal/execute/build · high confidence

New cached VFS wrapper for improved file system performance

A new \cachedvfs\ package has been added to wrap the underlying file system, caching the results of read-only operations like \DirectoryExists\, \FileExists\, \GetAccessibleEntries\, \Realpath\, and \Stat\. This reduces redundant file system calls for repeated lookups, while providing controls to enable, disable, or clear the cache as needed.

internal/vfs/cachedvfs · high confidence

New custom linting rules for Go code quality and consistency

The custom linting tool now includes several new analyzers to enforce better Go coding practices. The 'bitclear' analyzer suggests using the \&^=\ operator instead of \&= ^\ for bit clearing. The 'checkchildren' analyzer flags early returns in checker methods that skip checking child nodes, ensuring consistent diagnostic output. The 'cleanup' analyzer detects \t.Cleanup\ closures that capture testing variables, which can lead to panics. The 'emptycase' analyzer identifies empty switch/select cases. The 'forbidparentaccess' analyzer prevents the use of \.Parent\ in transformers to avoid issues with unset pointers. The 'shadow' analyzer detects unintended variable shadowing. Finally, the 'unexportedapi' analyzer ensures that exported APIs do not reference unexported identifiers, maintaining a clean public interface.

_\tools/customlint · high confidence

New diagnostic writer package for unified error reporting

The \internal/diagnosticwriter\ package has been added to provide a unified interface for formatting and displaying diagnostics. It introduces a \Diagnostic\ interface that abstracts over both AST and LSP diagnostics, allowing the system to handle error reporting consistently. A key feature is the \ASTDiagnostic\ wrapper, which resolves location mappings for content-mapped files, ensuring that diagnostics from transformed code are correctly attributed to their original source locations or flagged as synthesized. This enables accurate error messages with proper line and column information, even when source files are processed through content mappers.

internal/diagnosticwriter · high confidence

New filesystem baseline diffing utility for test stability

Added a new \FSDiffer\ utility in \internal/testutil/fsbaselineutil\ that compares current filesystem states against previous snapshots to detect new, modified, deleted, or rewritten files. It includes logic to sanitize unstable internal symbol names in file contents and tracks metadata like modification times and symlink targets, enabling more stable and deterministic filesystem baselines for tests.

internal/testutil/fsbaselineutil · high confidence

New in-memory virtual filesystem for testing

Added a new \vfstest\ package that provides an in-memory virtual filesystem implementation (\MapFS\) for use in tests. This helper allows tests to define file contents and directory structures via a map, supporting case-sensitive and case-insensitive modes, symlink resolution, and deterministic clock control for reproducible file modification times.

internal/vfs/vfstest · high confidence

New internal collection types: CopyOnWrite, OrderedMap, MultiMap, and SyncMap

The internal/collections package now includes several new data structures to support advanced internal operations. CopyOnWriteMap and CopyOnWriteSet allow for efficient, scope-aware cloning where mutations are deferred until the first write, optimizing scenarios with nested scopes. OrderedMap and OrderedSet provide insertion-ordered iteration, which is critical for preserving configuration or declaration order. A MultiMap supports one-to-many key-value relationships, and a typesafe SyncMap wrapper around sync.Map handles concurrent access while correctly managing nil values. These additions are accompanied by comprehensive test coverage for all new types.

internal/collections · high confidence

New internal language service API and code fix infrastructure

The internal language service now exposes a public API for retrieving symbols and types (api.go), and introduces a structured code fix provider system (codeactions.go) that supports both single and 'fix-all' quick fixes. This infrastructure includes specific providers for fixing missing imports, correcting class interface implementations, and resolving isolated declarations type annotation errors. Additionally, the service now supports VS Code's auto-insertion of closing JSX tags (autoinsert.go).

internal/ls · high confidence

New internal language service utilities for formatting, auto-imports, and code analysis

This change introduces a new \internal/ls/lsutil\ package that consolidates core language service utilities. It adds logic for Automatic Semicolon Insertion (ASI) detection and node completion status, which affects how the editor handles incomplete code. It also implements the infrastructure for organizing imports, including configurable sorting (ordinal, natural, unicode) and type-ordering preferences. Additionally, it provides the foundation for user preference serialization/deserialization (mapping VS Code settings to internal preferences), code formatting options parsing, and symbol display logic for completions and references.

internal/ls/lsutil · high confidence

New module specifier generation and auto-import infrastructure

This change introduces a new Go-based implementation for generating module specifiers and handling auto-imports in the \internal/modulespecifiers\ package. It adds support for user preferences regarding import path styles (shortest, project-relative, relative, non-relative) and extension endings (minimal, index, .js, .ts, auto). The implementation includes logic to infer preferred import extensions based on existing file imports and compiler options (such as \allowImportingTsExtensions\ and \nodeNext\ resolution), handles symlink resolution, and provides a mechanism to exclude specific auto-imports via regex patterns. A new test suite validates the path resolution and symlink handling logic.

internal/modulespecifiers · high confidence

New synchronous and asynchronous API server with callback filesystem support

The internal API now supports both synchronous (MessagePack) and asynchronous (JSON-RPC) communication modes, allowing clients to connect via STDIO or named pipes. A new callback filesystem mechanism enables clients to intercept and override file system operations (such as reading files or checking existence) via RPC, which is particularly useful for in-memory file systems in testing or sandboxed environments. The server also introduces temporary snapshots for non-destructive file content overrides and includes diagnostic fixes for JSON unmarshaling panics and UTF-16 offset reporting.

internal/api · high confidence

New test utility for executing Node.js scripts in tests

Added a new \EvalNodeScript\ helper in \internal/testutil/jstest\ that allows tests to write and execute arbitrary Node.js ES modules, automatically handling script creation, execution via the \node\ binary, and unmarshaling of the JSON-stringified return value into a Go type. A specialized variant, \EvalNodeScriptWithTS\, is also provided to inject the TypeScript library into the script's scope, facilitating tests that require TypeScript runtime behavior.

internal/testutil/jstest · high confidence

New tool to generate TypeScript API definitions from Go source

A new Go-based code generator (\_tools/gen-proto) has been added to automatically produce TypeScript API type definitions from Go source files. This tool parses Go packages to extract method signatures and type metadata, outputting a .ts file containing interfaces and type aliases that match the Go API structure. A corresponding test ensures the generator correctly handles specific API methods, types, and formatting requirements.

_\tools/gen-proto · high confidence

Port scanner and token navigation utilities to API client, including JSDoc in encoded ASTs

The scanner implementation and associated token navigation utilities have been moved into the \internal/scanner\ package and integrated into the API client layer. This change ensures that JSDoc information is now included in encoded ASTs and adds several new properties to the \SourceFile\ object, providing richer syntactic context for API consumers.

internal/scanner · high confidence

Ported TypeScript formatter to Go

The internal code formatter has been ported from TypeScript to Go, introducing a new \internal/format\ package that exposes document, selection, and on-enter formatting capabilities to the language server. This implementation includes a rule-based engine for whitespace and indentation decisions, support for smart indentation logic, and specific handling for comments and JSDoc, ensuring consistent code style application within the editor.

internal/format · high confidence

Support for external content mappers to transform unsupported file types

Users can now configure external plugins (content mappers) to transform unsupported file extensions, such as .vue or .astro, into virtual TypeScript during program construction. This is declared in tsconfig's "contentMappers" section, where the host spawns the mapper's npm package as a child process and communicates via JSON-RPC. The system consolidates processes by mapper identity so multiple projects sharing the same mapper version reuse a single process, and it supports dynamic configuration changes via watched files and config identities.

(repo-wide) · high confidence

Architecture

Introduce new printer infrastructure for code emission

The internal/printer package has been restructured with new foundational components to support code generation. This includes an EmitContext for managing transformation state and side-tables, a NodeFactory for creating AST nodes during emit, a ChangeTrackerWriter for preserving source positions, and a NameGenerator for handling unique identifier generation. These additions provide the necessary scaffolding for the printer to handle complex emission scenarios, such as downleveling and declaration emit, by separating concerns like context management, node creation, and text writing.

internal/printer · high confidence

Introduce node builder type definitions and interfaces

Added the \types.go\ file in \internal/nodebuilder\ which defines the \SymbolTracker\ interface and the \Flags\ and \InternalFlags\ constants used by the node builder and emit resolver. This establishes the foundational types for symbol tracking and formatting flags required for the printer and checker implementations.

internal/nodebuilder · high confidence

Behavioural changes

245 commits (49 fixes) modifying github.com/microsoft/typescript-go

A change to existing behaviour in github.com/microsoft/typescript-go — 245 commits (49 fixs), 18 files: “Content mappers (\#4712)”; “fix(api): DocumentIdentifier JSON unmarshaling panic (\#2943)”; “Auto import memory optimizations (\#2991)”; and 242 more (refs \#4712, \#2943, \#2991, \#4341, \#4301, …).

github.com/microsoft/typescript-go · medium confidence · unverified

38 commits (5 fixes) modifying internal/tspath

A change to existing behaviour in internal/tspath — 38 commits (5 fixs), 6 files: “Content mappers (\#4712)”; “Replace some b.N with b.Loop (\#445)”; “Tsconfig parsing implementation (\#207)”; and 35 more (refs \#4712, \#445, \#207, \#339, \#162, …).

internal/tspath · medium confidence · unverified

Build mode command-line validation and option parsing

The build mode command-line parser now enforces stricter validation for build-specific flags. It rejects invalid combinations of options, such as using --clean with --force, --verbose, or --watch, and prevents mixing --watch with --dry. A new --builders flag is introduced to limit the number of projects that can build concurrently, requiring a value greater than 1. The parser also validates --fallbackPolling to require specific enum values, rejects --tsBuildInfoFile and --strict when used with --build, and ensures --excludeFiles and --excludeDirectories do not contain invalid path patterns.

testdata/baselines/reference/tsoptions/commandLineParsing/parseBuildOptions · high confidence

Build mode now watches package.json files for module resolution changes

When using TypeScript build mode (tsc -b) in watch mode, the compiler now tracks changes to package.json files that influence module resolution. Previously, adding, removing, or modifying a package.json in node\_modules or within the project structure would not trigger a rebuild, potentially leaving the build in an inconsistent state. This change ensures that if a package.json is added or removed, or if its fields (like 'main' or 'types') change, the build system detects the file change and recompiles the affected projects to reflect the new module resolution results.

testdata/baselines/reference/tsbuildWatch/moduleResolution · high confidence

Compiler performance and content-mapper support

The compiler now uses a FENNEL-based graph partitioning algorithm to assign source files to type checkers, balancing import affinity against workload to improve parallel checking performance. It also introduces a content-mapper system that allows virtual file extensions (such as .vue) to be transformed into TypeScript before parsing, with proper span mapping and error handling. Additionally, emit performance is improved by optimizing source map generation for long lines and adding benchmarks to track regressions.

internal/compiler · high confidence

Expanded document highlights for TypeScript and JavaScript constructs

The document highlights feature now covers a broader range of language patterns, including Vue SFC content mappers, inherited class and interface properties, constructor parameter properties, and various keywords such as \in\, \default\, \yield\, and \abstract\. It also correctly highlights template string literals, JSDoc \@typedef\ properties, \require\ destructuring, and module references across multiple files, while ensuring stability by avoiding crashes on malformed sources or nested destructuring.

testdata/baselines/reference/fourslash/documentHighlights · high confidence

Implement TypeScript output path resolution and common source directory logic

The internal output path calculation logic has been implemented to determine where compiled JavaScript, source maps, and declaration files are written. This change introduces the computation of a common source directory—derived from the \rootDir\ option, the configuration file's directory, or inferred from source files—which is used to preserve the source folder structure within the output directory (\outDir\). It also handles specific output behaviors such as JSON file emission, declaration map generation, and case-insensitive path canonicalization to ensure files are emitted to the correct locations relative to the project root.

internal/outputpaths · high confidence

Improved JSX closing tag auto-insertion for complex and namespaced components

The auto-insertion of closing tags for JSX elements now correctly handles complex scenarios, including namespaced tags (e.g., \ns:sometag\), property-access component names (e.g., \someModule.SomeComponent\), and tags containing special characters like \$\ (e.g., \$Foo\). This ensures that the generated closing snippet accurately reflects the full tag structure, including proper escaping for special characters, providing a more robust editing experience for advanced JSX patterns.

testdata/baselines/reference/fourslash/closingTag · medium confidence

The Quick Info display for destructured variables now correctly preserves and shows JSDoc comments from the source interface or type, even when properties are renamed during destructuring. Additionally, hover information for mapped type properties now correctly includes their associated JSDoc documentation, and JSDoc \{@link}\ tags within comments are rendered as clickable links in the Quick Info popup.

testdata/baselines/reference/fourslash/quickInfo · high confidence

Improved rename handling for aliases, quoted properties, and unresolved re-exports

The rename functionality now correctly respects the \useAliasesForRename\ setting, ensuring that renamed identifiers in import statements are updated when the option is enabled. Additionally, the tool now handles edge cases that previously caused crashes or incorrect behavior, specifically supporting quoted single-character property names and managing renames across unresolved re-exports without panicking.

testdata/baselines/reference/fourslash/findRenameLocations · medium confidence

Improved smart selection for JSDoc tags and mapped types

Smart selection now correctly includes inner content and surrounding context for JSDoc type annotations (such as @param, @returns, @type, @template, and @extends) and mapped types. When selecting a type or identifier within these tags, the selection now expands to include the full tag structure and relevant surrounding syntax, providing a more complete and predictable selection range for editing.

testdata/baselines/reference/submodule/fourslash/smartSelection · high confidence

Improved tsconfig.json parsing and validation

The configuration parser now provides stricter validation and clearer error reporting for tsconfig.json and jsconfig.json files. It rejects invalid file specifications, such as using parent directory traversal ('..') after recursive wildcards, and enforces correct types for 'files' and 'include' arrays. The parser also correctly handles extended configurations, including null overrides for inherited settings, and ensures that output directories ('outDir', 'declarationDir') are implicitly excluded from compilation unless explicitly overridden. Additionally, it now properly handles type acquisition settings in both config types and ignores dotted files and folders by default unless explicitly requested.

testdata/baselines/reference/config · high confidence

Introduce strict LSP protocol marshalling and validation

The \internal/lsp/lsproto\ package now enforces strict JSON-LSP compliance by rejecting explicit \null\ values for non-nullable fields and requiring all mandatory properties during unmarshalling. This change introduces a reflection-driven struct codec and comprehensive test coverage to ensure that LSP messages are validated against the specification's nullability rules before processing, preventing silent data corruption from malformed protocol messages.

internal/lsp/lsproto · high confidence

LSP protocol types are now generated from upstream metaModel.json

The internal LSP protocol definition is no longer hand-maintained; it is now automatically generated from the upstream vscode-language-server-node metaModel.json. This ensures the Go types stay in sync with the LSP specification and allows the server to support newer protocol features (such as code lenses, auto-imports, and custom initialization options) without manual type updates.

_internal/lsp/lsproto/\generate · high confidence

LSP server receives a complete rewrite with new concurrency, logging, and progress infrastructure

The internal/lsp package has been replaced with a new implementation that introduces a context-aware dynamic queue for managing LSP requests and outgoing messages, a structured logger that respects client verbosity settings and sends log messages via the LSP protocol, and a project loading progress reporter that displays WorkDoneProgress indicators to the client only after a configurable delay to avoid UI flickering. This new server also includes a content mapper system that allows extensions to contribute custom file type handlers, and is accompanied by comprehensive test suites covering completion behavior, progress notifications, and replay scenarios.

internal/lsp · high confidence

Lazy path resolution and TypeScript submodule test helpers

The internal/repo package now provides lazy, thread-safe access to key directory paths (root, TypeScript submodule, test data) using sync.OnceValue, ensuring these expensive lookups occur only once and on first use. It also introduces a SkipIfNoTypeScriptSubmodule helper that allows tests to gracefully skip when the TypeScript submodule is missing, improving test robustness in environments without the submodule.

internal/repo · high confidence

Native preview tooling now supports long file paths and Node 16 compatibility

The native-preview package introduces a new entrypoint structure and runtime logic to improve compatibility and robustness. The \tsgo\ executable path resolution has been updated to handle Windows long paths (paths exceeding 248 characters) by prepending the \\\\\?\\\ prefix, and the underlying \getExePath\ function now explicitly supports Node.js 16 environments by falling back to \module.createRequire\ when \import.meta.resolve\ is unavailable. Additionally, the package now exposes CommonJS version stubs (\version.cjs\) and TypeScript declarations for version information, ensuring consistent access to the package version across different module systems.

_\packages/native-preview/lib · high confidence

New auto-import infrastructure with optimized export indexing and crash-resistant resolution

The auto-import feature has been rebuilt with a new internal architecture that significantly improves reliability and performance. A new \aliasResolver\ component handles module resolution and symbol binding, including specific safeguards to prevent crashes when resolving symlinks or encountering type errors during export extraction. Export availability is now tracked using a new \Index\ data structure that supports fast, case-insensitive word-prefix searching, while the \registry\ manages incremental updates to project and \node\_modules\ buckets to reduce memory overhead. The system also introduces a new \Export\ model and \ImportAdder\ to coalesce multiple imports into single statements and correctly handle various import syntaxes (default, named, namespace, and CommonJS).

internal/ls/autoimport · high confidence

New baseline-driven test runner for compiler and transpile tests

The internal test runner now uses a new baseline-driven architecture to execute compiler and transpile tests. This change introduces a \CompilerBaselineRunner\ and \TranspileBaselineRunner\ that parse test files for directives (like \@filename\ and \@config\) and generate expected output baselines. It skips tests relying on removed TypeScript features (such as \typescript.d.ts\, AMD/UMD/SystemJS modules, and deprecated compiler options) and supports variations based on specific compiler options. The runner also handles symlink parsing, tsconfig.json processing within test cases, and concurrent execution for improved test performance.

internal/testrunner · high confidence

New module resolution engine with race-condition fixes

The internal module resolution logic has been rewritten to support modern Node.js features including ESM/CJS mode awareness, package.json exports/imports, and subpath patterns. This change introduces a new caching system that prevents race conditions during concurrent package resolution (specifically addressing issues with trailing slashes in module specifiers) and improves symlink handling. Users benefit from more accurate module resolution in complex monorepo or symlinked setups and better compatibility with NodeNext and Bundler resolution modes.

internal/module · high confidence

New package.json parsing infrastructure with strict validation and caching

The internal package.json parser has been replaced with a new implementation that introduces strict type validation for fields (distinguishing between present/valid, present/invalid, null, and missing), supports duplicate property names in JSON, and adds a thread-safe cache for package metadata. This change enables more accurate diagnostics when package.json fields have incorrect types and improves performance by caching parsed results across concurrent module resolution lookups.

internal/packagejson · high confidence

New transformer infrastructure and destructuring flattening logic

The \internal/transformers\ package now provides the core infrastructure for code transformation, introducing a \Transformer\ struct that encapsulates the emit context, node factory, and visitor, along with a \Chain\ function to compose multiple transforms sequentially. This change adds a robust \FlattenDestructuringAssignment\ and \FlattenDestructuringBinding\ implementation in \destructuring.go\, which decomposes complex destructuring patterns into individual assignments or variable declarations, supporting custom callbacks for module-specific behaviors like CommonJS exports. Additionally, \modifiervisitor.go\ introduces a \modifierVisitor\ to filter AST nodes based on allowed modifier flags, and \utilities.go\ provides helper functions for identifier classification and binding pattern conversion, laying the groundwork for subsequent ES feature transforms.

internal/transformers · high confidence

Rebuilt file watching around the fswatch package

The file watching system has been refactored to use the new \fswatch\ package, introducing a \WatchManager\ that handles directory watch lifecycle, event accumulation, and change signaling for both the CLI watcher and build mode. This change includes a new \WatchBackend\ abstraction to allow testing with mock backends, implements logic to ignore \.git\ and \node\_modules\ directories, and adds comprehensive tests for directory coverage rules, case-sensitivity handling, and recursive watch behavior.

internal/execute/watchmanager · high confidence

The internal VFS implementation has been restructured to provide a shared \Common\ base that handles path splitting, root resolution, and file operations. This change introduces support for detecting and handling symbolic links and Windows junctions (reparse points) when listing directory entries, ensuring these special files are correctly identified. Additionally, file content is now read directly into strings using unsafe pointer conversion to avoid unnecessary memory copies, with built-in handling for UTF-16 BOMs and encoding decoding.

internal/vfs/internal · high confidence

Refactored code change tracking into a modular package

The internal change tracking logic has been reorganized into a dedicated \internal/ls/change\ package, splitting the functionality into separate files for deletion (\delete.go\), the core tracker (\tracker.go\), and implementation details (\trackerimpl.go\). This refactoring introduces smarter handling for deleting various AST nodes, such as preserving empty parameter lists in single-parameter arrow functions, correctly managing leading trivia for import declarations, and handling variable declarations in different statement contexts like \for\ loops and \catch\ clauses. The tracker now also includes improved safety checks for content-mapped files to prevent corrupting edits when ranges cannot be faithfully mapped back to the original text.

internal/ls/change · high confidence

Refined JavaScript type inference and declaration emit behavior

The compiler now applies stricter type inference for JavaScript files, specifically removing implicit rest parameters from functions that reference the \arguments\ object, which results in more precise function signatures and new argument-count errors when excess arguments are passed. Declaration emit has been updated to produce cleaner output for CommonJS modules (converting namespaces to const objects) and accessors (using \readonly\ properties instead of namespaces), while symbol printing for aliases and prototype properties has been corrected to reflect their actual resolved types rather than generic placeholders.

testdata/baselines/reference/submoduleAccepted/compiler · high confidence

Removal of deprecated 'downlevelIteration' compiler option

The 'downlevelIteration' compiler option has been removed. Users who previously relied on this option to enable iteration over iterables in ES5 targets will now encounter a build error (TS5102) instructing them to remove the setting from their configuration. This change finalizes the deprecation cycle that began in TypeScript 6.0, where the option was marked as deprecated with a warning (TS5101).

testdata/baselines/reference/submoduleAccepted/conformance · high confidence

Replaces Go standard library casing with ECMAScript-compatible Unicode casing and identifier checks

The \internal/stringutil\ package now implements case conversion and identifier validation that strictly follows ECMAScript/Unicode 15.1.0 semantics rather than Go's default \unicode\ package. This introduces \ToLowerJS\ and \ToUpperJS\ functions that handle locale-insensitive mappings, including complex rules like the Greek Final Sigma context, and provides \IsUnicodeIdentifierStart\ and \IsUnicodeIdentifierPart\ for accurate ECMAScript identifier detection. The casing tables are generated from the pinned \@unicode/unicode-15.1.0\ npm package to ensure reproducible behavior across different Go toolchains and to match the casing behavior of modern JavaScript engines like V8.

internal/stringutil · high confidence

Rewrote glob matching to use a custom non-regex algorithm

The file-system glob matching logic in \internal/vfs/vfsmatch\ has been rewritten to replace the previous \regexp2\-based implementation with a custom, hand-coded algorithm. This change introduces a formal specification (documented in \MATCHING\_ALGORITHM.md\) and a new internal representation for patterns (using \globPattern\, \component\, and \segment\ types) to handle literal, wildcard, and double-asterisk matching without regular expressions. The new implementation also includes optimizations to avoid repeated \realpath\ calls and adds comprehensive benchmark tests (\bench\_test.go\) to track performance of pattern compilation and matching.

internal/vfs/vfsmatch · high confidence

Support for inlining const enums with synthetic comment preservation

The transformer now handles const enum inlining by replacing property and element access expressions with their literal constant values (numbers, strings, and bigints). When the compiler option to remove comments is disabled, the original source text is preserved as a synthetic trailing multi-line comment on the replacement node, ensuring that documentation or annotations attached to the enum member are retained in the emitted output.

internal/transformers/inliners · high confidence

Switch to jsonv2 with invalid UTF-8 support

The internal JSON serialization layer has been replaced with the \go-json-experiment/json\ (jsonv2) library. This change introduces a new \internal/json\ package that wraps the new library, ensuring that all marshaling operations automatically allow invalid UTF-8 sequences by default. Users will benefit from the performance and feature improvements of the new JSON engine, while maintaining compatibility with data containing non-UTF-8 bytes.

internal/json · high confidence

Updated TypeScript command-line parsing baselines

This change updates the reference baselines for command-line argument parsing in the TypeScript compiler options. The new test cases verify stricter validation for missing or empty arguments on flags like --lib, --module, --jsx, and --target, ensuring they now emit specific error codes (e.g., TS6044, TS6046) rather than silently accepting invalid states. It also adds tests for handling null values for tsconfig-only options (like --composite and --rootDirs) on the command line, enforcing that they can only be set to null or false, and confirms that build-specific flags (--clean, --dry, etc.) are correctly restricted to use only with --build. Additionally, it includes tests for parsing edge cases such as trailing whitespace in --lib, explicit boolean values, and invalid file specifications in --excludeFiles.

testdata/baselines/reference/tsoptions/commandLineParsing/parseCommandLine · high confidence

Updated TypeScript submodule to latest porting commit

The TypeScript submodule has been updated to commit 5848bc5, incorporating recent upstream changes including ES2024 support, ES5 transformation removals, and type ordering adjustments.

_\submodules · medium confidence

Updated bundled TypeScript library definitions to ES2024 and TypeScript 6.0

The bundled TypeScript library definitions (lib.d.ts and related files) have been updated to align with the ES2024 standard and TypeScript 6.0 behavior. This update introduces support for modern JavaScript features, including updated type definitions for decorators (lib.decorators.d.ts), legacy decorators (lib.decorators.legacy.d.ts), and comprehensive DOM APIs (lib.dom.d.ts). Users benefit from improved type checking and IntelliSense for the latest ECMAScript specifications and browser APIs, ensuring compatibility with newer language features and runtime environments.

internal/bundled/libs · high confidence

Updated compiler error baselines for module augmentation and export assignment

The test baselines for module augmentation and export assignment scenarios have been updated to reflect current compiler behavior. Specifically, the \augmentExportEquals2\ test now expects no errors, indicating that augmenting a module resolved to a non-module entity (via \export =\) no longer triggers the previous TS2671 and TS2503 errors. Additionally, the \exportAssignmentMembersVisibleInAugmentation\ test now expects a TS4060 error when an exported function's return type uses a private name from the augmented module's namespace, clarifying visibility rules for types in declaration merging.

testdata/baselines/reference/submoduleTriaged · high confidence

Updated document symbol test baselines for TypeScript 6.0 behavior

The reference baselines for the document symbols feature have been updated to reflect the new behavior introduced in TypeScript 6.0. These changes include support for \Object.defineProperty\ in document symbols, the inclusion of string literal arguments in document outline callback names, and the addition of content mappers for supplemental and synthesized document symbols. The baselines also cover fixes for out-of-range document symbol errors and the porting of various fourslash functions to ensure accurate navigation bar items for classes, functions, and modules.

testdata/baselines/reference/fourslash/documentSymbols · medium confidence

Updated inlay hints baselines for TypeScript 6.0 behavior

The reference baselines for inlay hints in the fourslash test suite have been updated to reflect the new behavior targeting TypeScript 6.0. This includes new baseline files for interactive scenarios such as function parameter types, parameter names, rest parameters, return types, and inferred type predicates, ensuring the test expectations align with the latest language semantics.

testdata/baselines/reference/submodule/fourslash/inlayHints, testdata/baselines/reference/submoduleAccepted/fourslash/inlayHints · high confidence

Updated reference-finding baselines for TypeScript 6.0 behavior

The test baselines in the fourslash \findAllReferences\ suite have been updated to reflect the new reference-finding behavior introduced in TypeScript 6.0. These changes cover a wide range of scenarios, including improved handling of JSDoc \@link\ and \@see\ tags, dynamic imports, CommonJS \require\ destructuring, and constructor references. The updates also address specific edge cases such as namespace exports, triple-slash directives, and implicit JSX imports, ensuring that the 'Find All References' feature aligns with the latest language specifications.

testdata/baselines/reference/submodule/fourslash/findAllReferences · high confidence

Updated rename-location baselines for TypeScript 6.0 behavior

The test baselines in the \findRenameLocations\ fourslash suite have been updated to reflect the new rename behavior introduced in TypeScript 6.0. These changes include stricter handling of quoted rename prefixes and suffixes, extended rename eligibility for additional node kinds, and improved support for renaming across dynamic imports, re-exports, and JSDoc tags (such as \@typedef\, \@param\, and \@throws\). The baselines also account for the \useAliasesForRename\ preference and ensure that renames correctly propagate through namespace imports, \export =\ modules, and JSX spread attributes.

testdata/baselines/reference/submodule/fourslash/findRenameLocations · high confidence

Updated transpile baseline expectations for isolated declarations

The test baselines in the transpile submodule have been updated to reflect new or corrected behavior for TypeScript's --isolatedDeclarations mode. Specifically, the compiler now emits TS9013 errors for expressions whose types cannot be inferred across files, and it no longer emits TS9025 errors for certain function parameters that previously required implicit undefined addition. Additionally, declaration maps now include a trailing comma in their mappings, and computed property diagnostics have been adjusted to report more errors for object literals.

testdata/baselines/reference/submodule/transpile · high confidence

Updated tsc --watch test baselines for TypeScript 6.0 behavior

This location contains reference baselines for the \tsc --watch\ command-line watcher. The files have been updated to reflect TypeScript 6.0 behavior, incorporating fixes for watch diagnostics when global declarations are removed, handling of incremental compilation states, and improved detection of file changes in \node\_modules\, symlinks, and nested directory structures.

testdata/baselines/reference/tscWatch/commandLineWatch · high confidence

Updated tsc command-line baselines and --init defaults

The test baselines for the \tsc\ command-line interface have been updated to reflect new default compiler options and improved error reporting. The \tsc --init\ command now generates a \tsconfig.json\ with stricter defaults, including \module: "nodenext"\, \verbatimModuleSyntax: true\, \noUncheckedSideEffectImports: true\, and \moduleDetection: "force"\. Additionally, the baselines now cover new validation behaviors, such as reporting errors for compiler options placed at the top level of \tsconfig.json\ and handling extensionless files in the \files\ list, as well as updated help output and color support via \FORCE\_COLOR\.

testdata/baselines/reference/tsc · high confidence

Updated tsc watch command-line baselines and help output

The test baselines for the \tsc\ watch mode command-line interface have been updated to reflect current behavior. This includes a new baseline for \tsc --init --watch\ which generates a \tsconfig.json\ with modern defaults such as \nodenext\ module, \esnext\ target, and strict type-checking options. Additionally, the help output baseline now displays an expanded list of compiler options (including \--watchInterval\, \--ignoreConfig\, and detailed \--lib\ values) and uses colored formatting for better readability, while the watch mode execution baseline confirms correct parsing of the \--watchInterval\ flag and proper file watching registration.

testdata/baselines/reference/tscWatch/commandLine · high confidence

Updated tsc watch-mode baselines for TypeScript 6.0 behavior

The test baselines in \testdata/baselines/reference/tscWatch/noEmit\ have been updated to reflect the new TypeScript 6.0 watch-mode behavior. These changes cover scenarios involving declaration file errors (TS4094), semantic errors (TS2322), and syntax errors (TS1002) under \noEmit\ and \declaration\ configurations, ensuring the compiler correctly handles error states and file emissions during incremental watch compilations.

testdata/baselines/reference/tscWatch/noEmit · medium confidence

Watch mode now detects updates to absolute non-root dependencies

The TypeScript build system's watch mode now correctly monitors and reacts to changes in dependencies located outside the project root directory (e.g., absolute paths like \D:/work/deps/\). Previously, updates to such external dependency files might not have triggered incremental rebuilds; now, modifying an external dependency file (such as changing a type definition) immediately triggers a recompilation and reports any resulting type errors, ensuring that builds stay up-to-date with external code changes.

testdata/baselines/reference/tsbuildWatch/dependencyUpdate · high confidence

Fixes

Fixes for 'Go to Implementation' crashes and coverage in edge cases

Resolved several crashes and added test coverage for the 'Go to Implementation' navigation feature in specific edge cases. These fixes prevent crashes when navigating from type-annotated implementations, dynamic imports of UMD modules, triple-slash directives, reexported type-only namespaces, and invalid CommonJS shorthand exports. Additionally, new baseline tests confirm correct behavior for content mappers in Vue files, object literal implementations, multi-source declaration files, and non-existent exports.

testdata/baselines/reference/fourslash/goToImplementation · high confidence

Fixes for Go-to-Definition in Vue, JSX, and binding patterns

This update resolves several issues with the Go-to-Definition feature, ensuring it works correctly in more complex scenarios. Users can now navigate definitions from Vue template bindings and JSX tag names without errors, and the feature correctly handles object binding patterns (including rest properties and aliases) and object literal shorthand properties. Additionally, the fix prevents crashes when encountering invalid decorator targets and ensures that source definitions are preferred over declaration files when available.

testdata/baselines/reference/fourslash/goToDefinition · high confidence

The internal path resolution logic has been rewritten to handle symlinks more robustly and efficiently. On Linux, \Realpath\ now uses a fast \O\_PATH\ + \/proc/self/fd\ approach to resolve canonical paths in constant time, falling back to standard evaluation if \/proc\ is unavailable, and includes a helper to ignore \EINTR\ system calls. On Windows, \Realpath\ now uses native Windows APIs (\GetFinalPathNameByHandle\) to correctly resolve symlinks and junction points, including support for long paths. Additionally, a new \IsSymlinkOrReparsePoint\ function accurately detects symlinks and reparse points on both Windows and other platforms, replacing previous platform-specific inconsistencies. These changes ensure correct behavior for tools relying on symlinked directories and hardlinked files.

internal/nativepath · high confidence

Test coverage

Add compiler test baselines for synthetic default imports, decorators, and async semantics; Added JSDoc conformance test cases; Added JSDoc conformance test for default exports; Added conformance test for declaration emit with package exports and no outDir; Added conformance tests for @type tag and basic syntax; Added conformance tests for Salsa JavaScript and TypeScript scenarios; Added conformance tests for dependent destructuring narrowing; Added fourslash test utilities; Added generated fourslash tests for auto-import and completion scenarios; Added inlay hints test baselines for computed names, identifier locations, and crash scenarios; Added manual fourslash tests for navigation, auto-close, and import completions; Added string test utility for dedenting text; Added sync-mode API and AST tests for native-preview; Added test case for const enums in namespaces; Added test for importing types via .d.ts extension; Added test harness for content mappers, watch backends, and build info baselines; Added tests for TypeScript SDK package resolution logic; Added tests for native-preview encoder, span mapping, and node list performance; Baseline updates for Code Lens reference and implementation counts; Expanded compiler test coverage for TypeScript language features and edge cases; Expanded fourslash test coverage for auto-imports and editor features; New fourslash test harness and baseline infrastructure; New test harness utilities for file system recording and source map verification; New test helpers for tsconfig parsing with VFS support; New test utilities for auto-import and monorepo lifecycle testing; New test utilities for parsing and emitting diagnostics; New test utility helpers for panic assertions and single-threaded program configuration; Updated Find All References test baselines; Updated Find All References test baselines for new and edge-case scenarios; Updated Go to Implementation test baselines for TypeScript 6.0; Updated Go-to-Definition test baselines for TypeScript 6.0 behavior; Updated JSX call go-to-definition baseline; Updated TypeScript build baseline tests for tsbuild behavior; Updated VS QuickInfo test baselines with symbol icons and classified text; Updated baseline expectations for go-to-type in Vue and tuple scenarios; Updated baseline for TypeScript build watch mode config file error reporting; Updated baselines for TypeScript build watch mode program updates; Updated baselines for tsbuild watch mode with config extends and reexport scenarios; Updated build-mode watch baselines for shared-project file inclusion; Updated compiler test baselines for TypeScript submodule; Updated conformance test baselines for const enums, JSDoc, and destructuring; Updated conformance test baselines for declaration merging and arrow function parsing; Updated diagnostic baselines for TypeScript 6.0 behavior; Updated fourslash test baselines for cross-project and declaration map scenarios; Updated library resolution baselines for TypeScript build watch mode; Updated reference baselines for TypeScript build watch mode samples; Updated signature help baselines for JSDoc and VS colorization; Updated test baselines for TypeScript 6.0 watch-mode build behavior.

Dependencies

Upgrade to Go 1.26 and update Go dependencies

The project has upgraded its Go toolchain from version 1.23.1 to 1.26, requiring a corresponding update to the Go module definitions. This change includes updating the \go.mod\ file to reflect the new language version and refreshing the \go.sum\ file with the latest dependency hashes. Additionally, several Go packages have been updated or added, including \github.com/go-json-experiment/json\, \github.com/peter-evans/patience\, and \github.com/zeebo/xxh3\, while indirect dependencies such as \golang.org/x/mod\ and \golang.org/x/tools\ have been bumped to their latest versions to support the new toolchain and project requirements.

(dependencies) · high confidence

Written by cca.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 65.

Lenses

  • Code Health 53
  • Architecture 92
  • Maturity 76
  • Readiness 69
  • Security 100
  • Performance 77

Changes since last survey

  • 300 commits — 205 feature/other, 95 fixes

By area

  • testdata/baselines — 100 commits
  • _packages/native-preview — 57 commits
  • internal/fourslash — 18 commits
  • internal/checker — 13 commits
  • (root) — 12 commits
  • internal/project — 10 commits
  • internal/execute — 9 commits
  • internal/ls — 9 commits
  • internal/compiler — 8 commits
  • internal/fswatch — 8 commits
  • _extension/src — 7 commits
  • internal/lsp — 7 commits
  • internal/ast — 5 commits
  • internal/tsoptions — 5 commits
  • internal/api — 4 commits
  • .github/workflows — 3 commits
  • internal/parser — 3 commits
  • internal/transformers — 3 commits
  • _extension/package.json — 2 commits
  • _scripts/generate-go-ast.ts — 2 commits

Notable commits

  • fix: Add regression test for inlay hints crash on reparsed nodes (#2460) (#2908)
  • fix: Better fix bug with this types and instantiateSymbol (#4307)
  • fix: Fall back to inotify when filesystem has errors in fanotify (fix watch in Docker) (#4661)
  • 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 Darwin realpath test lint failures (#4879)
  • fix: Fix LSP Watcher panic when Close races with WatchFiles (#4845)
  • 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 TS1515 not reported when duplicate named group is nested inside a group (#4881)
  • fix: Fix TS2871 false positive for ?? operator in nullish coalescing check (#4586)
  • 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 auto-import crash from unimplemented aliasResolver.IsSourceFileDefaultLibrary (#4323)
  • 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

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

Written by cca.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 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 89d5d5b2849a0db0957065889ca58536fa6d2e4a — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.61+preprod-f3449e6eb431.