147 lines
6.0 KiB
Haxe
147 lines
6.0 KiB
Haxe
package js.lib;
|
|
|
|
/**
|
|
A typed array of 64-bit float values. The contents are initialized to 0. If the requested
|
|
number of bytes could not be allocated an exception is raised.
|
|
**/
|
|
typedef IFloat64Array = {
|
|
/**
|
|
The size in bytes of each element in the array.
|
|
**/
|
|
final BYTES_PER_ELEMENT : Float;
|
|
/**
|
|
The ArrayBuffer instance referenced by the array.
|
|
**/
|
|
final buffer : ts.AnyOf2<js.lib.ArrayBuffer, js.lib.SharedArrayBuffer>;
|
|
/**
|
|
The length in bytes of the array.
|
|
**/
|
|
final byteLength : Float;
|
|
/**
|
|
The offset in bytes of the array.
|
|
**/
|
|
final byteOffset : Float;
|
|
/**
|
|
Returns the this object after copying a section of the array identified by start and end
|
|
to the same array starting at position target
|
|
**/
|
|
function copyWithin(target:Float, start:Float, ?end:Float):js.lib.Float64Array;
|
|
/**
|
|
Determines whether all the members of an array satisfy the specified test.
|
|
**/
|
|
function every(callbackfn:(value:Float, index:Float, array:js.lib.Float64Array) -> Any, ?thisArg:Dynamic):Bool;
|
|
/**
|
|
Returns the this object after filling the section identified by start and end with value
|
|
**/
|
|
function fill(value:Float, ?start:Float, ?end:Float):js.lib.Float64Array;
|
|
/**
|
|
Returns the elements of an array that meet the condition specified in a callback function.
|
|
**/
|
|
function filter(callbackfn:(value:Float, index:Float, array:js.lib.Float64Array) -> Dynamic, ?thisArg:Dynamic):js.lib.Float64Array;
|
|
/**
|
|
Returns the value of the first element in the array where predicate is true, and undefined
|
|
otherwise.
|
|
**/
|
|
function find(predicate:(value:Float, index:Float, obj:js.lib.Float64Array) -> Bool, ?thisArg:Dynamic):Null<Float>;
|
|
/**
|
|
Returns the index of the first element in the array where predicate is true, and -1
|
|
otherwise.
|
|
**/
|
|
function findIndex(predicate:(value:Float, index:Float, obj:js.lib.Float64Array) -> Bool, ?thisArg:Dynamic):Float;
|
|
/**
|
|
Performs the specified action for each element in an array.
|
|
**/
|
|
function forEach(callbackfn:(value:Float, index:Float, array:js.lib.Float64Array) -> Void, ?thisArg:Dynamic):Void;
|
|
/**
|
|
Returns the index of the first occurrence of a value in an array.
|
|
**/
|
|
function indexOf(searchElement:Float, ?fromIndex:Float):Float;
|
|
/**
|
|
Adds all the elements of an array separated by the specified separator string.
|
|
**/
|
|
function join(?separator:String):String;
|
|
/**
|
|
Returns the index of the last occurrence of a value in an array.
|
|
**/
|
|
function lastIndexOf(searchElement:Float, ?fromIndex:Float):Float;
|
|
/**
|
|
The length of the array.
|
|
**/
|
|
final length : Float;
|
|
/**
|
|
Calls a defined callback function on each element of an array, and returns an array that
|
|
contains the results.
|
|
**/
|
|
function map(callbackfn:(value:Float, index:Float, array:js.lib.Float64Array) -> Float, ?thisArg:Dynamic):js.lib.Float64Array;
|
|
/**
|
|
Calls the specified callback function for all the elements in an array. The return value of
|
|
the callback function is the accumulated result, and is provided as an argument in the next
|
|
call to the callback function.
|
|
|
|
Calls the specified callback function for all the elements in an array. The return value of
|
|
the callback function is the accumulated result, and is provided as an argument in the next
|
|
call to the callback function.
|
|
**/
|
|
@:overload(function(callbackfn:(previousValue:Float, currentValue:Float, currentIndex:Float, array:js.lib.Float64Array) -> Float, initialValue:Float):Float { })
|
|
@:overload(function<U>(callbackfn:(previousValue:U, currentValue:Float, currentIndex:Float, array:js.lib.Float64Array) -> U, initialValue:U):U { })
|
|
function reduce(callbackfn:(previousValue:Float, currentValue:Float, currentIndex:Float, array:js.lib.Float64Array) -> Float):Float;
|
|
/**
|
|
Calls the specified callback function for all the elements in an array, in descending order.
|
|
The return value of the callback function is the accumulated result, and is provided as an
|
|
argument in the next call to the callback function.
|
|
|
|
Calls the specified callback function for all the elements in an array, in descending order.
|
|
The return value of the callback function is the accumulated result, and is provided as an
|
|
argument in the next call to the callback function.
|
|
**/
|
|
@:overload(function(callbackfn:(previousValue:Float, currentValue:Float, currentIndex:Float, array:js.lib.Float64Array) -> Float, initialValue:Float):Float { })
|
|
@:overload(function<U>(callbackfn:(previousValue:U, currentValue:Float, currentIndex:Float, array:js.lib.Float64Array) -> U, initialValue:U):U { })
|
|
function reduceRight(callbackfn:(previousValue:Float, currentValue:Float, currentIndex:Float, array:js.lib.Float64Array) -> Float):Float;
|
|
/**
|
|
Reverses the elements in an Array.
|
|
**/
|
|
function reverse():js.lib.Float64Array;
|
|
/**
|
|
Sets a value or an array of values.
|
|
**/
|
|
function set(array:ArrayLike<Float>, ?offset:Float):Void;
|
|
/**
|
|
Returns a section of an array.
|
|
**/
|
|
function slice(?start:Float, ?end:Float):js.lib.Float64Array;
|
|
/**
|
|
Determines whether the specified callback function returns true for any element of an array.
|
|
**/
|
|
function some(callbackfn:(value:Float, index:Float, array:js.lib.Float64Array) -> Any, ?thisArg:Dynamic):Bool;
|
|
/**
|
|
Sorts an array.
|
|
**/
|
|
function sort(?compareFn:(a:Float, b:Float) -> Float):js.lib.Float64Array;
|
|
/**
|
|
at begin, inclusive, up to end, exclusive.
|
|
**/
|
|
function subarray(?begin:Float, ?end:Float):js.lib.Float64Array;
|
|
function toString():String;
|
|
/**
|
|
Returns an array of key, value pairs for every entry in the array
|
|
**/
|
|
function entries():IterableIterator<ts.Tuple2<Float, Float>>;
|
|
/**
|
|
Returns an list of keys in the array
|
|
**/
|
|
function keys():IterableIterator<Float>;
|
|
/**
|
|
Returns an list of values in the array
|
|
**/
|
|
function values():IterableIterator<Float>;
|
|
/**
|
|
Determines whether an array includes a certain element, returning true or false as appropriate.
|
|
**/
|
|
function includes(searchElement:Float, ?fromIndex:Float):Bool;
|
|
/**
|
|
Takes an integer value and returns the item at that index,
|
|
allowing for positive and negative integers.
|
|
Negative integers count back from the last item in the array.
|
|
**/
|
|
function at(index:Float):Null<Float>;
|
|
}; |