You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are targeting es5 in our project and have included the following libs: es5, es2015.collection, es2015.promise, dom, scripthost
What I do not understand is how I am supposed to know if Promises (defined in es2015.promise) must be polyfilled, but that ReadonlySet (defined in es2015.collection) is transpiled to proper es5. This will only become clear during runtime and that is exactly what we're trying to avoid when using TypeScript.
My suggestion / question is if it is possible to make it clear when adding libs when it is required to polyfill them and when it is not.
The text was updated successfully, but these errors were encountered:
Syntax is always "polyfilled". For example, TS will emit the extends helper if you use class inheritance.
Functions and values are never polyfilled. We will not provide an implementation for Promise or ReadonlySet or any other top-level value or property thereof.
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow.
Search Terms
polyfill, transpile
Suggestion
We are targeting es5 in our project and have included the following libs:
es5, es2015.collection, es2015.promise, dom, scripthost
What I do not understand is how I am supposed to know if
Promises
(defined in es2015.promise) must be polyfilled, but thatReadonlySet
(defined in es2015.collection) is transpiled to proper es5. This will only become clear during runtime and that is exactly what we're trying to avoid when using TypeScript.My suggestion / question is if it is possible to make it clear when adding libs when it is required to polyfill them and when it is not.
The text was updated successfully, but these errors were encountered: