haxe-js-kit icon indicating copy to clipboard operation
haxe-js-kit copied to clipboard

Using with angular.haxe

Open fullofcaffeine opened this issue 10 years ago • 5 comments

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!

fullofcaffeine avatar Aug 23 '15 03:08 fullofcaffeine

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 ?

clemos avatar Aug 24 '15 08:08 clemos

Might work, now ?

clemos avatar Oct 26 '15 09:10 clemos

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.

JJayet avatar Jan 28 '16 16:01 JJayet

@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?

fullofcaffeine avatar Mar 01 '16 22:03 fullofcaffeine

It does, actually: no more js.node I should probably dump some other stuff such as JQuery

clemos avatar Mar 02 '16 07:03 clemos