Environment that supports quick language learning and experimenting in the following ways:
- Compile, run or debug (with breakpoints) any arbitrary TS file (CTRL-F5) in /src
- Write tests that are run automatically against any TS file (name files xxxx.tests.ts)
- Runs a TS REPL (ts-node) in the Terminal window. Use .load xxxx.ts to execute TS files, .clear to reset scope
- get linting going for semicolons, etc
- fix output window showing after every save
- clean this readme up properly
- make a src folder to keep it clean (but keep test with files) May cause errors and make repl annoying to use
- get DevDocs going offline for Chai, typescript, everything!!
- get REPL going from a VS task command
- maybe just have it load at the start?
Requires VS Code with the Mocha Sidebar extension.
Keep your code and tests in /src
//clear; ts-node --type-check
Tried to get SugarJS going with monkeypatching, by putting this at start of file. Did not work with TS:
/// import * as Sugar from 'sugar'; Sugar.extend();
let arr = [4, 5,6,7,99,5,5]; console.log(arr.sum());
// above triple slash is needed for sugar in extended mode, reference must be at top of file!!!
cannot do .clear; semicolon...
In ts-node: return value of last run expression is underscore _
if getting red squigly lines on import in VSCode try pressing F1 to reload window
in sugar use .raw to get unchained underlying object