genericEffectServices

August 27, 2026 ยท View on GitHub

Prevents services with type parameters that cannot be discriminated at runtime

PropertyValue
CategoryCorrectness
Default severitywarning
FixableNo
Effect versionsv3
Diagnostic codesTS377043
Language Service namegenericEffectServices
Oxlint nameeffecttsgo/generic-effect-services

Preview

import { Effect } from "effect"

export class Preview<_A> extends Effect.Service<Preview<any>>()("Preview", {
/**
             ^^^^^^^ effecttsgo(generic-effect-services): Effect Services with type parameters are not supported because they cannot be properly discriminated at runtime, which may cause unexpected behavior.
*/
  succeed: {}
}) {}

Language Service Configuration

See the Language Service setup guide for installation instructions.

{
  "$schema": "./node_modules/@effect/tsgo/schema.json",
  "compilerOptions": {
    "plugins": [
      {
        "name": "@effect/language-service",
        "diagnosticSeverity": {
          "genericEffectServices": "warning"
        }
      }
    ]
  }
}

Oxlint Configuration

See the Oxlint setup guide for installation and patching instructions.

{
  "$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
  "options": {
    "typeAware": true
  },
  "plugins": ["effecttsgo"],
  "rules": {
    "effecttsgo/generic-effect-services": "warn"
  }
}