Ver Fonte

[js] Fix `TypedArray.entries()` mistake (#8747)

* Fix TypedArray.entries()

* Use MayEntry instead of TypedArrayEntry

* Use fully qualified name

* Use KeyValue instead of MapEntry (related #8757)
terurou há 6 anos atrás
pai
commit
fa4f902dea

+ 3 - 3
std/js/lib/Float32Array.hx

@@ -92,7 +92,7 @@ extern class Float32Array implements ArrayBufferView implements ArrayAccess<Floa
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Float>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -162,7 +162,7 @@ extern class Float32Array implements ArrayBufferView implements ArrayAccess<Floa
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -249,7 +249,7 @@ extern class Float32Array implements ArrayBufferView implements ArrayAccess<Floa
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Float>;
+	@:pure function values():js.lib.Iterator<Float>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Float64Array.hx

@@ -92,7 +92,7 @@ extern class Float64Array implements ArrayBufferView implements ArrayAccess<Floa
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Float>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -162,7 +162,7 @@ extern class Float64Array implements ArrayBufferView implements ArrayAccess<Floa
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -249,7 +249,7 @@ extern class Float64Array implements ArrayBufferView implements ArrayAccess<Floa
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Float>;
+	@:pure function values():js.lib.Iterator<Float>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Int16Array.hx

@@ -91,7 +91,7 @@ extern class Int16Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -161,7 +161,7 @@ extern class Int16Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -248,7 +248,7 @@ extern class Int16Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Int32Array.hx

@@ -91,7 +91,7 @@ extern class Int32Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -161,7 +161,7 @@ extern class Int32Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -248,7 +248,7 @@ extern class Int32Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Int8Array.hx

@@ -90,7 +90,7 @@ extern class Int8Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -160,7 +160,7 @@ extern class Int8Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -247,7 +247,7 @@ extern class Int8Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Uint16Array.hx

@@ -91,7 +91,7 @@ extern class Uint16Array implements ArrayBufferView implements ArrayAccess<Int>
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -161,7 +161,7 @@ extern class Uint16Array implements ArrayBufferView implements ArrayAccess<Int>
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -248,7 +248,7 @@ extern class Uint16Array implements ArrayBufferView implements ArrayAccess<Int>
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Uint32Array.hx

@@ -91,7 +91,7 @@ extern class Uint32Array implements ArrayBufferView implements ArrayAccess<Int>
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -161,7 +161,7 @@ extern class Uint32Array implements ArrayBufferView implements ArrayAccess<Int>
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -248,7 +248,7 @@ extern class Uint32Array implements ArrayBufferView implements ArrayAccess<Int>
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Uint8Array.hx

@@ -90,7 +90,7 @@ extern class Uint8Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -160,7 +160,7 @@ extern class Uint8Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -247,7 +247,7 @@ extern class Uint8Array implements ArrayBufferView implements ArrayAccess<Int> {
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.

+ 3 - 3
std/js/lib/Uint8ClampedArray.hx

@@ -92,7 +92,7 @@ extern class Uint8ClampedArray implements ArrayBufferView implements ArrayAccess
 		Returns a new Array Iterator object that contains the key/value pairs for each index in the array.
 		See also [Array.prototype.entries()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries).
 	 */
-	@:pure function entries():Iterator<Int>;
+	@:pure function entries():js.lib.Iterator<KeyValue<Int, Int>>;
 
 	/**
 		Tests whether all elements in the array pass the test provided by a function.
@@ -162,7 +162,7 @@ extern class Uint8ClampedArray implements ArrayBufferView implements ArrayAccess
 		Returns a new Array Iterator that contains the keys for each index in the array.
 		See also [Array.prototype.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys).
 	 */
-	@:pure function keys():Iterator<Int>;
+	@:pure function keys():js.lib.Iterator<Int>;
 
 	/**
 		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
@@ -249,7 +249,7 @@ extern class Uint8ClampedArray implements ArrayBufferView implements ArrayAccess
 		Returns a new Array Iterator object that contains the values for each index in the array.
 		See also [Array.prototype.values()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/values).
 	 */
-	@:pure function values():Iterator<Int>;
+	@:pure function values():js.lib.Iterator<Int>;
 
 	/**
 		Returns a string representing the array and its elements.