benmerckx / genes

Generates split ES6 modules and Typescript definitions from Haxe modules.
43 stars 8 forks source link

ModuleEmitter: fix cast(myVar, MyInterface) #64

Closed joshtynjala closed 2 years ago

joshtynjala commented 2 years ago

Boot expects interfaces to be typeof === 'function' and have an __isInterface__ field === true

benmerckx commented 2 years ago

Do you mind adding a test here? https://github.com/benmerckx/genes/blob/master/tests/TestBoot.hx

joshtynjala commented 2 years ago

Sure, I'll add it when I have a free moment.

joshtynjala commented 2 years ago

@benmerckx I'm trying to run the tests locally, but I'm getting compile-time errors.

haxe test.hxml

tests/TestImportModule.hx:26: characters 8-19 : js.lib.Promise has no field ofJsPromise

benmerckx commented 2 years ago

@joshtynjala that I would guess to be a version mismatch in tink_core. Not sure if you're using lix? In any case I've added a test so this can be closed. Thanks!

joshtynjala commented 2 years ago

Oh, okay. A library version mismatch makes sense. I try to avoid lix because I didn't like how it took over my Haxe installation and left behind various broken things after I removed it.