Explorar o código

prevent warnings with haxe4-rc2+

ncannasse %!s(int64=6) %!d(string=hai) anos
pai
achega
2899a798a6
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      hxd/impl/TypedArray.hx

+ 9 - 0
hxd/impl/TypedArray.hx

@@ -2,12 +2,21 @@ package hxd.impl;
 
 #if js
 
+#if haxe4
+typedef Float32Array = js.lib.Float32Array;
+typedef Uint16Array = js.lib.Uint16Array;
+typedef Uint8Array = js.lib.Uint8Array;
+typedef ArrayBuffer = js.lib.ArrayBuffer;
+typedef Uint32Array = js.lib.Uint32Array;
+typedef ArrayBufferView = js.lib.ArrayBufferView;
+#else
 typedef Float32Array = js.html.Float32Array;
 typedef Uint16Array = js.html.Uint16Array;
 typedef Uint8Array = js.html.Uint8Array;
 typedef ArrayBuffer = js.html.ArrayBuffer;
 typedef Uint32Array = js.html.Uint32Array;
 typedef ArrayBufferView = js.html.ArrayBufferView;
+#end
 
 #else
 typedef Float32Array = haxe.ds.Vector<Float32>;