Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anuraghazra/vscode-strip-ts-copy
Strip types from TypeScript code while copying it.
https://github.com/anuraghazra/vscode-strip-ts-copy
Last synced: about 2 months ago
JSON representation
Strip types from TypeScript code while copying it.
- Host: GitHub
- URL: https://github.com/anuraghazra/vscode-strip-ts-copy
- Owner: anuraghazra
- Created: 2021-09-23T18:16:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-23T16:55:30.000Z (6 months ago)
- Last Synced: 2024-05-01T20:56:46.655Z (5 months ago)
- Language: TypeScript
- Size: 719 KB
- Stars: 63
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
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
> https://twitter.com/Rich_Harris/status/1440639878065111048
### 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
1. Install the plugin from [marketplace](https://marketplace.visualstudio.com/items?itemName=anuraghazra.strip-ts-copy)
2. Select a piece of code with TS
3. 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
1. Clone the repo
2. Install deps
3. Open `Run & Debug (Ctrl+Shift+D)` panel in vscode and hit start debugging button### TODO
- [ ] Write tests
- [ ] Setup release pipeline