Using latest JavaScript features in TypeScript, such as ES2018 : <p>I have tried searching through TypeScripts documentation on their configurtion and can't seem to find the answer to what should be a simple question.</p>

<p>Simply, how does one configure the typescript compiler so that it knows what JavaScript feature sets we are using?</p>

<p>So for example, ES2019 lands and i think 'Ohh want to get me some of that'. In that situation what do i need to upgrade, to allow the compiler to transpile and pollyfill what it needs to? </p>

<p>The lib option in the tsconfig confuses me and the docs don't explain much about the available libraries. I can't find anything on them directly either.</p>

<p>So lets say ES2019 comes out and i add the lib option for it (Assuming there will be one). Does that mean i can now use ES2019 features? If i wish to support everything from ES2019 down do i need to add the libs for every other version below it? Or does adding the ES2019 lib provide all i need? </p>

<p>Where do those libraries come from? Are they part of the core TypeScript libarary and so to get more i have to upgrade, or can i simply upgrade a seperate package and it will all work?</p>

<p>Finally do those lib provide every needed to fully support that version of the spec. Or is it a subset of features?</p>

<p>In our project we currently use TypeScript Version 2.5.3</p>

<p>I realize thats a whole lot of questions so any information on anything, or links to documentation, would be greatly appreciated.</p>
