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

I am using typescript and trying to use the ES6 card, but getting compilation errors.

I noticed that I need to reference the file lib.core.es6.d.ts( ES6 Map in Typescript ), and I know where it is on my file system. However, I cannot find anything that indicates what to do to use this file.

Right now I have only two files in the folder that I am compiling with tsc --module amd treenode.ts treemerge.ts

How to use es6 types in one of these files? If the answer is "restructuring your project, as site X says," I will grumble, but I think that everything is in order.

+4
source share
2

, , , .

github --noLib, lib .

+4

- ES5, lib.core.d.ts, , ES6.

ES6, lib.core.es6.d.ts, . , ES6 JavaScript ES5. , , - TypeScript, JavaScript .

, lib.core.es6.d.ts basarat, - babel, ES6 ES5 .

omnisharp-atom omnisharp-client ES6 babel ES5.

https://github.com/OmniSharp/omnisharp-node-client/blob/master/tsconfig.json#L7-L9 https://github.com/OmniSharp/omnisharp-atom/blob/master/gulpfile.js#L45-L52 https://github.com/OmniSharp/omnisharp-node-client/blob/master/gulpfile.js#L54-L61

+4

Source: https://habr.com/ru/post/1617918/


All Articles