Thanks to visit codestin.com
Credit goes to github.com

Skip to content

expectType fails for two identical types that are differently implemented #218

@maximzavadskiy

Description

@maximzavadskiy
type typeA = {a: number} & {b: number}
type typeB = {a: number; b: number}
declare const b:typeB
expectType<typeA>(b) // ERR!  but expected to pass

With this behaviour more complex types/types that are computed cannot be checked via tsd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions