genes
genes copied to clipboard
Interfaces are exported in a strange way?
IModule2D.hx
package dropecho.noise;
import dropecho.utils.FastMath;
interface IModule2D {
public function value(x:F32, y:F32):F32;
}
IModule2d.d.ts
import {F32} from "../utils/FastMath"
export declare interface IModule2D {
value(x: F32, y: F32): F32
}
IModule2d.js
import {Register} from "../../genes/Register.js"
const $global = Register.$global
export const IModule2D = function() {};
IModule2D.__isInterface__ = true;
index.js
export {IModule2D} from "./dropecho/noise/IModule2D.js"
This causes the export to think it's exporting a type (though this is fine in JS since it ignores those anyway).
Outside of Haxe the exported value is mostly useless and the properties it has might change with Haxe versions.
I guess I could adjust it to:
export namespace IModule2D {
export const __isInterface__ = true
}
export interface IModule2D {
value(x: F32, y: F32): F32
}
Would that be closer to what you'd expect?