1.0.1 • Published 6 years ago

typescript-method-delegate v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

typescript-plugin-method-delegate

A TypeScript Language Server Plugin that will suggest to create methods that delegate in implementatoin of selected property.

  • Editor agnostic - tested on Visual Studio Code and Atom but it should work on any TypeScript-aware editor

Demo

  • Adding types in Visual studio Code Editor

How to use:

npm i --save-dev typescript-plugin-method-delegate

in your tsconfig.json, add the plugin:

{
  "compilerOptions": {
    ...
    "plugins": [{
        "name": "typescript-plugin-method-delegate"
    }]
    ...
  }
}

Make sure you have installed typescript in your project (npm i --save-dev typescript) the editor you are using uses that typescript and not another. For example, Visual Studio Code comes with its own typescript version, so I need to "Select TypeScript Version" of the workspace:

{
  // Specifies the folder path containing the tsserver and lib*.d.ts files to use.
  "typescript.tsdk": "node_modules/typescript/lib"
}