haxe-js-kit
haxe-js-kit copied to clipboard
Using with angular.haxe
Hey guys,
I'm trying to use haxe-js-kit with @frabbit's angular.haxe (https://github.com/frabbit/angular.haxe), but if I add both as -lib to the build.hxml, I get the following errors:
/usr/lib/haxe/std/js/html/MediaElement.hx:79: characters 1-64 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeys.hx:34: characters 1-122 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:34: characters 1-42 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:36: characters 1-131 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:37: characters 1-53 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:38: characters 1-99 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:39: characters 1-34 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:40: characters 1-35 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:41: characters 1-58 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFaceSet.hx:33: characters 1-41 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFaceSet.hx:45: characters 1-81 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFace.hx:38: characters 1-46 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFace.hx:43: characters 1-37 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/Navigator.hx:60: characters 1-149 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaElement.hx:79: characters 1-64 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeys.hx:34: characters 1-122 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:34: characters 1-42 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:36: characters 1-131 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:37: characters 1-53 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:38: characters 1-99 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:39: characters 1-34 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:40: characters 1-35 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/MediaKeySession.hx:41: characters 1-58 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFaceSet.hx:33: characters 1-41 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFaceSet.hx:45: characters 1-81 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFace.hx:38: characters 1-46 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/FontFace.hx:43: characters 1-37 : Type name js.Promise is redefined from module js.JQuery
/usr/lib/haxe/std/js/html/Navigator.hx:60: characters 1-149 : Type name js.Promise is redefined from module js.JQuery
I have no idea what might be causing this. Any hints?
Thanks!
We need to remove promise/Promise from js/JQuery.hx because of haxe std changes:
https://github.com/HaxeFoundation/haxe/blob/development/std/js/JQuery.hx
https://github.com/HaxeFoundation/haxe/blob/development/std/js/Promise.hx
Can you please make a PR ?
Might work, now ?
It doesn't seem to... Invalid number of arguments for type parameters for js.Promise => JQuery.hx l.177
By commenting it, it works though.
@clemos On a related note/question, do you have any ETA on when haxe-js-kit will be using the official nodejs externs from the Haxe Foundation?
It does, actually: no more js.node
I should probably dump some other stuff such as JQuery