I\'ve been researching what the possible values of the lib
property mean in the compilerOptions
found within the tsconfig.json
file. I fou
After some digging and comparing through the lib
folder on the Typescript GitHub I have found that, using es6
in the lib
property in the compilerOptions
corresponds to the code found in these references:
/// <reference path="lib.es2015.core.d.ts" />
/// <reference path="lib.es2015.collection.d.ts" />
/// <reference path="lib.es2015.generator.d.ts" />
/// <reference path="lib.es2015.iterable.d.ts" />
/// <reference path="lib.es2015.promise.d.ts" />
/// <reference path="lib.es2015.proxy.d.ts" />
/// <reference path="lib.es2015.reflect.d.ts" />
/// <reference path="lib.es2015.symbol.d.ts" />
/// <reference path="lib.es2015.symbol.wellknown.d.ts" />
/// <reference path="lib.es5.d.ts" />
/// <reference path="lib.dom.d.ts" />
/// <reference path="lib.scripthost.d.ts.d.ts" />
/// <reference path="lib.dom.iterable.d.ts" />
so to answer my question, to correctly cover all the contents of es6
with es2017
that section of the tsconfig.json should look like this:
{
...
"compilerOptions": {
...
"lib": ["es2017", "dom", "dom.iterable", "scripthost"]
},
...
}
}