浏览代码

prevent warnings with haxe4-rc2+

ncannasse 6 年之前
父节点
当前提交
2899a798a6
共有 1 个文件被更改,包括 9 次插入0 次删除
  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>;