See the results of your code as you save the file, without the need to switch windows or execute your script separately.
Scrub through your code and see the exact order your code was executed. Especially useful for understanding async code.
Effortlessly import any Node module or other files from your project into your worksheet. Whether you
use CommonJS with require
or ESM with import
, we got you covered.
You can effortlessly test your asynchronous code using Promises
but also
async/await.
Just add //ts-worksheet
or //ts-worksheet-with-variables
to your file, and
you're
all set.
After installation, you have multiple ways of running the plugin.
You will now have a new icon in the your left gutter in VSCode which you can use to configure your plugin.
- Open a JavaScript or TypeScript file.
- Add
//ts-worksheet
or//ts-worksheet-with-variables
at the top of the file. - Start coding and save the file when you are ready! You'll see the output of your code directly in the editor.
The difference between //ts-worksheet
and //ts-worksheet-with-variables
is the later shows also the results of your variable initialization. So for example you will get the output of this line only with the later one:
const hello = 'hi';
- Open a JavaScript or TypeScript file.
- Open your Command Palette and run the command
Run TypeScript Worksheet
orRun TypeScript Worksheet without variables
This will use the configuration to run the worksheet once in your current file so you don't run it by accident when you save your file like with the comment approach.
ATTENTION: This is still an early version of the plugin. If you find any issues, Create an issue for it.
We value your feedback! If you encounter any issues or have suggestions for improvements, please feel free to reach out to us. Your input helps us make this tool even better for the developer community.
This plugin is licensed under MIT License.