Search code examples
compilationtypescriptecmascript-6building

Typescript: use lib.core.es6.d.ts


I'm using typescript, and trying to use an ES6 map, but getting compile errors.

I've discerned that I need to reference the file lib.core.es6.d.ts (ES6 Map in Typescript), and I know where that is on my filesystem. However, I can't find anything that specifies what to do to use that file.

Right now, I just have two files in a folder which I'm compiling with tsc --module amd treenode.ts treemerge.ts

How do I use the es6 types in one of those files? If the answer is "restructure your project the way site X says to", I'll grumble but I guess that's ok.


Solution

  • However, I can't find anything that specifies what to do to use that file.

    You need to get that file manually from github AND compile your project with --noLib passing in the lib file yourself.