Skip to content

A simple typescript plugin that filters out [Go to definition] results from any given declaration file

License

Notifications You must be signed in to change notification settings

Viijay-Kr/typescript-cleanup-definitions

Repository files navigation

TypeScript CleanUp Definitions

What is it ?

typescript-cleanup-definitions is a simple TypeScript plugin that filters out Go to definition results from any given set of declaration files

Installation

npm install typescript-cleanup-definitions

or

yarn add typescript-cleanup-definitions

Usage

TS Config

Add the plugin to the tsconfig.json's compilerOptions

{
    "compilerOptions": {
        "plugins": [
            {
                "name": "typescript-cleanup-definitions",
                "enable": true,
                "modules": ["*.module.css", "*.client.d.ts"]
            }
        ]
    }
}

VS Code Extension

Add it as a TypeScript server plugin to the package.json contributes section

  "contributes":{
    ...config
    "typescriptServerPlugins": [
     {
       "enableForWorkspaceTypeScriptVersions": true,
       "name": "typescript-cleanup-definitions"
     }
   ]
  }

To configure the plugin at time of activation of your extension , follow this guide

Settings

  • enable
    • Enable or disable this plugin. Defaults to true
  • modules
    • List of module extensions the plugin should omit the definitions from

About

A simple typescript plugin that filters out [Go to definition] results from any given declaration file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •