I'm writing this code in the editor
///<reference path='../node/express3.d.ts' />
///<reference path='../node/node.d.ts' />
import http = module('http');
var reqRecieved = function (req, res): void {
res.end();
};
var server = http.createServer(reqRecieved);
server.listen("1337");
console.log("server started");
And the problem is that the TypeScript vs2012 plugin is not generating the JavaScript code for the same. but if I change line:
import http = module('http');
to line
var http = require('http');
then it generates fine.
what am I doing wrong here?