Skip to main content

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 currently in Alpha. Expect breaking changes between releases and some missing features compared to the previous TypeScript-based version. Some features are on hold pending upstream TypeScript-Go progress.

What is Effect Language Service (tsgo)?

@effect/tsgo is a superset of TypeScript-Go — the high-performance, Go-based rewrite of the TypeScript compiler — augmented with the full Effect Language Service. It ships as a single binary (effect-tsgo) that acts as your editor’s TypeScript language server and adds Effect-specific intelligence on top. The project targets Effect V4 (codename: “smol”) as its primary target, with Effect V3 also supported for most diagnostics and refactors.

Architecture

effect-tsgo is composed of two layers:
  1. TypeScript-Go core — a pinned, patched build of the upstream tsgo binary. This provides the standard TypeScript language server experience at Go-native speed: completions, go-to-definition, hover, rename, and all other baseline LSP features.
  2. Effect Language Service layer — built on top of the TypeScript-Go core, this layer adds Effect-specific diagnostics, quick fixes, refactors, smart completions, and layer graph visualization.
Your editor talks to effect-tsgo over the standard TypeScript server protocol (tsserver), so it is compatible with any editor that supports TypeScript via tsserver.
Use effect-tsgo instead of tsgo, not alongside it. Running both in parallel produces duplicate diagnostics and degrades editor performance.

Relationship to TypeScript-Go

Each release of @effect/tsgo is built against a specific, pinned upstream tsgo commit. The Effect layer is applied as a minimal patch set on top. This means:
  • You get all standard TypeScript-Go functionality plus Effect-specific features from a single binary.
  • You do not need to track upstream tsgo releases separately — effect-tsgo is the single binary to manage.
  • When upstream tsgo releases new features or fixes, effect-tsgo adopts them in a subsequent release after validating compatibility with the Effect diagnostics layer.

What problems does it solve?

Writing correct Effect-TS code involves patterns — generators, error channels, context requirements, service layers — that TypeScript alone cannot enforce. @effect/tsgo gives you immediate, in-editor feedback for the most common sources of bugs and confusion:
  • Unhandled errors and requirements: Surfaces unhandled error types and context requirements as compile errors, not silent runtime failures.
  • Floating effects: Catches Effect values that are neither yielded nor assigned, which silently go unexecuted.
  • Generator mistakes: Detects yield without *, missing return yield*, and nested Effect<Effect<...>> caused by returning inside a generator.
  • Anti-patterns: Warns against patterns like chained .provide() calls, Effect.run* inside generators, and IIFE usage of Effect.fn.
  • Style and idiom: Suggests idiomatic rewrites — Effect.asVoid, Effect.void, Effect.fn, opaque schemas, pipe style — with one-keystroke quick fixes.
  • V4 migration: Detects APIs removed or renamed between Effect V3 and V4.

Key features

50+ diagnostics

Correctness, anti-pattern, Effect-native, and style diagnostics covering the most common Effect-TS pitfalls. Configurable severities.

Quick fixes

One-keystroke code actions to resolve many diagnostics automatically — fix missing yield*, remove redundant wrappers, rewrite to idiomatic APIs.

Refactors

Convert async/await to Effect generators or Effect.fn, compose layers automatically, generate schemas from types, toggle pipe style, and more.

Smart completions

Context-aware snippets for Effect.gen, Schema classes, Service/Tag constructors, and diagnostic/codegen comment directives.

Layer graph

Hover over any Layer value to see a live Mermaid dependency diagram showing the full service graph.

V3 & V4 support

Works with both Effect V3 and V4. V4-only rules are skipped automatically on V3 projects.

Supported Effect versions

Feature areaEffect V3Effect V4
Correctness diagnosticsMostAll
Anti-pattern diagnosticsAllAll
Effect-native diagnosticsAllAll
Style diagnosticsAllAll
RefactorsAllAll
CompletionsAllMost

Get started

Quickstart

Install @effect/tsgo in your project using the interactive setup wizard.

Editor setup

Configure VS Code, Neovim, or any tsserver-compatible editor.