HerringtonDarkholme / typescript-repl

An upgraded TypeScript REPL
210 stars 16 forks source link

TSUN - TypeScript Upgraded Node

TSUN, a TypeScript Upgraded Node, supports a REPL and interpreter for TypeScript. When invoked without ts file argument, TSUN works as a repl where you can type in expression. When you pass ts file to TSUN in command line argument, TSUN will automatically run it with invisible compilation.

Feature:

Install:

npm install -g tsun

Usage:

Note:

When used as interpreter, tsun will create a temporary directory as output directory and create a node process to execute compiled js. So it is usually a problem to correctly resolve node_modules path or definition file like *.d.ts. Currently, tsun make two symbolic links for node_modules and typings directories in temporary directory, conventionally.

TSUN will find the closest tsconfig.json relative to your working directory. You can now compile TypeScript to ES6 in node6+!

Custom definition files and JavaScript library support will be added in next releases.

ScreenShots:

Keyword Highlight Keyword Highlight

Tab-completion Tab Completion

Multiple Line Editing, typing double blank lines will escape from Multiple line mode Multiple Line Editing

Paste Mode Paste Mode

Definition Lookup Definition Lookup

And there is more for your exploration...

TODO:

If you need these, please let me know by making issues!