Skip to content

Call on OR type rejected without obvious reason. #11005

Closed
@dbaeumer

Description

@dbaeumer

TypeScript Version: 2.0.2
Code

interface I1 {
    openEditor(input: string, options: string | number): void;
}

interface I2 {
    openEditor(input: string, options: string): void;
}

let part: I1 | I2;

part.openEditor('dirk', 'baeumer');

You get a compile error on part.openEditor. However I think the call should be accepted since the interface could be correctly merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions