Documentation
    Preparing search index...

    Function indexOf

    • Returns the index of the first occurrence of a value in an array.

      Type Parameters

      • TArray extends readonly any[]
      • TValue

      Parameters

      • array: TArray

        the array where the search is perfomed.

      • value: TValue

        the value to locate in the array

      • OptionalstartIndex: number

        the array index at which to begin the search. If startIndex is omitted, the search starts at index 0.

      • Optionalcount: number

        the number of elements in the section to search.

      Returns TValue extends TArray[number] ? number : NoMatchIndexNominal

    • Returns the index of the first occurrence of a value in an array.

      Type Parameters

      • TArray extends readonly any[]

      Parameters

      • array: TArray

        the array where the search is perfomed.

      • value: TArray[number]

        the value to locate in the array

      • OptionalstartIndex: number

        the array index at which to begin the search. If startIndex is omitted, the search starts at index 0.

      • Optionalcount: number

        the number of elements in the section to search.

      Returns number