outdatedApi

August 4, 2026 ยท View on GitHub

Detects usage of APIs that have been removed or renamed in Effect v4

PropertyValue
CategoryCorrectness
Default severitywarning
FixableNo
Effect versionsv4
Diagnostic codesTS377052, TS377053
Language Service nameoutdatedApi
Oxlint nameeffecttsgo/outdated-api

Preview

import { Effect } from "effect"
/**
^ effecttsgo(outdated-api): This project targets Effect v4, but this code uses Effect v3 APIs. The referenced API belongs to the v3 surface rather than the configured v4 surface.
*/

export const preview = Effect.gen(function*() {
  // @ts-expect-error
  return yield* Effect.runtime()
/**
                       ^^^^^^^ effecttsgo(outdated-api): This project targets Effect v4, but this code uses the Effect v3 API `runtime`. The referenced API belongs to the v3 surface rather than the configured v4 surface. Runtime has been removed in Effect v4. Use Effect.context to grab services and then run using Effect.runPromiseWith.
*/
})

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": {
          "outdatedApi": "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/outdated-api": "warn"
  }
}