Types implement of some Types
An implementation of some types from haxe. This may be necessary for exchanges
between JavaScript and Haxe without type loss.
Warning, all or part of the types presented here can be a partial implementation
of the implemented type because I only implemented the bare minimum I needed.
Note
If you are looking for how to use it, you can look at some examples in the unit tests.
Types.List extends Array implement of haxe.ds.List
/* no custom constructor, variables or methods. */
Types.Bytes extends Uint8Array implement of haxe.io.Bytes
/* no custom constructor or variables. */
// returns the Bytes representation of the given String
static ofString(s: String): Bytes
// returns the `length`-bytes long string stored at the given position `start`.
public getString(start: Int, length: Int): String
// returns a `String` representation of the bytes
public toString(): String
Types.IntMap extends Object implement of haxe.ds.IntMap
/* no custom variables or methods. */
new Types.IntMap(obj: Object)
Types.StringMap extends Object implement of haxe.ds.StringMap
/* no custom variables or methods. */
new Types.StringMap(obj: Object);
Types.Enum extends Array implement of Enum (Experimental)
/* no custom constructor or variables. */
// adds the enumeration to the default resolver : `global.__enum__` in node and
// `window.__enum__` in the browser.
static resolve(): void
// return the enum name
public toString(): String
Types.Class implement of Class (Experimental)
/* no custom constructor or variables. */
// adds the class to the default resolver : `global.__class__` in node and
// `window.__class__` in the browser.
static resolve(): void