Skip to content

Proposal: Interfaces should allow duplicated members  #4423

@ENikS

Description

@ENikS

Allow duplicated members in multiple interface declarations, as long as they are identical. Optional compiling warnings are acceptable, to assist developers to remove redundant codes at convenient time.

This should not generate any errors, example:

shim.d.ts

interface Symbol {
    toString(): string;
    valueOf(): Object;
    [Symbol.toStringTag]: string;
}

es6.d.ts

...
interface Symbol {
    /** Returns a string representation of an object. */
    toString(): string;

    /** Returns the primitive value of the specified object. */
    valueOf(): Object;

    [Symbol.toStringTag]: string;
}
...

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