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 |
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: {}
}) {}See the Language Service setup guide for installation instructions.
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"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "genericEffectServices": "warning" } } ] } }