Skip to content

feature request: assignability #8

@mscharley

Description

@mscharley

I would like a way to write a test like the following:

interface Foo {
  foo: string | number;
}

test("{ foo: 10 } is assignable to Foo", (t) => t.assignable({ foo: 10 })<Foo>());

This seems to be subtly different to extends and includes in that extends tests that A is a strict superset of B instead of testing that A is sufficient to satisfy B.

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