@rbxts/expect > ExpectedPlaceholder > type
ExpectedPlaceholder.type property
A string representing the type of the expected value in an expect() statement.
Signature:
type: string;
Remarks
By default, this value gets set automatically via the macro typeOf.
But you can optionally override this for custom types via ExpectMessageBuilder.expectedType().
Example
Let's say we were checking if two values were equal:
new ExpectMessageBuilder(
`Expected ${place.actual.value} (${place.actual.type}) to be
equal to ${place.expected.value} (${place.expected.type})`
);
We'd get output like:
Expected '5' (number) to be equal to "5" (string)