tests/cases/conformance/types/members/duplicatePropertyNames.ts(4,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(5,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(14,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(15,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(20,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(22,5): error TS2393: Duplicate function implementation. tests/cases/conformance/types/members/duplicatePropertyNames.ts(23,5): error TS2393: Duplicate function implementation. tests/cases/conformance/types/members/duplicatePropertyNames.ts(26,5): error TS2300: Duplicate identifier 'baz'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(30,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(31,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(35,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(36,5): error TS2300: Duplicate identifier 'foo'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(38,5): error TS2300: Duplicate identifier 'bar'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(39,5): error TS2300: Duplicate identifier 'bar'. tests/cases/conformance/types/members/duplicatePropertyNames.ts(44,5): error TS1117: An object literal cannot have multiple properties with the same name. tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS1117: An object literal cannot have multiple properties with the same name. ==== tests/cases/conformance/types/members/duplicatePropertyNames.ts (16 errors) ==== // duplicate property names are an error in all types interface Number { foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. } interface String { foo(): string; foo(): string; } interface Array { foo: T; ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: T; ~~~ !!! error TS2300: Duplicate identifier 'foo'. } class C { foo: string; foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. bar(x) { } ~~~ !!! error TS2393: Duplicate function implementation. bar(x) { } ~~~ !!! error TS2393: Duplicate function implementation. baz = () => { } baz = () => { } ~~~ !!! error TS2300: Duplicate identifier 'baz'. } interface I { foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. } var a: { foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. foo: string; ~~~ !!! error TS2300: Duplicate identifier 'foo'. bar: () => {}; ~~~ !!! error TS2300: Duplicate identifier 'bar'. bar: () => {}; ~~~ !!! error TS2300: Duplicate identifier 'bar'. } var b = { foo: '', foo: '', ~~~ !!! error TS1117: An object literal cannot have multiple properties with the same name. bar: () => { }, bar: () => { } ~~~ !!! error TS1117: An object literal cannot have multiple properties with the same name. }