Skip to content

Latest commit

 

History

History

vanilla

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

@dxup/vanilla

version downloads license

This is a TypeScript plugin for Vanilla JS.

Installation

pnpm i -D @dxup/vanilla

Or you can install the VS Code extension for easier setup:

code --install-extension KazariEX.dxup

Usage

Add the following to your tsconfig.json:

{
  "compilerOptions": {
    "plugins": [
      { "name": "@dxup/vanilla" }
    ]
  }
}

Features

1. signature

  • Go to definition for signature parameters.

    export default defineConfig({
      plugins: [{
        name: "testify",
        transform(code, id, options) {
          //                ^^^^^^^
        },
      }],
    });
  • Rewrite refactor for signature parameters.

    function swap(foo: number, bar: string, baz: boolean, qux: symbol) {}
    //                         ^^^ Refactor > Move parameter right
    swap(2, "3", true, Symbol(5));