Closed Gama11 closed 4 years ago
Also, regarding the package name - maybe it should be actions
instead of atactions
? I guess the former looks nicer, but has the potential to conflict with other NPM packages? :/
I agree it's probably better to not replace '@' with at in this case, I will make a note
Right now the haxe version is under heavily development doesn't yet generate any fields, I'm getting close but check back in a couple weeks (I'll make an announcement on slack when it's ready to try)
(core.d.ts will generate a Core class with static methods)
This lib now works :)
Mapping of default lib types to the haxe standard library isn't done yet so it generates js.lib.Promise, but other than that it should be good
(dts2hx as a whole still has a long way to go tho!)
Works beautifully! https://github.com/HaxeFlixel/setup-flixel/commit/8b2a5c024d1946a671cf067f642037189b0cc315
Not sure what @valueModeOnly
means though?
Yey, thanks for the feedback @Gama11
@valueModuleOnly
just means that this class doesn't have a class representation in js. Instead it's something like
namespace Core {
const field: T;
}
It won't be needed when module-level fields arrive. Maybe adding a doc comment would be better but I figured a meta might be useful to someone
Another one is @jsInaccessible
, which means there's no path to this symbol in JavaScript
Finally got around to trying this. :)
I followed the getting started steps from the readme and ran
npx dts2hx @actions/core
, which creates the following:I noticed the following issues:
InputOptions
was generated without any fields, even though it should have oneextern interface
, this should be atypedef
in Haxe, right (since TS interfaces are not comparable to Haxe interfaces)?core.d.ts
also has a bunch of global / root-level functions, which seeem to be ignored entirely. I'm guessing dts2hx is missing support for generating a class automatically for these cases (I would've expected aCore
class with static functions to be created). Or are you just waiting for module level function support in Haxe?