Skip to content

test pass with both expectType and expectNotType, pls help me understand #141

Description

@davidsu

This is an amazing library, thanks for it.
can you pls explain why this pass?

    type T2 = {a: {b: 1}}

    expectNotType<T2>({a:{b:1}})
    expectType<T2>({a:{b:1}})

    expectNotAssignable<T2>({a:{b:1}})
    expectAssignable<T2>({a:{b:1}})

I'd expect expectNotType<T2>({a:{b:1}}) and expectNotAssignable<T2>({a:{b:1}}) to fail.
thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions