Skip to content

Type checking is not working properly with promises.  #16369

@joeuy

Description

@joeuy

TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)

Code

var p1: Promise<{ a: string }>;
var p2: Promise<{ a: string, b: string }>;
p2 = p1;

link to playground

Expected behavior:
Type error

Actual behavior:
No error

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type
    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