This 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).
After npm install @effect/language-service
in your project, ensure you set your VSCode to use your workspace TypeScript version.
Inside your tsconfig.json, you should add the plugin configuration as follows:
{
"compilerOptions": {
"plugins": [
{
"name": "@effect/language-service"
}
]
}
}
Here's a list of the refactors provided by this language service plugin.
Transform a set of function calls to a pipe() call.
Transform a pipe() call into a series of datafirst function calls (where available).
Removes useless arrow functions.
With a single refactor, adds or removes type annotations from the definition.
Transform an async function definition, into an Effect by using Effect.gen.
Transform an async function definition, into an Effect by using Effect.gen, and generating a tagged error for each promise call.