Ver código fonte

[js] improve TypedArray

terurou 6 anos atrás
pai
commit
143b9bdf0f

+ 218 - 30
std/js/lib/Float32Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Float32Array` typed array represents an array of 32-bit floating point numbers
 	(corresponding to the C float data type) in the platform byte order. If control over byte order is
@@ -32,45 +34,231 @@ package js.lib;
 **/
 @:native("Float32Array")
 extern class Float32Array implements ArrayAccess<Float> {
-	static inline var BYTES_PER_ELEMENT : Int = 4;
+	/**
+		Returns a number value of the element size. 4 in the case of an `Float32Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Float32Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Float) -> Int, ?thisArg : Any ) : Float32Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Float, index : Int) -> Int, ?thisArg : Any ) : Float32Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Float32Array;
-	@:pure
-	static function from( source : Array<Float>, ?mapFn : Float -> Float -> Float, ?thisArg : Dynamic ) : Float32Array;
+	/**
+		Creates a new `Float32Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Float32Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Float32Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Float32Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Float32Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Float32Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Float32Array ) : Void {} )
-	@:overload( function( array : Array<Float> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Float32Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Float>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Float32Array;
-	function every( callback : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Float) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Float, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Float, index : Int, array : Float32Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Float, ?start : Int, ?end : Int ) : Float32Array;
-	function filter( callbackfn : Float -> Int -> Float32Array -> Dynamic, ?thisArg : Dynamic ) : Float32Array;
-	function find( predicate : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Float -> Int -> Float32Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Float, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Float, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Float -> Int -> Float32Array -> Float, ?thisArg : Dynamic ) : Float32Array;
-	@:overload( function( callbackfn : Float -> Float -> Int -> Float32Array -> Float ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Float -> Int -> Float32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Float -> Float -> Int -> Float32Array -> Float ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Float -> Int -> Float32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Float32Array {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Float32Array {} )
+	function filter( callback : (element : Float, index : Int, array : Float32Array) -> Bool, ?thisArg : Any ) : Float32Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Float, index : Int, array : Float32Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Float, index : Int, array : Float32Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Float) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Float, index : Int, array : Float32Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Float, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Float, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Float, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Float) -> Float, ?thisArg : Any ) : Float32Array {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Float, ?thisArg : Any ) : Float32Array {} )
+	function map( callback : (element : Float, index : Int, array : Float32Array) -> Float, ?thisArg : Any ) : Float32Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int, array : Float32Array) -> Int ) : Float {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Float, index : Int, array : Float32Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int, array : Float32Array) -> Int ) : Float {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Float, index : Int, array : Float32Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Float32Array;
-	function slice( ?start : Int, ?end : Int ) : Float32Array;
-	function some( callbackfn : Float -> Int -> Float32Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Float -> Float -> Int ) : Float32Array;
-	function subarray( begin : Int, ?end : Int ) : Float32Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Float32Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Float, index : Int, array : Float32Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Float, y : Float) -> Int ) : Float32Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Float32Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Float64Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Float64Array` typed array represents an array of 64-bit floating point numbers
 	(corresponding to the C double data type) in the platform byte order. If control over byte order
@@ -32,45 +34,231 @@ package js.lib;
 **/
 @:native("Float64Array")
 extern class Float64Array implements ArrayAccess<Float> {
-	static inline var BYTES_PER_ELEMENT : Int = 8;
+	/**
+		Returns a number value of the element size. 8 in the case of an `Float64Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Float64Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Float) -> Int, ?thisArg : Any ) : Float64Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Float, index : Int) -> Int, ?thisArg : Any ) : Float64Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Float64Array;
-	@:pure
-	static function from( source : Array<Float>, ?mapFn : Float -> Float -> Float, ?thisArg : Dynamic ) : Float64Array;
+	/**
+		Creates a new `Float64Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Float64Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Float64Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Float64Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Float64Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Float64Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Float64Array ) : Void {} )
-	@:overload( function( array : Array<Float> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Float64Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Float>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Float64Array;
-	function every( callback : Float -> Int -> Float64Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Float) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Float, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Float, index : Int, array : Float64Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Float, ?start : Int, ?end : Int ) : Float64Array;
-	function filter( callbackfn : Float -> Int -> Float64Array -> Dynamic, ?thisArg : Dynamic ) : Float64Array;
-	function find( predicate : Float -> Int -> Float64Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Float -> Int -> Float64Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Float -> Int -> Float64Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Float, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Float, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Float -> Int -> Float64Array -> Float, ?thisArg : Dynamic ) : Float64Array;
-	@:overload( function( callbackfn : Float -> Float -> Int -> Float64Array -> Float ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Float -> Int -> Float64Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Float -> Float -> Int -> Float64Array -> Float ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Float -> Int -> Float64Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Float64Array {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Float64Array {} )
+	function filter( callback : (element : Float, index : Int, array : Float64Array) -> Bool, ?thisArg : Any ) : Float64Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Float, index : Int, array : Float64Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Float, index : Int, array : Float64Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Float) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Float, index : Int, array : Float64Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Float, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Float, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Float, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Float) -> Float, ?thisArg : Any ) : Float64Array {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Float, ?thisArg : Any ) : Float64Array {} )
+	function map( callback : (element : Float, index : Int, array : Float64Array) -> Float, ?thisArg : Any ) : Float64Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int, array : Float64Array) -> Int ) : Float {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Float, index : Int, array : Float64Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Float, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int) -> Int ) : Float {} )
+	@:overload( function ( callbackfn : (previousValue : Float, currentValue : Float, index : Int, array : Float64Array) -> Int ) : Float {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Float, index : Int, array : Float64Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Float64Array;
-	function slice( ?start : Int, ?end : Int ) : Float64Array;
-	function some( callbackfn : Float -> Int -> Float64Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Float -> Float -> Int ) : Float64Array;
-	function subarray( begin : Int, ?end : Int ) : Float64Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Float64Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Float) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Float, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Float, index : Int, array : Float64Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Float, y : Float) -> Int ) : Float64Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Float64Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Int16Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Int16Array` typed array represents an array of twos-complement 16-bit signed integers in
 	the platform byte order. If control over byte order is needed, use `DataView` instead. The
@@ -31,45 +33,231 @@ package js.lib;
 **/
 @:native("Int16Array")
 extern class Int16Array implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 2;
+	/**
+		Returns a number value of the element size. 2 in the case of an `Int16Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+	
+	/**
+		Creates a new `Int16Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Int16Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Int16Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Int16Array;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Int16Array;
+	/**
+		Creates a new `Int16Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Int16Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Int16Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Int16Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Int16Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Int16Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Int16Array ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Int16Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Int16Array;
-	function every( callback : Int -> Int -> Int16Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Int, index : Int, array : Int16Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Int16Array;
-	function filter( callbackfn : Int -> Int -> Int16Array -> Dynamic, ?thisArg : Dynamic ) : Int16Array;
-	function find( predicate : Int -> Int -> Int16Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Int16Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Int16Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Int16Array -> Int, ?thisArg : Dynamic ) : Int16Array;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Int16Array -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Int16Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Int16Array -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Int16Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int16Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int16Array {} )
+	function filter( callback : (element : Int, index : Int, array : Int16Array) -> Bool, ?thisArg : Any ) : Int16Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Int, index : Int, array : Int16Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Int, index : Int, array : Int16Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Int, index : Int, array : Int16Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Int16Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Int16Array {} )
+	function map( callback : (element : Int, index : Int, array : Int16Array) -> Int, ?thisArg : Any ) : Int16Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Int16Array) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Int16Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Int16Array) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Int16Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Int16Array;
-	function slice( ?start : Int, ?end : Int ) : Int16Array;
-	function some( callbackfn : Int -> Int -> Int16Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Int16Array;
-	function subarray( begin : Int, ?end : Int ) : Int16Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Int16Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Int, index : Int, array : Int16Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Int16Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Int16Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Int32Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Int32Array` typed array represents an array of twos-complement 32-bit signed integers in
 	the platform byte order. If control over byte order is needed, use `DataView` instead. The
@@ -31,45 +33,231 @@ package js.lib;
 **/
 @:native("Int32Array")
 extern class Int32Array implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 4;
+	/**
+		Returns a number value of the element size. 4 in the case of an `Int32Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+	
+	/**
+		Creates a new `Int32Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Int32Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Int32Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Int32Array;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Int32Array;
+	/**
+		Creates a new `Int32Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Int32Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Int32Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Int32Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Int32Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Int32Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Int32Array ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Int32Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Int32Array;
-	function every( callback : Int -> Int -> Int32Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Int, index : Int, array : Int32Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Int32Array;
-	function filter( callbackfn : Int -> Int -> Int32Array -> Dynamic, ?thisArg : Dynamic ) : Int32Array;
-	function find( predicate : Int -> Int -> Int32Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Int32Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Int32Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Int32Array -> Int, ?thisArg : Dynamic ) : Int32Array;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Int32Array -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Int32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Int32Array -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Int32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int32Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int32Array {} )
+	function filter( callback : (element : Int, index : Int, array : Int32Array) -> Bool, ?thisArg : Any ) : Int32Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Int, index : Int, array : Int32Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Int, index : Int, array : Int32Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Int, index : Int, array : Int32Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Int32Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Int32Array {} )
+	function map( callback : (element : Int, index : Int, array : Int32Array) -> Int, ?thisArg : Any ) : Int32Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Int32Array) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Int32Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Int32Array) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Int32Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Int32Array;
-	function slice( ?start : Int, ?end : Int ) : Int32Array;
-	function some( callbackfn : Int -> Int -> Int32Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Int32Array;
-	function subarray( begin : Int, ?end : Int ) : Int32Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Int32Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Int, index : Int, array : Int32Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Int32Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Int32Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Int8Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Int8Array` typed array represents an array of twos-complement 8-bit signed integers. The
 	contents are initialized to 0. Once established, you can reference elements in the array using
@@ -30,45 +32,231 @@ package js.lib;
 **/
 @:native("Int8Array")
 extern class Int8Array implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 1;
+	/**
+		Returns a number value of the element size. 1 in the case of an `Int8Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Int8Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Int8Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Int8Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Int8Array;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Int8Array;
+	/**
+		Creates a new `Int8Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Int8Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Int8Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Int8Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Int8Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Int8Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Int8Array ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Int8Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Int8Array;
-	function every( callback : Int -> Int -> Int8Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Int, index : Int, array : Int8Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Int8Array;
-	function filter( callbackfn : Int -> Int -> Int8Array -> Dynamic, ?thisArg : Dynamic ) : Int8Array;
-	function find( predicate : Int -> Int -> Int8Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Int8Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Int8Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Int8Array -> Int, ?thisArg : Dynamic ) : Int8Array;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Int8Array -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Int8Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Int8Array -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Int8Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int8Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int8Array {} )
+	function filter( callback : (element : Int, index : Int, array : Int8Array) -> Bool, ?thisArg : Any ) : Int8Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Int, index : Int, array : Int8Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Int, index : Int, array : Int8Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Int, index : Int, array : Int8Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Int8Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Int8Array {} )
+	function map( callback : (element : Int, index : Int, array : Int8Array) -> Int, ?thisArg : Any ) : Int8Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Int8Array) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Int8Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Int8Array) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Int8Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Int8Array;
-	function slice( ?start : Int, ?end : Int ) : Int8Array;
-	function some( callbackfn : Int -> Int -> Int8Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Int8Array;
-	function subarray( begin : Int, ?end : Int ) : Int8Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Int8Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Int, index : Int, array : Int8Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Int8Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Int8Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Uint16Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Uint16Array` typed array represents an array of 16-bit unsigned integers in the platform
 	byte order. If control over byte order is needed, use `DataView` instead. The contents are
@@ -31,45 +33,231 @@ package js.lib;
 **/
 @:native("Uint16Array")
 extern class Uint16Array implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 2;
+	/**
+		Returns a number value of the element size. 2 in the case of an `Uint16Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Uint16Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Uint16Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Uint16Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Uint16Array;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Uint16Array;
+	/**
+		Creates a new `Uint16Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Uint16Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Uint16Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Uint16Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Uint16Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Uint16Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Uint16Array ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Uint16Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Uint16Array;
-	function every( callback : Int -> Int -> Uint16Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Int, index : Int, array : Uint16Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Uint16Array;
-	function filter( callbackfn : Int -> Int -> Uint16Array -> Dynamic, ?thisArg : Dynamic ) : Uint16Array;
-	function find( predicate : Int -> Int -> Uint16Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Uint16Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Uint16Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Uint16Array -> Int, ?thisArg : Dynamic ) : Uint16Array;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint16Array -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Uint16Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint16Array -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Uint16Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Uint16Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Uint16Array {} )
+	function filter( callback : (element : Int, index : Int, array : Uint16Array) -> Bool, ?thisArg : Any ) : Uint16Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Int, index : Int, array : Uint16Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Int, index : Int, array : Uint16Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Int, index : Int, array : Uint16Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Uint16Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Uint16Array {} )
+	function map( callback : (element : Int, index : Int, array : Uint16Array) -> Int, ?thisArg : Any ) : Uint16Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint16Array) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint16Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint16Array) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint16Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Uint16Array;
-	function slice( ?start : Int, ?end : Int ) : Uint16Array;
-	function some( callbackfn : Int -> Int -> Uint16Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Uint16Array;
-	function subarray( begin : Int, ?end : Int ) : Uint16Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Uint16Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Int, index : Int, array : Uint16Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Uint16Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Uint16Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Uint32Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Uint32Array` typed array represents an array of 32-bit unsigned integers in the platform
 	byte order. If control over byte order is needed, use `DataView` instead. The contents are
@@ -31,45 +33,231 @@ package js.lib;
 **/
 @:native("Uint32Array")
 extern class Uint32Array implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 4;
+	/**
+		Returns a number value of the element size. 4 in the case of an `Uint32Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Uint32Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload( function ( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Uint32Array {} )
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Uint32Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Uint32Array;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Uint32Array;
+	/**
+		Creates a new `Uint32Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Uint32Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Uint32Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Uint32Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Uint32Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Uint32Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Uint32Array ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Uint32Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Uint32Array;
-	function every( callback : Int -> Int -> Uint32Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload( function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function every( callback : (currentValue : Int, index : Int, array : Uint32Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Uint32Array;
-	function filter( callbackfn : Int -> Int -> Uint32Array -> Dynamic, ?thisArg : Dynamic ) : Uint32Array;
-	function find( predicate : Int -> Int -> Uint32Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Uint32Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Uint32Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Uint32Array -> Int, ?thisArg : Dynamic ) : Uint32Array;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint32Array -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Uint32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint32Array -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Uint32Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Uint32Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Uint32Array {} )
+	function filter( callback : (element : Int, index : Int, array : Uint32Array) -> Bool, ?thisArg : Any ) : Uint32Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {} )
+	function find( callback : (element : Int, index : Int, array : Uint32Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {} )
+	function findIndex( callback : (element : Int, index : Int, array : Uint32Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload( function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {} )
+	function forEach( callback : (element : Int, index : Int, array : Uint32Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload( function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Uint32Array {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Uint32Array {} )
+	function map( callback : (element : Int, index : Int, array : Uint32Array) -> Int, ?thisArg : Any ) : Uint32Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint32Array) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint32Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload( function ( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint32Array) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint32Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Uint32Array;
-	function slice( ?start : Int, ?end : Int ) : Uint32Array;
-	function some( callbackfn : Int -> Int -> Uint32Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Uint32Array;
-	function subarray( begin : Int, ?end : Int ) : Uint32Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Uint32Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload( function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	@:overload( function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {} )
+	function some( callback : (element : Int, index : Int, array : Uint32Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Uint32Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Uint32Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Uint8Array.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Uint8Array` typed array represents an array of 8-bit unsigned integers. The contents
 	are initialized to 0. Once established, you can reference elements in the array using the object's
@@ -30,45 +32,231 @@ package js.lib;
 **/
 @:native("Uint8Array")
 extern class Uint8Array implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 1;
+	/**
+		Returns a number value of the element size. 1 in the case of an `Uint8Array`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Uint8Array` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload(function( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Uint8Array {})
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Uint8Array;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Uint8Array;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Uint8Array;
+	/**
+		Creates a new `Uint8Array` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Uint8Array;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Uint8Array` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Uint8Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Uint8Array` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Uint8Array`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Uint8Array ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Uint8Array, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Uint8Array;
-	function every( callback : Int -> Int -> Uint8Array -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload(function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	@:overload(function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	function every( callback : (currentValue : Int, index : Int, array : Uint8Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Uint8Array;
-	function filter( callbackfn : Int -> Int -> Uint8Array -> Dynamic, ?thisArg : Dynamic ) : Uint8Array;
-	function find( predicate : Int -> Int -> Uint8Array -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Uint8Array -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Uint8Array -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Uint8Array -> Int, ?thisArg : Dynamic ) : Uint8Array;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint8Array -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Uint8Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint8Array -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Uint8Array -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Uint8Array {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Uint8Array {})
+	function filter( callback : (element : Int, index : Int, array : Uint8Array) -> Bool, ?thisArg : Any ) : Uint8Array;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {})
+	function find( callback : (element : Int, index : Int, array : Uint8Array) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {})
+	function findIndex( callback : (element : Int, index : Int, array : Uint8Array) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload(function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {})
+	function forEach( callback : (element : Int, index : Int, array : Uint8Array) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload(function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Uint8Array {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Uint8Array {})
+	function map( callback : (element : Int, index : Int, array : Uint8Array) -> Int, ?thisArg : Any ) : Uint8Array;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint8Array) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint8Array) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint8Array) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint8Array) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Uint8Array;
-	function slice( ?start : Int, ?end : Int ) : Uint8Array;
-	function some( callbackfn : Int -> Int -> Uint8Array -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Uint8Array;
-	function subarray( begin : Int, ?end : Int ) : Uint8Array;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Uint8Array;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	function some( callback : (element : Int, index : Int, array : Uint8Array) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Uint8Array;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Uint8Array;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }

+ 218 - 30
std/js/lib/Uint8ClampedArray.hx

@@ -21,6 +21,8 @@
  */
 package js.lib;
 
+import js.lib.intl.NumberFormat.NumberFormatOptions;
+
 /**
 	The `Uint8ClampedArray` typed array represents an array of 8-bit unsigned integers clamped
 	to 0-255; if you specified a value that is out of the range of [0,255], 0 or 255 will be set instead;
@@ -32,45 +34,231 @@ package js.lib;
 **/
 @:native("Uint8ClampedArray")
 extern class Uint8ClampedArray implements ArrayAccess<Int> {
-	static inline var BYTES_PER_ELEMENT : Int = 1;
+	/**
+		Returns a number value of the element size. 1 in the case of an `Uint8ClampedArray`.
+	 */
+	static final BYTES_PER_ELEMENT : Int;
+
+	/**
+		Creates a new `Uint8ClampedArray` from an array-like or iterable object. See also [Array.from()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from).
+	 */
+	@:overload(function( source : {}, ?mapFn : (value : Int) -> Int, ?thisArg : Any ) : Uint8ClampedArray {})
+	@:pure static function from( source : {}, ?mapFn : (value : Int, index : Int) -> Int, ?thisArg : Any ) : Uint8ClampedArray;
 	
-	@:pure
-	static function of( items : haxe.extern.Rest<Array<Dynamic>> ) : Uint8ClampedArray;
-	@:pure
-	static function from( source : Array<Int>, ?mapFn : Int -> Int -> Int, ?thisArg : Dynamic ) : Uint8ClampedArray;
+	/**
+		Creates a new `Uint8ClampedArray` with a variable number of arguments. See also [Array.of()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of).
+	 */
+	@:pure static function of( elements : haxe.extern.Rest<Dynamic> ) : Uint8ClampedArray;
 
+	/**
+		Returns a number value of the element size.
+	 */
 	@:native("BYTES_PER_ELEMENT")
 	final BYTES_PER_ELEMENT_ : Int;
-	final length : Int;
+	
+	/**
+		Returns the `ArrayBuffer` referenced by the `Uint8ClampedArray` Fixed at construction time and thus read only.
+	 */
 	final buffer : ArrayBuffer;
-	final byteOffset : Int;
+
+	/**
+		Returns the length (in bytes) of the `Uint8ClampedArray` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
 	final byteLength : Int;
+
+	/**
+		Returns the offset (in bytes) of the `Uint8ClampedArray` from the start of its `ArrayBuffer`. Fixed at construction time and thus read only.
+	 */
+	final byteOffset : Int;
+
+	/**
+		Returns the number of elements hold in the `Uint8ClampedArray`. Fixed at construction time and thus read only.
+	 */
+	final length : Int;
 	
 	/** @throws DOMError */
-	@:overload( function( length : Int ) : Void {} )
-	@:overload( function( array : Uint8ClampedArray ) : Void {} )
-	@:overload( function( array : Array<Int> ) : Void {} )
-	function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
-	@:overload( function( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
-	function set( array : Array<Int>, ?offset : Int ) : Void;
+	@:overload( function ( length : Int ) : Void {} )
+	@:overload( function ( object : {} ) : Void {} )
+	@:pure function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void;
+
+	/**
+		Copies a sequence of array elements within the array.
+		See also [Array.prototype.copyWithin()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin).
+	 */
 	function copyWithin( target : Int, start : Int, ?end : Int ) : Uint8ClampedArray;
-	function every( callback : Int -> Int -> Uint8ClampedArray -> Bool, ?thisArg : Dynamic ) : Bool;
+
+	/**
+		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>;
+
+	/**
+		Tests whether all elements in the array pass the test provided by a function.
+		See also [Array.prototype.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).
+	 */
+	@:overload(function ( callback : (currentValue : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	@:overload(function ( callback : (currentValue : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	function every( callback : (currentValue : Int, index : Int, array : Uint8ClampedArray) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Fills all the elements of an array from a start index to an end index with a static value.
+		See also [Array.prototype.fill()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill).
+	 */
 	function fill( value : Int, ?start : Int, ?end : Int ) : Uint8ClampedArray;
-	function filter( callbackfn : Int -> Int -> Uint8ClampedArray -> Dynamic, ?thisArg : Dynamic ) : Uint8ClampedArray;
-	function find( predicate : Int -> Int -> Uint8ClampedArray -> Bool, ?thisArg : Dynamic ) : Dynamic;
-	function findIndex( predicate : Int -> Int -> Uint8ClampedArray -> Bool, ?thisArg : Dynamic ) : Int;
-	function forEach( callbackfn : Int -> Int -> Uint8ClampedArray -> Void, ?thisArg : Dynamic ) : Void;
-	function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function join( ?separator : String ) : String;
-	function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
-	function map( callbackfn : Int -> Int -> Uint8ClampedArray -> Int, ?thisArg : Dynamic ) : Uint8ClampedArray;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint8ClampedArray -> Int ) : Int {} )
-	function reduce( callbackfn : Dynamic -> Int -> Int -> Uint8ClampedArray -> Dynamic, initialValue : Dynamic ) : Dynamic;
-	@:overload( function( callbackfn : Int -> Int -> Int -> Uint8ClampedArray -> Int ) : Int {} )
-	function reduceRight( callbackfn : Dynamic -> Int -> Int -> Uint8ClampedArray -> Dynamic, initialValue : Dynamic ) : Dynamic;
+
+	/**
+		Creates a new array with all of the elements of this array for which the provided filtering function returns true.
+		See also [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Uint8ClampedArray {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Uint8ClampedArray {})
+	function filter( callback : (element : Int, index : Int, array : Uint8ClampedArray) -> Bool, ?thisArg : Any ) : Uint8ClampedArray;
+
+	/**
+		Returns the found value in the array, if an element in the array satisfies the provided testing function or undefined if not found.
+		See also [Array.prototype.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Null<Int> {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Null<Int> {})
+	function find( callback : (element : Int, index : Int, array : Uint8ClampedArray) -> Bool, ?thisArg : Any ) : Null<Int>;
+
+	/**
+		Returns the found index in the array, if an element in the array satisfies the provided testing function or -1 if not found.
+		See also [Array.prototype.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Int {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Int {})
+	function findIndex( callback : (element : Int, index : Int, array : Uint8ClampedArray) -> Bool, ?thisArg : Any ) : Int;
+
+	/**
+		Calls a function for each element in the array.
+		See also [Array.prototype.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach).
+	 */
+	@:overload(function ( callback : (element : Int) -> Void, ?thisArg : Any ) : Void {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Void, ?thisArg : Any ) : Void {})
+	function forEach( callback : (element : Int, index : Int, array : Uint8ClampedArray) -> Void, ?thisArg : Any ) : Void;
+
+	/**
+		Determines whether a typed array includes a certain element, returning true or false as appropriate.
+		See also [Array.prototype.includes()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes).
+	 */
+	@:pure function includes( searchElement: Int, ?fromIndex: Int ): Bool;
+
+	/**
+		Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.indexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf).
+	 */
+	@:pure function indexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Joins all elements of an array into a string.
+		See also [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join).
+	 */
+	@:pure function join( ?separator : String ) : String;
+
+	/**
+		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>;
+
+	/**
+		Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
+		See also [Array.prototype.lastIndexOf()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf).
+	 */
+	@:pure function lastIndexOf( searchElement : Int, ?fromIndex : Int ) : Int;
+
+	/**
+		Creates a new array with the results of calling a provided function on every element in this array.
+		See also [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
+	 */
+	@:overload(function ( callback : (element : Int) -> Int, ?thisArg : Any ) : Uint8ClampedArray {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Int, ?thisArg : Any ) : Uint8ClampedArray {})
+	function map( callback : (element : Int, index : Int, array : Uint8ClampedArray) -> Int, ?thisArg : Any ) : Uint8ClampedArray;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value.
+		See also [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).
+	 */
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint8ClampedArray) -> Int ) : Int {} )
+	function reduce<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint8ClampedArray) -> T, initialValue : T ) : T;
+
+	/**
+		Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value.
+		See also [Array.prototype.reduceRight()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight).
+	 */
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function<T> ( callback : (previousValue : T, currentValue : Int, index : Int) -> T, initialValue : T ) : T {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int) -> Int ) : Int {} )
+	@:overload(function( callbackfn : (previousValue : Int, currentValue : Int, index : Int, array : Uint8ClampedArray) -> Int ) : Int {} )
+	function reduceRight<T>( callback : (previousValue : T, currentValue : Int, index : Int, array : Uint8ClampedArray) -> T, initialValue : T ) : T;
+
+	/**
+		Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first.
+		See also [Array.prototype.reverse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse).
+	 */
 	function reverse() : Uint8ClampedArray;
-	function slice( ?start : Int, ?end : Int ) : Uint8ClampedArray;
-	function some( callbackfn : Int -> Int -> Uint8ClampedArray -> Bool, ?thisArg : Dynamic ) : Bool;
-	function sort( ?compareFn : Int -> Int -> Int ) : Uint8ClampedArray;
-	function subarray( begin : Int, ?end : Int ) : Uint8ClampedArray;
+
+	/**
+		Stores multiple values in the typed array, reading input values from a specified array.
+	 */
+	@:overload( function ( array : Int8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint8ClampedArray, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint16Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Int32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Uint32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float32Array, ?offset : Int ) : Void {} )
+	@:overload( function ( array : Float64Array, ?offset : Int ) : Void {} )
+	function set( array : Array<Int>, ?offset : Int ) : Void;
+
+	/**
+		Extracts a section of an array and returns a new array.
+		See also [Array.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
+	 */
+	@:pure function slice( ?start : Int, ?end : Int ) : Uint8ClampedArray;
+
+	/**
+		Returns true if at least one element in this array satisfies the provided testing function.
+		See also [Array.prototype.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
+	 */
+	@:overload(function ( callback : (element : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	@:overload(function ( callback : (element : Int, index : Int) -> Bool, ?thisArg : Any ) : Bool {})
+	function some( callback : (element : Int, index : Int, array : Uint8ClampedArray) -> Bool, ?thisArg : Any ) : Bool;
+
+	/**
+		Sorts the elements of an array in place and returns the array.
+		See also [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort).
+	 */
+	function sort( ?compareFn : (x : Int, y : Int) -> Int ) : Uint8ClampedArray;
+
+	/**
+		Returns a new TypedArray from the given start and end element index.
+	 */
+	@:pure function subarray( ?begin : Int, ?end : Int ) : Uint8ClampedArray;
+
+	/**
+		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>;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toLocaleString( ?locales : String, ?options : NumberFormatOptions ) : String;
+
+	/**
+		Returns a string representing the array and its elements.
+		See also [Array.prototype.toString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString).
+	 */
+	@:pure function toString(): String;
 }