Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Effect-TS/tsgo/llms.txt
Use this file to discover all available pages before exploring further.
@effect/tsgo is a superset of the official TypeScript-Go compiler. Each published release embeds a pinned, validated snapshot of the upstream tsgo binary plus the Effect diagnostics layer on top. You get standard TypeScript-Go functionality alongside Effect-specific diagnostics, quick fixes, and refactors — from a single package.
How pinning works
The upstreamtypescript-go commit that a given @effect/tsgo release is built against is recorded in two places:
flake.nix— thetypescript-go-srcinput pin used by the Nix build.- The Go submodule — the
typescript-go/directory in the source tree tracks the same commit.
effect-tsgo adopts them in a subsequent release after validating compatibility with the Effect diagnostics layer. The most recent upstream update in 0.0.16 pulled in auto-import fixes, linked editing support, signature help trigger characters, JSON syntax validation, and formatting rule fixes.
You do not need to track the upstream
tsgo releases separately. @effect/tsgo is the single binary to manage.Current version
The current package is@effect/tsgo at version 0.0.17. Because this project is in alpha, expect breaking changes between releases. Always check the CHANGELOG before upgrading.
Why pinning matters
Running@effect/tsgo against an arbitrary tsgo build would risk:
- API mismatches — the Effect diagnostics layer calls internal Go APIs that may shift between
tsgocommits. - Incorrect diagnostics — subtle changes in the TypeScript type-checker can silently alter diagnostic results.
- Editor instability — a mismatched binary can cause the language server to crash or produce duplicate results.
tsgo commit and validating the combination before release, effect-tsgo guarantees a stable, tested pairing.
When to upgrade
Upgrade@effect/tsgo when:
- A new release includes upstream
tsgofixes you need (consult the CHANGELOG for upstream changes included in each release). - New Effect diagnostics or quick fixes are available that you want in your project.
- A bug in the language server or a specific diagnostic has been fixed.
tsgo release — wait for an @effect/tsgo release that incorporates it.
How to upgrade
Re-run the patch command
After installing, update the binary to the version shipped with the new release:This replaces the previously patched binary with the new one. A backup of the old binary is created automatically.
Supported platforms
@effect/tsgo ships pre-built binaries for the following platforms via optional npm dependencies:
| Platform | Package |
|---|---|
| macOS (Apple Silicon) | @effect/tsgo-darwin-arm64 |
| macOS (Intel) | @effect/tsgo-darwin-x64 |
| Linux (x64) | @effect/tsgo-linux-x64 |
| Linux (ARM64) | @effect/tsgo-linux-arm64 |
| Linux (ARM) | @effect/tsgo-linux-arm |
| Windows (x64) | @effect/tsgo-win32-x64 |
| Windows (ARM64) | @effect/tsgo-win32-arm64 |
Nix flake
For Nix users, the repository exposes aflake.nix that builds a self-contained effect-tsgo binary from the pinned typescript-go and TypeScript sources, applying the Effect patch set on top.
typescript-go-src and typescript-src inputs to exact commits, ensuring fully reproducible builds:
x86_64-linux, aarch64-linux, x86_64-darwin, and aarch64-darwin.