@rbxts/expect > Assertion > typeOf
Assertion.typeOf() method
Asserts that the value is of type I
, according to a provided t check.
Signature:
typeOf<I>(tChecker: t.check<I>): Assertion<I>;
Parameters
Parameter | Type | Description |
---|---|---|
tChecker | t.check<I> |
Returns:
Assertion<I>
Remarks
Type alias for the instanceOf
version of this.
Example
expect(1).to.be.an.instanceOf(t.number);