Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Common Issues with dts2as

Josh Tynjala edited this page May 21, 2016 · 5 revisions

Error: Could not create SWC file. The generated ActionScript contains compile-time errors.

This error usually indicates that dts2as has encountered some TypeScript syntax that it does not recognize. Please report a bug on Github. Be sure to include a link to download the d.ts file that you passed to dts2as, along with the command line arguments that you specified.

As a workaround, you may be able to modify the generated ActionScript and compile it manually. You can use the --outDir command line argument to save the generated ActionScript to the file system. Please be aware that the generated ActionScript may contain a number of warnings related to the undefined keyword. These may be safely ignored. It's the errors that you should focus on trying to fix. Add the --warnings=false compiler argument to omit them from the output.

Alternatively, if you are familiar with TypeScript, you may try modifying the d.ts file to use slightly different syntax. TypeScript is very flexible, and there is often more than one way to implement the same API for a JavaScript library.

Clone this wiki locally