2

Closed

Cleanup or select lib.d.ts global namespace

description

I'm using TypeScript in node.js and it is mildly annoying to have all the browser types in scope of the node.js code.

It comes from lib.d.ts. Stuff like Window and DOMElement are not used a lot but terms like Selection shadow our own imports.

Maybe some form of environment selector could be in order at some point?

comments

nabog wrote Mar 18, 2014 at 5:06 PM

I agree there is too much noise in lib.d.ts.

It's pretty annoying when trying to type "require('foo')" you end up with requestAnimationFrame, which can only be surpassed after the five letters 'requi'.

See also: https://typescript.codeplex.com/workitem/978

Bartvds wrote Apr 3, 2014 at 10:52 PM

Any idea when this would land? It was not for 1.0.0?

There was an request at DT for similar: https://github.com/borisyankov/DefinitelyTyped/issues/1980