genericEffectServices
August 27, 2026 ยท View on GitHub
Prevents services with type parameters that cannot be discriminated at runtime
| Property | Value |
|---|---|
| Category | Correctness |
| Default severity | warning |
| Fixable | No |
| Effect versions | v3 |
| Diagnostic codes | TS377043 |
| Language Service name | genericEffectServices |
| Oxlint name | effecttsgo/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"
}
}