Skip to content

toBeBoolean behaves differently from toEqualTypeOf<boolean> #32

@boris-petrov

Description

@boris-petrov

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions