Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Specify library file to be included in the compilation. Requires
TypeScript version 2.0 or later.
What does that mean?
This is a new typescript 2 feature and so it still lacks documentation, but you can read about it in the
What's new in Typescript 2.0
:
with --lib you can specify a list of built-in API declaration groups
that you can chose to include in your project. For instance, if you
expect your runtime to have support for Map, Set and Promise (e.g.
most evergreen browsers today), just include --lib
es2015.collection,es2015.promise. Similarly you can exclude
declarations you do not want to include in your project, e.g. DOM if
you are working on a node project using --lib es5,es6.
There's also a list of the
API groups
that are supported and a very short example in that link.
–
–
–
–
–
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.