Skip to main content

@rbxts/expect > Assertion > arrayOf

Assertion.arrayOf() method

Asserts that the value is an array of type I, according to a provided t check.

Signature:

arrayOf<I>(tChecker: t.check<I>): Assertion<I[]>;

Parameters

Parameter

Type

Description

tChecker

t.check<I>

Returns:

Assertion<I[]>

Remarks

Type alias for the array version of this.

Example

expect([1,2,3]).to.be.an.arrayOf(t.number);