Playground link.
import { expectTypeOf } from 'expect-type';
let x!: any;
expectTypeOf(x).toBeBoolean();
expectTypeOf(x).toEqualTypeOf<boolean>();
The first expectTypeOf passes (which it should not) but the second errs (correctly). They should both err.
P.S. The same is true for other such helpers (like toBeArray, etc).
Playground link.
The first
expectTypeOfpasses (which it should not) but the second errs (correctly). They should both err.P.S. The same is true for other such helpers (like
toBeArray, etc).