The Node.js API documentation is quite good. Here is the TypeScript code I derived from their readline docs:
Loading gist for app.ts ...
After installing the Node.js Tools for Visual Studio, just create a project for the JavaScript template "Blank Node.js Console Application". Install TypeScript for Visual Studio if you don't have it installed. Turn on compiling files that are not part of a project and use commonjs code generation since we are using Node. To learn more about that setting, watch this 10 minute video about TypeScript Modules from Basarat Ali Syed.Just add a new file named app.ts. With that setting enabled, it will overwrite the app.js when you save. The node.d.ts definition is from the DefinitelyTyped repository. Make sure you grab the latest, because I just fixed a bug in it to make the code above work. :)