Typescript would complain about certain errors in the generated file. In
some newer versions of TypeScript, an assert that is always true would
not be permitted.
We currently have two such asserts in our tests, which prevents us from
upgrading the TypeScript version.
Add support for a Java @TsNoCheck annotation, which controls the
inclusion of the corresponding TypeScript comment. While there is no
mandatory package for the annotation, add it to jsweet.lang in core-lib.
Fix tests to use the new annotation.
Brings dynamic invoke capability to def.js.Object.
It allows to dynamically call a method on an object for instance if
definition is missing or simply if it is not possible to do it
otherwise.
By default, JSweet generates arrow functions for Java lambda (the 'this'
semantics is closer to Java). Wrapping a function in $noarrow will force
JSweet to produce a plain old JavaScript function rather than an arrow
function.
@Ambient annotation was used to inline declarations. However they suffer
from the Java packages structure, which is less flexible than namespaces
in TypeScript. Since @Ambient are always defined in the package they
appear, they are not convenient when working out of the root package.
Plus, now that def.* packages are working well in version 2, the
@Ambient annotation is redundant with using def.* packages. So, it was
decided that all ambient declarations should be defined in def.*
packages, thus forcing the developers to cleanly separate the actual
implementation from the bridges to external libraries. We believe it is
good practice to do so in Java in order to have a better-structured
program.
- support for decorators (fixed#43)
- added support for core JS features (function-scope this ($this),
function-scope arguments, ...
- added/modified macros ($insert, $loose/$strict, ...)
- modified es5 and es6 API to simplify the use of JavaScript strings and
arrays