Strip TS Copy
VSCode plugin to strip types from TypeScript code while copying it.
Love the project? Consider sponsoring to help it improve!
The Problem
"An underdiscussed benefit of JS over TS - I'll frequently test individual functions by pasting them into the browser console. There's no faster feedback loop." - Rich Harris
The Solution
strip-ts-copy simply transpiles the selected code and copies it into your clipboard.
Inspired by BenLesh: https://twitter.com/BenLesh/status/1441057916413489156
Usage
-
Install the plugin from marketplace
-
Select a piece of code with TS
-
To copy the transpiled code press:
- In Windows ctrl+alt+c
- In Mac shift+alt+cmd+c
- Or: right click to open the context menu and select "Copy TS as JS"
Note: You can also customize the keybindings of StripTSCopy from the keyboard shortcuts customizer page in vscode.
Local development
- Clone the repo
- Install deps
- Open
Run & Debug (Ctrl+Shift+D)
panel in vscode and hit start debugging button
TODO
- Write tests
- Setup release pipeline