For use TypeScript REPL in Node.js you can use tsun package
Install it globally with
npm install -g tsun
and run in your terminal or command prompt with tsun
command
Usage example:
$ tsun
TSUN : TypeScript Upgraded Node
type in TypeScript expression to evaluate
type :help for commands in repl
$ function multiply(x, y) {
..return x * y;
..}
undefined
$ multiply(3, 4)
12