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;
}
...