cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 159 forks source link

Add support @TsNoCheck annotation, adds "// @ts-nocheck" to TypeScript #762

Closed kohlschuetter closed 8 months ago

kohlschuetter commented 9 months ago

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.

lgrignon commented 8 months ago

Thanks for contributing @kohlschuetter

kohlschuetter commented 8 months ago

Merging broke the build because the core pom version wasn't updated.

See https://github.com/cincheo/jsweet/pull/769, which unbreaks the build.