soywiz-archive / typescript-node-definitions

TypeScript's typings for some popular node.js modules
207 stars 93 forks source link

Duplicate identifier console #22

Closed ghost closed 11 years ago

ghost commented 11 years ago

When I have this code:

/// <reference path="./node.d.ts" />
import http = module('http')
http.createServer(function (req, res) {
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

and try to compile it, I get: node.d.ts(15,13) error TS2000: Duplicate identifier 'console'. node.d.ts(314, 18) error TS4022: Type reference cannot refer to container '"child_process"'.

Is this my fault?

soywiz commented 11 years ago

No it seems to happen with typescript 0.9. I'm not sure if the console is already declared somewhere else (lib.d.ts), I will check it. Thanks for reporting!

soywiz commented 11 years ago

Should be fixed now