Skip to main content

@rbxts/expect > Assertion > instanceOf

Assertion.instanceOf() method

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

Signature:

instanceOf<I>(tChecker: t.check<I>): Assertion<I>;

Parameters

Parameter

Type

Description

tChecker

t.check<I>

Returns:

Assertion<I>

Example

expect(1).to.be.an.instanceOf(t.number);