Aller au contenu principal

Indexable <T, Index>

A type Indexable is a type with values that can be indexed by a number.

Hierarchy

Index

Indexable

indexType

indexType: Index extends number ? number : Index extends bigint ? bigint : never

Index type

at

  • Returns the value at the index

indexOf

  • indexOf(value: T): Option<Index>
  • Returns the integer index of a value

range

  • range(start: T, end: T): Range<T>
  • Returns an Iterable starting from start to end. If start or end is not in range then returns an empty iterable.

rangeSize

  • rangeSize(start: T, end: T): Index
  • Returns the size of a range. If start or end is not in range then returns 0.

Other

constructor

constructor: