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
(Compiled with target=ES6, module=commonjs, noEmitHelpers=true).
The BluebirdPromise import has been elided in the generated code, resulting in "ReferenceError: BluebirdPromise is not defined" at runtime.
The elision occurs because BluebirdPromise only appears in a type position which up until v1.7 meant that the compiler could safely elide it. But the compiler now emits this type annotation into the JavaScript output so that elision assumption is no longer safe.
IMO the problem here is not the elision logic, its the fact that the compiler now emits code that depends on type annotaitons, so the type system no longer enjoys the quality of being fully erasable, which I understood to be a core design principle of the language. I thought the idea of using type annotations to change runtime behaviour would have been smacked down by @ahejlsberg and the team before it got into production.
Regardless of that contended side-topic, I believe this is a bug.
The text was updated successfully, but these errors were encountered:
(Compiled with
target=ES6, module=commonjs, noEmitHelpers=true
).The
BluebirdPromise
import has been elided in the generated code, resulting in"ReferenceError: BluebirdPromise is not defined"
at runtime.The elision occurs because
BluebirdPromise
only appears in a type position which up until v1.7 meant that the compiler could safely elide it. But the compiler now emits this type annotation into the JavaScript output so that elision assumption is no longer safe.IMO the problem here is not the elision logic, its the fact that the compiler now emits code that depends on type annotaitons, so the type system no longer enjoys the quality of being fully erasable, which I understood to be a core design principle of the language. I thought the idea of using type annotations to change runtime behaviour would have been smacked down by @ahejlsberg and the team before it got into production.
Regardless of that contended side-topic, I believe this is a bug.
The text was updated successfully, but these errors were encountered: