FluidReadonlyArray Interface
Like TypeScript's built-in ReadonlyArray type, but independent of TypeScript lib.
Sealed
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export interface FluidReadonlyArray<T>
Type Parameters
| Parameter | Description |
|---|---|
| T |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| [Symbol.unscopables] | readonly | { [K in keyof (readonly any[])]?: boolean; } | See Symbol.unscopables |
| length | readonly | number | Gets the length of the array. |
Methods
| Method | Return Type | Description |
|---|---|---|
| [Symbol.iterator]() | FluidIterableIterator<T> | Returns an iterator over the elements in this array. |
| at(index) | T | undefined | Returns the item at the specified index, allowing for positive and negative integers. Negative integers count back from the last item in the array. |
| concat(items) | T[] | Combines two or more arrays. |
| concat(items) | T[] | Combines two or more arrays. |
| entries() | FluidIterableIterator<[number, T]> | Returns an iterable of key, value pairs for every entry in the array. |
| every(predicate, thisArg) | this is FluidReadonlyArray<S> | Determines whether all the members of an array satisfy the specified test. |
| every(predicate, thisArg) | boolean | Determines whether all the members of an array satisfy the specified test. |
| filter(predicate, thisArg) | S[] | Returns the elements of an array that meet the condition specified in a callback function. |
| filter(predicate, thisArg) | T[] | Returns the elements of an array that meet the condition specified in a callback function. |
| find(predicate, thisArg) | S | undefined | Returns the value of the first element in the array where predicate is true, and undefined otherwise. |
| find(predicate, thisArg) | T | undefined | Returns the value of the first element in the array where predicate is true, and undefined otherwise. |
| findIndex(predicate, thisArg) | number | Returns the index of the first element in the array where predicate is true, and -1 otherwise. |
| findLast(predicate, thisArg) | S | undefined | Returns the value of the last element in the array where predicate is true, and undefined otherwise. |
| findLast(predicate, thisArg) | T | undefined | Returns the value of the last element in the array where predicate is true, and undefined otherwise. |
| findLastIndex(predicate, thisArg) | number | Returns the index of the last element in the array where predicate is true, and -1 otherwise. |
| flat(this, depth) | FlatArray<A, D>[] | Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth. |
| flatMap(callback, thisArg) | U[] | Calls a defined callback function on each element of an array. Then, flattens the result into a new array. |
| forEach(callbackfn, thisArg) | void | Performs the specified action for each element in an array. |
| includes(searchElement, fromIndex) | boolean | Determines whether an array includes a certain element, returning true or false as appropriate. |
| indexOf(searchElement, fromIndex) | number | Returns the index of the first occurrence of a value in an array, or -1 if it is not present. |
| join(separator) | string | Adds all the elements of an array into a string, separated by the specified separator string. |
| keys() | FluidIterableIterator<number> | Returns an iterable of keys in the array. |
| lastIndexOf(searchElement, fromIndex) | number | Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. |
| map(callbackfn, thisArg) | U[] | Calls a defined callback function on each element of an array, and returns an array that contains the results. |
| reduce(callbackfn) | T | Executes the provided callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value. |
| reduce(callbackfn, initialValue) | U | Executes the provided callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value. |
| reduceRight(callbackfn) | T | Executes the provided callback function on each element of the array, in descending order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value. |
| reduceRight(callbackfn, initialValue) | U | Executes the provided callback function on each element of the array, in descending order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value. |
| slice(start, end) | T[] | Returns a copy of a section of an array. |
| some(predicate, thisArg) | boolean | Determines whether the specified callback function returns true for any element of an array. |
| toLocaleString() | string | |
| toString() | string | Returns a string representation of an array. |
| values() | FluidIterableIterator<T> | Returns an iterable of values in the array. |