Skip to content
masterclass Buddy

TypeScript · Interface

ArrayLike

ArrayLike<T> is an interface for values with a numeric length and numeric element access. It models array-shaped data without requiring the value to be an actual Array.

Last updated

Syntax

interface ArrayLike<T> {
  readonly length: number;
  readonly [n: number]: T;
}

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • interface
  • type alias
  • object types
  • structural typing
  • optional properties
  • readonly properties

Source: Object Types. Checked 2026-11-03.