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.
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:
- TypeScript-Go core — a pinned, patched build of the upstream
tsgobinary. This provides the standard TypeScript language server experience at Go-native speed: completions, go-to-definition, hover, rename, and all other baseline LSP features. - 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.
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
tsgoreleases separately —effect-tsgois the single binary to manage. - When upstream
tsgoreleases new features or fixes,effect-tsgoadopts 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
Effectvalues that are neither yielded nor assigned, which silently go unexecuted. - Generator mistakes: Detects
yieldwithout*, missingreturn yield*, and nestedEffect<Effect<...>>caused by returning inside a generator. - Anti-patterns: Warns against patterns like chained
.provide()calls,Effect.run*inside generators, and IIFE usage ofEffect.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 area | Effect V3 | Effect V4 |
|---|---|---|
| Correctness diagnostics | Most | All |
| Anti-pattern diagnostics | All | All |
| Effect-native diagnostics | All | All |
| Style diagnostics | All | All |
| Refactors | All | All |
| Completions | All | Most |
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.