Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 1.51 KB

api-stability-leak.md

File metadata and controls

68 lines (56 loc) · 1.51 KB

apiStabilityLeak

Reports exported APIs whose public surface exposes a less stable type

Property Value
Category Maintainers
Default severity off
Fixable No
Effect versions v4
Diagnostic codes TS377137, TS377138
Language Service name apiStabilityLeak
Oxlint name effecttsgo/api-stability-leak

Preview

/** @stability experimental */
export interface PreviewExperimental {
  value: string
}

export interface PreviewStable {
/**
                 ^^^^^^^^^^^^^ effecttsgo(api-stability-leak): `effect-v4-tests/preview#PreviewStable` exposes `PreviewExperimental`, an experimental API.
*/
  leaked: PreviewExperimental
}

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": {
          "apiStabilityLeak": "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/api-stability-leak": "warn"
  }
}