BowlerHatLLC / dts2as

Convert TypeScript definitions (d.ts files) into ActionScript classes and interfaces for use as external libraries with Apache FlexJS
https://www.npmjs.com/package/dts2as
Apache License 2.0
39 stars 4 forks source link

PIXI SWC issue #17

Closed alamboley closed 8 years ago

alamboley commented 8 years ago

Hi Josh, when I try to compile this example http://nextgenactionscript.com/tutorials/dts2as-typescript-definitions-with-actionscript/ I got an error. In result I've just one line in the js-release/Main.js: //# sourceMappingURL=./Main.js.map.

Here is the compilation logs (same issue on OS X and Windows):

Aymerics-iMac:PixiAS3 Aymeric$ /Users/Aymeric/Documents/Workspace/SDKs/flex_js/js/bin/asjsc --external-library-path+=lib/pixijs.swc src/Main.as 
Using Falcon codebase: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/js/bin/../..
Using Flex SDK: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/js/bin/../..
Picked up _JAVA_OPTIONS: -Xms1024m -Xmx4096m -XX:MaxPermSize=1024
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024; support was removed in 8.0
Compiling file: /Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/Main.js
using extern: /Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/externs/svg.js
using extern: /Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/externs/pixijs.js
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/js/libs/js.swc
using SWC: /Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/lib/pixijs.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Binding.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Charts.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Collections.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Core.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/CreateJS.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/DragDrop.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Effects.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Flat.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Formatters.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/GoogleMaps.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Graphics.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/HTML.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/HTML5.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/JQuery.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Mobile.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Network.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Reflection.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/Storage.swc
using SWC: /Users/Aymeric/Documents/Workspace/SDKs/flex_js/frameworks/libs/player/21.0/playerglobal.swc
Dependencies calculated for '/Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/Main.js'
Dependencies calculated for '/Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/org/apache/flex/utils/Language.js'
mai 26, 2016 9:25:14 AM com.google.javascript.jscomp.LoggerErrorManager println
GRAVE: /Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/externs/pixijs.js:3613: ERROR - Parse error. Duplicate parameter name "crossorigin"
PIXI.extras.TilingSprite.fromImage = function(imageId, crossorigin, scaleMode, crossorigin, scaleMode) {};
                                             ^

mai 26, 2016 9:25:14 AM com.google.javascript.jscomp.LoggerErrorManager println
GRAVE: /Users/Aymeric/Documents/Workspace/HTML5/PixiAS3/bin/js-debug/externs/pixijs.js:3613: ERROR - Parse error. Duplicate parameter name "scaleMode"
PIXI.extras.TilingSprite.fromImage = function(imageId, crossorigin, scaleMode, crossorigin, scaleMode) {};
                                             ^

mai 26, 2016 9:25:14 AM com.google.javascript.jscomp.LoggerErrorManager printSummary
AVERTISSEMENT: 2 error(s), 0 warning(s)
The project 'Main' has been successfully compiled and optimized.
``
joshtynjala commented 8 years ago

The TypeScript definitions must have added more overloads of TilingSprite.fromImage() since the last time I tried. It looks like I need to modify parameter names when I merge signatures for ActionScript to avoid duplicates. Thanks for letting me know!

joshtynjala commented 8 years ago

Thanks again! It will be fixed in the next update.

alamboley commented 8 years ago

👍