Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 878
Justin Blank Avatar asked Feb 09 '23 10:02

Justin Blank


1 Answers

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.

like image 100
basarat Avatar answered Feb 17 '23 00:02

basarat