COMMUNITY

Int should be js.lib.Uint8Array?

have confusing about

js target:

var arr:Array<js.lib.Uint8Array>=[1,2,3,4];

will got this error: Int should be js.lib.Uint8Array;//haxe 4.1.4

is this a bug ?

There’s nothing confusing there. You declare a variable for Array<Uint8Array> and initialize it with Array<Int>.

If you’re looking to create a UInt8Array then what you want is var arr = js.lib.Uint8Array.of(1, 2, 3, 4);