Fork me on GitHub

Home Forums JSweet Discussion TypeScript Generates, but JS Does Not

This topic contains 2 replies, has 2 voices, and was last updated by Avatar Louis Grignon 1 year, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #3366

    I have the following JSweet versions:

    compile group: ‘org.jsweet’, name: ‘jsweet-core’, version:’5-SNAPSHOT’
    compile group: ‘org.jsweet’, name: ‘jsweet-transpiler’, version:’2.0.0-rc1′

    I’m using the gradle plugin to successfully generate TypeScript with the tsonly option set to true. The build succeeds. I do see a few build messages such as:

    • local variable name ‘var’ is not allowed and is automatically generated to ‘__var’ at …
    • synchronization is ignored in JSweet

    However, when I set the tsonly option to false, I receive messages such as:

    • declaration or statement expected at
      ‘;’ expected at bundle.ts(83599)
    • ‘,’ expected at

    I looked at the standard out/error of the build to see the following JSweet options that the gradle plugin apparently sets up (I’ve changed the names some of the paths of the output to hide proprietary information)

    [–target, ES6, –moduleResolution, classic, –experimentalDecorators, –emitDecoratorMetadata, –rootDir, /Users/me/myproject/target/.ts, –outDir, /Users/me/myproject/build/javascript, .tsc-rootfile.ts, bundle.ts]

    Any idea what might be happening? Is there anything I should change in the options?


    I set the debug flag for my gradle build and received a bit more info, namely typescript errors.

    8:09:05.699 [INFO] [org.jsweet.transpiler.JSweetTranspiler] Blah.ts(91,9): error TS1128: Declaration or statement expected.
    18:09:05.699 [ERROR] [output] declaration or statement expected at /Users/me/myproject/
    18:09:05.699 [INFO] [org.jsweet.transpiler.JSweetTranspiler] Blah.ts(91,33): error TS1005: ‘,’ expected.

    Louis Grignon

    Could you try with the latest transpiler version please. It includes a lot of fixes (2.2.0-SNAPSHOT)
    If problem persists, please file an issue on the JSweet GitHub with the link to your project


Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘JSweet Discussion’ is closed to new topics and replies.