HandleArray
Array of ClassHandles with alias-aware membership checks.
Unlike a normal array, membership methods here treat handles as equal when they alias the same underlying C++ object.
See
Extends
- Array<
T>
Type Parameters
| Type Parameter |
|---|
T extends ClassHandle |
Indexable
ts
[n: number]: TMethods
| Method | Description |
|---|---|
| includes() | Determines whether an array includes a certain element, returning true or false as appropriate. |
| indexOf() | Returns the index of the first occurrence of a value in an array, or -1 if it is not present. |
| lastIndexOf() | Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. |
includes()
ts
includes(searchElement: T, fromIndex?: number): boolean;Determines whether an array includes a certain element, returning true or false as appropriate.
Parameters
| Parameter | Type | Description |
|---|---|---|
searchElement | T | The element to search for. |
fromIndex? | number | The position in this array at which to begin searching for searchElement. |
Returns
boolean
Overrides
ts
Array.includes;indexOf()
ts
indexOf(searchElement: T, fromIndex?: number): number;Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
Parameters
| Parameter | Type | Description |
|---|---|---|
searchElement | T | The value to locate in the array. |
fromIndex? | number | The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0. |
Returns
number
Overrides
ts
Array.indexOf;lastIndexOf()
ts
lastIndexOf(searchElement: T, fromIndex?: number): number;Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
Parameters
| Parameter | Type | Description |
|---|---|---|
searchElement | T | The value to locate in the array. |
fromIndex? | number | The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array. |
Returns
number
Overrides
ts
Array.lastIndexOf;