{"id":23436462,"url":"https://github.com/effect-ts/language-service","last_synced_at":"2026-04-02T11:57:07.602Z","repository":{"id":63589830,"uuid":"559294780","full_name":"Effect-TS/language-service","owner":"Effect-TS","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-04T09:39:25.000Z","size":15848,"stargazers_count":61,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T19:53:37.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Effect-TS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["mikearnaldi","gcanti"]}},"created_at":"2022-10-29T17:03:53.000Z","updated_at":"2025-04-04T03:05:40.000Z","dependencies_parsed_at":"2024-06-18T21:20:47.681Z","dependency_job_id":"43e7270e-2bf3-4b97-9dfc-dcef3ef38a25","html_url":"https://github.com/Effect-TS/language-service","commit_stats":{"total_commits":66,"total_committers":4,"mean_commits":16.5,"dds":0.4696969696969697,"last_synced_commit":"2d192bfc4a487b3598ea34830381a3524b0baacc"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Effect-TS%2Flanguage-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Effect-TS%2Flanguage-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Effect-TS%2Flanguage-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Effect-TS%2Flanguage-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Effect-TS","download_url":"https://codeload.github.com/Effect-TS/language-service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406084,"owners_count":20933803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T13:19:23.454Z","updated_at":"2026-04-02T11:57:07.595Z","avatar_url":"https://github.com/Effect-TS.png","language":"TypeScript","funding_links":["https://github.com/sponsors/mikearnaldi","https://github.com/sponsors/gcanti"],"categories":[],"sub_categories":[],"readme":"# language-service\n\nThis package implements a TypeScript language service plugin that allows additional refactors and diagnostics with your VSCode editor (or any editor that supports TypeScript's LSP).\n\n## Installation\n\n1. `npm install @effect/language-service --save-dev` in your project\n   - For monorepos: We suggest installing `@effect/language-service` in the monorepo root and configuring it in the root `tsconfig.json` for consistent behavior across all packages\n   - For any other package: Install directly in the package where you want to use it\n2. Inside your tsconfig.json, you should add the plugin configuration as follows:\n```jsonc\n{\n  \"$schema\": \"./node_modules/@effect/language-service/schema.json\",\n  // or from Github (may drift from your local installation)\n  // \"$schema\": \"\"https://raw.githubusercontent.com/Effect-TS/language-service/refs/heads/main/schema.json\",\n  \"compilerOptions\": {\n    \"plugins\": [\n      // ... other LSPs (if any) and as last\n      {\n        \"name\": \"@effect/language-service\"\n      }\n    ]\n  }\n}\n```\n\n3. Ensure that you have installed TypeScript locally in your project and set your editor to use your workspace TypeScript version.\n\n   - In VSCode you can do this by pressing \"F1\" and typing \"TypeScript: Select TypeScript version\". Then select \"Use workspace version\". If that option does not appear, TypeScript is not installed locally in your node_modules.\n       - Not required, but to remember the user to do so, you can update your `.vscode/settings.json`\n         ```jsonc\n         {\n           \"typescript.tsdk\": \"./node_modules/typescript/lib\",\n           \"typescript.enablePromptUseWorkspaceTsdk\": true\n         }\n         ```\n   - In JetBrains you may have to disable the Vue language service, and choose the workspace version of TypeScript in the settings from the dropdown.\n   - In NVim with nvim-vtsls you should refer to [how to enable TypeScript plugins in vtsls](https://github.com/yioneko/vtsls?tab=readme-ov-file#typescript-plugin-not-activated)\n   - In Emacs, additional steps are required to enable LSPs, [step by step instructions can be found here](https://gosha.net/2025/effect-ls-emacs/)\n\nAnd you're done! You'll now be able to use a set of refactors and diagnostics that target Effect!\n\n## Provided functionalities\n\n### Diagnostics\n\nSome diagnostics are off by default or have a default severity of suggestion, but you can always enable them or change their default severity in the plugin options.\n\n\u003c!-- diagnostics-table:start --\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\u003cth\u003eDiagnostic\u003c/th\u003e\u003cth\u003eSev\u003c/th\u003e\u003cth\u003eFix\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\u003cth\u003ev3\u003c/th\u003e\u003cth\u003ev4\u003c/th\u003e\u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\u003ctd colspan=\"6\"\u003e\u003cstrong\u003eCorrectness\u003c/strong\u003e \u003cem\u003eWrong, unsafe, or structurally invalid code patterns.\u003c/em\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eanyUnknownInErrorContext\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eDetects 'any' or 'unknown' types in Effect error or requirements channels\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eclassSelfMismatch\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eEnsures Self type parameter matches the class name in Service/Tag/Schema classes\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eduplicatePackage\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eDetects when multiple versions of the same Effect package are loaded\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectFnImplicitAny\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eMirrors noImplicitAny for unannotated Effect.fn and Effect.fnUntraced callback parameters when no outer contextual function type exists\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003efloatingEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eEnsures Effects are yielded or assigned to variables, not left floating\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003egenericEffectServices\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003ePrevents services with type parameters that cannot be discriminated at runtime\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissingEffectContext\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eReports missing service requirements in Effect context channel\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissingEffectError\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eReports missing error types in Effect error channel\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissingLayerContext\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eReports missing service requirements in Layer context channel\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissingReturnYieldStar\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using 'return yield*' for Effects with never success for better type narrowing\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissingStarInYieldEffectGen\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eEnforces using 'yield*' instead of 'yield' when yielding Effects in generators\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003enonObjectEffectServiceType\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eEnsures Effect.Service types are objects, not primitives\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eoutdatedApi\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eDetects usage of APIs that have been removed or renamed in Effect v4\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eoutdatedEffectCodegen\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eDetects when generated code is outdated and needs to be regenerated\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eoverriddenSchemaConstructor\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e❌\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003ePrevents overriding constructors in Schema classes which breaks decoding behavior\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eunsupportedServiceAccessors\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eWarns about service accessors that need codegen due to generic/complex signatures\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=\"6\"\u003e\u003cstrong\u003eAnti-pattern\u003c/strong\u003e \u003cem\u003eDiscouraged patterns that often lead to bugs or confusing behavior.\u003c/em\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003ecatchUnfailableEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using error handling on Effects that never fail (error type is 'never')\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectFnIife\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eEffect.fn or Effect.fnUntraced is called as an IIFE (Immediately Invoked Function Expression). Use Effect.gen instead.\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectGenUsesAdapter\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using the deprecated adapter parameter in Effect.gen\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectInFailure\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when an Effect is used inside an Effect failure channel\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectInVoidSuccess\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eDetects nested Effects in void success channels that may cause unexecuted effects\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalErrorInEffectCatch\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when catch callbacks return global Error type instead of typed errors\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalErrorInEffectFailure\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when the global Error type is used in an Effect failure channel\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003elayerMergeAllWithDependencies\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eDetects interdependencies in Layer.mergeAll calls where one layer provides a service that another layer requires\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eleakingRequirements\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eDetects implementation services leaked in service methods\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emultipleEffectProvide\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eWarns against chaining Effect.provide calls which can cause service lifecycle issues\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003ereturnEffectInGen\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eWarns when returning an Effect in a generator causes nested Effect\u0026lt;Effect\u0026lt;...\u0026gt;\u0026gt;\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003erunEffectInsideEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Runtime or Effect.run*With methods instead of Effect.run* inside Effect contexts\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eschemaSyncInEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eSuggests using Effect-based Schema methods instead of sync methods inside Effect generators\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003escopeInLayerEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Layer.scoped instead of Layer.effect when Scope is in requirements\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003estrictEffectProvide\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using Effect.provide with layers outside of application entry points\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003etryCatchInEffectGen\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eDiscourages try/catch in Effect generators in favor of Effect error handling\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eunknownInEffectCatch\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e⚠️\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when catch callbacks return unknown instead of typed errors\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=\"6\"\u003e\u003cstrong\u003eEffect-native\u003c/strong\u003e \u003cem\u003ePrefer Effect-native APIs and abstractions when available.\u003c/em\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eextendsNativeError\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when a class directly extends the native Error class\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalConsole\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using console methods outside Effect generators instead of Effect.log/Logger\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalConsoleInEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using console methods inside Effect generators instead of Effect.log/Logger\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalDate\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using Date.now() or new Date() outside Effect generators instead of Clock/DateTime\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalDateInEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using Date.now() or new Date() inside Effect generators instead of Clock/DateTime\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalFetch\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using the global fetch function outside Effect generators instead of the Effect HTTP client\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalFetchInEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using the global fetch function inside Effect generators instead of the Effect HTTP client\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalRandom\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using Math.random() outside Effect generators instead of the Random service\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalRandomInEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using Math.random() inside Effect generators instead of the Random service\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalTimers\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using setTimeout/setInterval outside Effect generators instead of Effect.sleep/Schedule\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eglobalTimersInEffect\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when using setTimeout/setInterval inside Effect generators instead of Effect.sleep/Schedule\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003einstanceOfSchema\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Schema.is instead of instanceof for Effect Schema types\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003enodeBuiltinImport\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eWarns when importing Node.js built-in modules that have Effect-native counterparts\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003epreferSchemaOverJson\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eSuggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify which may throw\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd colspan=\"6\"\u003e\u003cstrong\u003eStyle\u003c/strong\u003e \u003cem\u003eCleanup, consistency, and idiomatic Effect code.\u003c/em\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003ecatchAllToMapError\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Effect.mapError instead of Effect.catchAll when the callback only wraps the error with Effect.fail\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003edeterministicKeys\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eEnforces deterministic naming for service/tag/error identifiers based on class names\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectFnOpportunity\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Effect.fn for functions that returns an Effect\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectMapVoid\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Effect.asVoid instead of Effect.map(() =\u0026gt; void 0), Effect.map(() =\u0026gt; undefined), or Effect.map(() =\u0026gt; {})\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eeffectSucceedWithVoid\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eimportFromBarrel\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests importing from specific module paths instead of barrel exports\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissedPipeableOpportunity\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eEnforces the use of pipeable style for nested function calls\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003emissingEffectServiceDependency\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eChecks that Effect.Service dependencies satisfy all required layer inputs\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eredundantSchemaTagIdentifier\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eschemaStructWithTag\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests using Schema.TaggedStruct instead of Schema.Struct with _tag field\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eschemaUnionOfLiterals\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSimplifies Schema.Union of multiple Schema.Literal calls into single Schema.Literal\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eserviceNotAsClass\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eWarns when ServiceMap.Service is used as a variable instead of a class declaration\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003estrictBooleanExpressions\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e➖\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\u003ctd\u003eEnforces boolean types in conditional expressions for type safety\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eunnecessaryEffectGen\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests removing Effect.gen when it contains only a single return statement\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eunnecessaryFailYieldableError\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSuggests yielding yieldable errors directly instead of wrapping with Effect.fail\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eunnecessaryPipe\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eRemoves pipe calls with no arguments\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\u003ctd\u003e\u003ccode\u003eunnecessaryPipeChain\u003c/code\u003e\u003c/td\u003e\u003ctd\u003e💡\u003c/td\u003e\u003ctd\u003e🔧\u003c/td\u003e\u003ctd\u003eSimplifies chained pipe calls into a single pipe call\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003ctd\u003e✓\u003c/td\u003e\u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n`➖` off by default, `❌` error, `⚠️` warning, `💬` message, `💡` suggestion, `🔧` quick fix available\n\u003c!-- diagnostics-table:end --\u003e\n\n### Quickinfo\n\n- Show the extended type of the current Effect\n- Hovering `yield*` of `Effect.gen` will show the Effect type parameters\n- Hovering a variable assignment of a type Layer, will show info on how each service got involved\n- Hovering a layer, will attempt to produce a graph\n\n### Completions\n\n- Autocomplete 'Self' in `Effect.Service`, `Context.Tag`, `Schema.TaggedClass`, `Schema.TaggedRequest`, `ServiceMap.Service`, `Model.Class` and family\n- Autocomplete `Effect.gen` with `function*(){}`\n- Autocomplete `Effect.fn` with the span name given by the exported member\n- Completions for DurationInput string millis/seconds/etc...\n- Allow to configure packages to be imported with namespace style `import * as Effect from \"effect\"`\n- Suggest brand when using `Schema.brand`\n- Effect comment directives\n\n### Refactors\n\n- Transform an async function definition, into an Effect by using Effect.gen.\n- Transform an async function definition, into an Effect by using Effect.gen, and generating a tagged error for each promise call.\n- Transform an async function definition, into an Effect by using Effect.fn.\n- Transform an async function definition, into an Effect by using Effect.fn, and generating a tagged error for each promise call.\n- Transform a function returning an Effect.gen into a Effect.fn\n- Implement Service accessors in an `Effect.Service`, `Context.Tag` or `Effect.Tag` declaration\n- Function calls to pipe: Transform a set of function calls to a pipe() call.\n- Pipe to datafirst: Transform a pipe() call into a series of datafirst function calls (where available).\n- Toggle return type signature: With a single refactor, adds or removes type annotations from the definition.\n- Remove unnecessary `Effect.gen` definitions that contains a single `yield` statement.\n- Wrap an `Effect` expression with `Effect.gen`\n- Toggle between pipe styles `X.pipe(Y)` and `pipe(X, Y)`\n- Layer Magic: Automatically compose and build layers based on service dependencies\n- Structural Type to Schema: Convert TypeScript interfaces and type aliases to Effect Schema classes, with automatic detection and reuse of existing schemas\n- Convert `Effect.Service` to `Context.Tag` with a static `Layer` property (supports `effect`, `scoped`, `sync`, `succeed` combinators and `dependencies`)\n\n### Codegens\n\n- Automatically adds type annotations to exported constants based on their initializer types using `// @effect-codegens annotate`\n- Automatically implements service accessors in `Effect.Service`, `Context.Tag` or `Effect.Tag` declarations using `// @effect-codegens accessors`\n- Automatically generates Effect Schema classes from TypeScript types using `// @effect-codegens typeToSchema`\n\n### Miscellaneous\n- Renaming a class name, will rename the identifier as well for TaggedError, TaggedClass, etc...\n- \"Go to definition\" for RpcClient will resolve to the Rpc definition\n\n## Options\n\nFew options can be provided alongside the initialization of the Language Service Plugin.\n\n```jsonc\n{\n  \"compilerOptions\": {\n    \"plugins\": [\n      {\n        \"name\": \"@effect/language-service\",\n        \"refactors\": true, // controls Effect refactors (default: true)\n        \"diagnostics\": true, // controls Effect diagnostics (default: true)\n        \"diagnosticSeverity\": { // allows to change per-rule default severity of the diagnostic in the whole project\n          \"floatingEffect\": \"warning\" // example for a rule, allowed values are off,error,warning,message,suggestion\n        },\n        \"diagnosticsName\": true, // controls whether to include the rule name in diagnostic messages (default: true)\n        \"missingDiagnosticNextLine\": \"warning\", // controls the severity of warnings for unused @effect-diagnostics-next-line comments (default: \"warning\", allowed values: off,error,warning,message,suggestion)\n        \"includeSuggestionsInTsc\": true, // when enabled with effect-language-service patch enabled, diagnostics with \"suggestion\" severity will be reported as \"message\" in TSC with \"[suggestion]\" prefix; useful to help steer LLM output (default: true)\n        \"ignoreEffectWarningsInTscExitCode\": false, // if set to true, effect-related warnings won't change the exit code of tsc, meaning that tsc will compile fine even if effect warnings are emitted (default: false)\n        \"ignoreEffectErrorsInTscExitCode\": false, // if set to true, effect-related errors won't change the exit code of tsc (default: false)\n        \"ignoreEffectSuggestionsInTscExitCode\": true, // if set to true, effect-related suggestions won't change the exit code of tsc (default: true)\n        \"skipDisabledOptimization\": false, // if set to true, disabled diagnostics are still processed so per-line or per-section overrides can be honored in patched tsc runs (default: false)\n        \"quickinfo\": true, // controls Effect quickinfo (default: true)\n        \"quickinfoEffectParameters\": \"whenTruncated\", // (default: \"whenTruncated\") controls when to display effect type parameters always,never,whenTruncated\n        \"quickinfoMaximumLength\": -1, // controls how long can be the types in the quickinfo hover (helps with very long type to improve perfs, defaults to -1 for no truncation, can be any number eg. 1000 and TS will try to fit as much as possible in that budget, higher number means more info.)\n        \"completions\": true, // controls Effect completions (default: true)\n        \"goto\": true, // controls Effect goto references (default: true)\n        \"inlays\": true, // controls Effect provided inlayHints (default: true)\n        \"allowedDuplicatedPackages\": [], // list of package names that have effect in peer dependencies and are allowed to be duplicated (default: [])\n        \"barrelImportPackages\": [], // package names that should be preferred as imported from the top level barrel file (default: [])\n        \"namespaceImportPackages\": [], // package names that should be preferred as imported with namespace imports e.g. [\"effect\", \"@effect/*\"] (default: [])\n        \"topLevelNamedReexports\": \"ignore\", // for namespaceImportPackages, how should top level named re-exports (e.g. {pipe} from \"effect\") be treated? \"ignore\" will leave them as is, \"follow\" will rewrite them to the re-exported module (e.g. {pipe} from \"effect/Function\")\n        \"importAliases\": { \"Array\": \"Arr\" }, // allows to chose some different names for import name aliases (only when not chosing to import the whole module) (default: {})\n        \"noExternal\": false, // disables features that provides links to external websites (such as links to mermaidchart.com) (default: false)\n        \"keyPatterns\": [{ \"target\": \"service\", \"pattern\": \"default\", \"skipLeadingPath\": [\"src/\"] }], // configure the key patterns; recommended reading more on the section \"Configuring Key Patterns\"\n        \"effectFn\": [\"span\"], // what types of Effect.fn you want to get suggested, zero or multiple between \"untraced\" for fnUntraced, \"span\" for Effect.fn with explicit withSpan span, \"suggested-span\" for Effect.fn with a broadly suggested name from local context, \"inferred-span\" for Effect.fn with inferred exported declaration names, \"no-span\" for Effect.fn with no span (default: [\"span\"])\n        \"layerGraphFollowDepth\": 0, // controls the depth level that the layer graph will follow when resolving layer dependencies, depth is counted only when exiting the currently hovered/analyzed layer definition (default: 0)\n        \"mermaidProvider\": \"mermaid.live\" // which provider to use for mermaid, can also be a uri like http://localhost:8080 if running mermaid-live-editor locally.\n      }\n    ]\n  }\n}\n```\n\n### DiagnosticSeverty properties list\n\nThe full list can be found in the [diagnostics](https://github.com/Effect-TS/language-service/tree/main/src/diagnostics) folder.\n\n## Why do diagnostics not appear at compile time?\n\nTypeScript LSPs are loaded only while editing your files. That means that if you run `tsc` in your project, the plugin won't be loaded and you'll miss out on the Effect diagnostics.\n\n\nTo solve this we modify directly the source code of the tsc compiler and the typescript library in your project node_modules. This allows to get effect's diagnostics even when noEmit is enabled, for composite and incremental projects as well.\n\nAfter having installed and configured the LSP for editor usage, you can run the following command inside the folder that contains your local project typescript installation:\n\n`effect-language-service patch`\n\nIf everything goes smoothly, something along these lines should be printed out:\n\n```\n/node_modules/typescript/lib/typescript.js patched successfully.\n/node_modules/typescript/lib/_tsc.js patched successfully.\n```\n\nNow the CLI has patched the tsc binary and the typescript library to raise Effect diagnostics even at build time if the plugin is configured in your tsconfig!\n\nAs the command output suggests, you may need to delete your tsbuildinfo files or perform a full rebuild in order to re-check previously existing files.\n\nTo make the patch persistent across package installations and updates, we recommend adding the patch command to your package.json prepare scripts:\n\n```jsonc\n  \"scripts\": {\n    \"prepare\": \"effect-language-service patch\"\n  }\n```\n\nso that across updates the patch will be re-applied again.\n\n## Effect-Language-Service CLI\n\nThe effect language service plugin comes with a builtin CLI tool that can be used to perform various utilities, checks and setups. Since it relies on typescript, we recommend to install it locally and run it locally to ensure it loads the same typescript version of your project rather than a global installation that may resolve to use a different TS version from the one of your project.\n\n### `effect-language-service setup`\nRuns through a wizard to setup/update some basic functionalities of the LSP in an interactive way. This also keeps the `tsconfig.json` `$schema` aligned with the published Effect Language Service schema.\n\n### `effect-language-service config`\nAfter selecting a tsconfig.json file, jumps to the interactive configuration of rules severities.\n\n### `effect-language-service codegen`\nAutomatically updates Effect codegens in your TypeScript files. This command scans files for `@effect-codegens` directives and applies the necessary code transformations. Use `--file` to update a specific file, or `--project` with a tsconfig file to update an entire project. The `--verbose` flag provides detailed output about which files are being processed and updated.\n\n### `effect-language-service diagnostics`\nProvides a way to get through a CLI the list of Effect specific diagnostics; without patching your typescript installation. A `--file` option may be used to get diagnostics for a specific file, or `--project` with a tsconfig file to get an entire project. You can also pass `--lspconfig '{ \"effectFn\": [\"untraced\"] }'` to override the project plugin configuration inline for that diagnostics run.\n\n### `effect-language-service quickfixes`\nShows diagnostics that have available quick fixes along with their proposed code changes. This is useful for previewing what fixes the language service can apply to your code. Use `--file` to check a specific file, or `--project` with a tsconfig file to check an entire project. The output displays each diagnostic with its location and the diff of proposed changes.\n\n### `effect-language-service check`\nThis command runs a check of the setup of the patching mechanism of the LSP, to understand if typescript has been patched or not.\n\n### `effect-language-service patch`\nPatches (or re-patches) your local TypeScript installation to provide Effect diagnostics at build time.\n\n### `effect-language-service unpatch`\nRevery any previously applied patch to the local TypeScript installation.\n\n### `effect-language-service overview`\nThis command is useful to provide an overview of Effect-related exports in your files or project, and is very useful for LLMs to grasp an overall idea of what a file/project offers. Use `--file` to analyze a specific file, or `--project` with a tsconfig file to analyze an entire project.\n\nExample output:\n```\n✔ Processed 3 file(s)\n\nYieldable Errors (2)\n  NotFoundError\n    ./src/errors.ts:5:1\n    NotFoundError\n    Thrown when a resource is not found\n\n  ValidationError\n    ./src/errors.ts:12:1\n    ValidationError\n    Thrown when input validation fails\n\nServices (2)\n  DbConnection\n    ./src/services/db.ts:6:1\n    DbConnection\n    Manages database connections and pooling\n\n  Cache\n    ./src/services/cache.ts:13:1\n    Cache\n    In-memory caching layer\n\nLayers (2)\n  CacheLive\n    ./src/layers/cache.ts:34:14\n    Layer\u003cCache, never, never\u003e\n    Provides cache with file system backing\n\n  AppLive\n    ./src/layers/app.ts:39:14\n    Layer\u003cCache | UserRepository, never, never\u003e\n    Complete application layer\n```\n\n### `effect-language-service layerinfo`\nThis command provides detailed information about a specific exported layer, including what services it provides, what it requires, and a suggested composition order. Use `--file` to specify the file and `--name` to specify the layer name.\n\nExample output:\n```\nAppLive\n  ./src/layers/app.ts:39:14\n  Layer\u003cCache | UserRepository, never, never\u003e\n\nProvides (2):\n  - Cache\n  - UserRepository\n\nSuggested Composition:\n  UserRepository.Default.pipe(\n    Layer.provide(DbConnection.Default),\n    Layer.provideMerge(Cache.Default),\n    Layer.provide(FileSystem.Default)\n  )\n\nTip: Not sure you got your composition right? Just write all layers inside a Layer.mergeAll(...)\ncommand, and then run the layerinfo command to get the suggested composition order to use.\n```\n\n## Configuring diagnostics\n\nYou can either disable or change the severity of specific diagnostics by using comments in your code.\n\n```ts\n// @effect-diagnostics effect/floatingEffect:off\nEffect.succeed(1); // This will not be reported as a floating Effect\n\n// @effect-diagnostics effect/floatingEffect:error\nEffect.succeed(1); // This will be reported as a floating effect\n```\n\nYou can also use `*` as a wildcard to apply a severity to all diagnostics at once:\n\n```ts\n// @effect-diagnostics *:off\nEffect.succeed(1); // No diagnostics will be reported from this point on\n\n// @effect-diagnostics effect/floatingEffect:error\nEffect.succeed(1); // This will be reported as a floating effect (rule-specific overrides wildcard)\n```\n\nor you can set the severity for the entire project in the global plugin configuration\n\n```jsonc\n{\n  \"compilerOptions\": {\n    \"plugins\": [\n      {\n        // ...\n        \"diagnosticSeverity\": { // allows to change per-rule default severity of the diagnostic in the whole project\n          \"floatingEffect\": \"warning\" // example for a rule, allowed values are off,error,warning,message,suggestion\n        },\n        // ...\n      }\n    ]\n  }\n}\n```\n\n## Configuring Key Patterns\n\nEffect uses string keys for Services, Error Tags, RPC Methods, and more.\nIt can happen that sometimes, after some refactors or copy/paste, you may end up having wrong or non unique keys in your services.\n\nTo avoid that, the LSP suggests deterministic patterns for keys; that can be configured by the \"keyPatterns\" option.\n\nTo enable reporting of wrong or outdated keys, the rule \"deterministicKeys\" must be enabled first (off by default). To do so, adjust its diagnosticSeverity to error.\n\nThe keyPatterns key can then contain an array of the configured patterns.\n\n```jsonc\n{\n  \"compilerOptions\": {\n    \"plugins\": [\n      {\n        \"name\": \"@effect/language-service\",\n        // ...\n        \"diagnosticSeverity\": {\n          \"deterministicKeys\": \"error\" // enables reporting of wrong keys\n          // ...\n        },\n        \"keyPatterns\": [\n          {\n            \"target\": \"service\", // what key type to target between service|error\n            \"pattern\": \"default\", // the chosen pattern\n            \"skipLeadingPath\": [\"src/\"] // other pattern specific configs\n          }\n        ]\n        \n      }\n    ]\n  }\n}\n```\n\n### Pattern: default\n\nThis pattern constructs keys by chaining package name + file path + class identifier.\n\nE.g. `@effect/package/subpath-relative-to-package-root/FileName/ClassIdentifier`\n\nIf the filename and the class identifier are the same, they won't be repeated, but used only once.\n\nThe skipLeadingPath array can contain a set of prefixes to remove from the subpath part of the path. By default \"src/\" is removed for example.\n\n### Pattern: default-hashed\n\nIf you are concerned potentially showing service names in builds, this pattern is the same as default; but the string will be then hashed.\n\n### Pattern: package-identifier\n\nThis pattern uses the package name + identifier. This usually works great if you have a flat structure, with one file per service/error.\n\n## Using Key Patterns in custom API definitions\n\nYou can enforce and take advantage of the deterministicKeys rule also in your own custom API that provide an `extends MyApi(\"identifier\")`-like experience, so basically only in extends clause of class declarations.\n\nTo do so, first you need to enable `extendedKeyDetection: true` in plugin options to enable slower detection of this custom patterns.\n\nAnd then you'll need to add a JSDoc `/** @effect-identifier */` to the parameter where you expect to receive string identifier.\n\nLet's say for example that you want to provide a Repository() API that is basically the same of Context.Tag, but prefixes the key identifier with 'Repository/'; the definition of the Resource API would be something like this:\n\n```ts\nexport function Repository(/** @effect-identifier */ identifier: string) {\n  return Context.Tag(\"Repository/\" + identifier)\n}\n```\n\nand will be used as follows:\n```ts\nexport class UserRepo extends Repository(\"Hello\")\u003cUserRepo, { /** ... */ }\u003e() {}\n```\n\n\n## Known gotchas\n\n### Svelte VSCode extension and SvelteKit\n\nThe Svelte LSP does not properly compose with other LSPs when using SvelteKit. So the Effect LSP should be loaded as last entry to ensure proper composition.\n\nIf you did not install the Svelte LSP into your local project but instead through the Svelte VSCode extension, we recommend instead to install it locally and add it as the first entry. That way it won't be applied by the VSCode extension.\n\nYour tsconfig.json should look like this:\n\n```jsonc\n{\n  \"compilerOptions\": {\n    \"plugins\": [\n      { \"name\": \"typescript-svelte-plugin\" },\n      { \"name\": \"@effect/language-service\" }\n    ]\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffect-ts%2Flanguage-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffect-ts%2Flanguage-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffect-ts%2Flanguage-service/lists"}