Readonly[unscopables]Optional[iterator]?: booleanOptional Readonly[unscopables]?: booleanIs an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.
Optionalat?: booleanOptionalconcat?: booleanOptionalcopyWithin?: booleanOptionalentries?: booleanOptionalevery?: booleanOptionalfill?: booleanOptionalfilter?: booleanOptionalfind?: booleanOptionalfindIndex?: booleanOptionalfindLast?: booleanOptionalfindLastIndex?: booleanOptionalflat?: booleanOptionalflatMap?: booleanOptionalforEach?: booleanOptionalincludes?: booleanOptionalindexOf?: booleanOptionaljoin?: booleanOptionalkeys?: booleanOptionallastIndexOf?: booleanOptionallength?: booleanGets or sets the length of the array. This is a number one higher than the highest index in the array.
Optionalmap?: booleanOptionalpop?: booleanOptionalpush?: booleanOptionalreduce?: booleanOptionalreduceRight?: booleanOptionalreverse?: booleanOptionalshift?: booleanOptionalslice?: booleanOptionalsome?: booleanOptionalsort?: booleanOptionalsplice?: booleanOptionaltoLocaleString?: booleanOptionaltoReversed?: booleanOptionaltoSorted?: booleanOptionaltoSpliced?: booleanOptionaltoString?: booleanOptionalunshift?: booleanOptionalvalues?: booleanOptionalwith?: booleanGets or sets the length of the array. This is a number one higher than the highest index in the array.
Static Readonly[species]Adds the balanceToAdd to the existing balances. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Adds multiple balances to the existing balances. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Applys increments to balances. Returns a new BalanceArray with the incremented balances.
Can also be used via the applyIncrements method on BalanceArray
Optionaloptions: ConvertOptionsReturns the this object after copying a section of the array identified by start and end to the same array starting at position target
If target is negative, it is treated as length+target where length is the length of the array.
If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
Optionalend: numberIf not specified, length of the this object is used as its default value.
Checks if two balances are equal. Flag to check if the balances with zero amounts should be checked as well.
Can also be used via the corresponding method with same name on BalanceArray
Determines whether all the members of an array satisfy the specified test.
A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
OptionalthisArg: anyAn object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Filters out all balances with amount == 0. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Gets all token IDs from the balances (sorted and merged).
Find the balance amount for a specific token ID at a specific time within a set of balances. Returns x0 if not found.
Can also be used via the corresponding method with same name on BalanceArray
Returns all matching balances for a specific token ID. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Returns all matching balances for a specific time via a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Determines whether an array includes a certain element, returning true or false as appropriate.
The element to search for.
OptionalfromIndex: numberThe position in this array at which to begin searching for searchElement.
Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
The value to locate in the array.
OptionalfromIndex: numberThe array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
Adds all the elements of an array into a string, separated by the specified separator string.
Optionalseparator: stringA string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
Returns an iterable of keys in the array
Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
The value to locate in the array.
OptionalfromIndex: numberThe array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
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.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
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.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
Sorts an array in place. This method mutates the array and returns a reference to the same array.
OptionalcompareFn: (a: Balance, b: Balance) => numberFunction used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
[11,2,22,1].sort((a, b) => a - b)
Sorts balances by their amount property. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Checks if the current balances are a subset of the threshold balances (i.e. doesn't exceed the threshold).
Subtracts the balanceToRemove from the existing balances. Returns a new BalanceArray.
Throws an error if the balances underflow.
Can also be used via the corresponding method with same name on BalanceArray
Subtracts multiple balances from the existing balances. Returns a new BalanceArray.
Throws an error if the balances underflow.
Can also be used via the corresponding method with same name on BalanceArray
Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
Optionaloptions: NumberFormatOptions & DateTimeFormatOptionsReturns a string representation of an array.
Updates the balance for what it currently is to newAmount.
Returns a new BalanceArray. Does not modify the original.
Can also be used via the corresponding method with same name on BalanceArray
StaticfromStaticFromStaticisStaticof
Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.