ImFusion Web SDK

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

Object Ownership and Aliasing

Extends

Type Parameters

Type Parameter
T extends ClassHandle

Indexable

ts
[n: number]: T

Methods

MethodDescription
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

ParameterTypeDescription
searchElementTThe element to search for.
fromIndex?numberThe 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

ParameterTypeDescription
searchElementTThe value to locate in the array.
fromIndex?numberThe 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

ParameterTypeDescription
searchElementTThe value to locate in the array.
fromIndex?numberThe 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;

On this page