<p dir="auto">This seems like something the compiler could merge, <a href="http://www.typescriptlang.org/Playground#src=interface%20A%20%7B%0A%09foo%28name%3A%20'foo'%29%3A%20string%3B%0A%09foo%28name%3A%20string%29%3A%20any%3B%0A%7D%0A%0Ainterface%20B%20%7B%0A%09foo%28name%3A%20'bar'%29%3A%20number%3B%0A%09foo%28name%3A%20string%29%3A%20any%3B%0A%7D%0A%0Ainterface%20C%20extends%20A%2C%20B%20%7B%7D%0A" rel="nofollow">but currently it complains</a> that property of foo in types A and B are not identical:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface A {
    foo(name: 'foo'): string;
    foo(name: string): any;
}

interface B {
    foo(name: 'bar'): number;
    foo(name: string): any;
}

interface C extends A, B {}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-s">'foo'</span><span class="pl-kos">)</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
    <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">interface</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span>
    <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-s">'bar'</span><span class="pl-kos">)</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>
    <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">interface</span> <span class="pl-smi">C</span> <span class="pl-k">extends</span> <span class="pl-smi">A</span><span class="pl-kos">,</span> <span class="pl-smi">B</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">I have some real world code I am trying to type and essentially I have to redeclare all the "inherited" string literal types like this in the final class, which is sort of unmaintainable.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Foo {
    on(type: 'foo', listener: (event: MouseEvent) =&gt; boolean): boolean;
    on(type: string, listener: (event: Event) =&gt; boolean): boolean;
}

interface Bar {
    on(type: 'bar', listener: (event: MSGestureEvent) =&gt; boolean): boolean;
    on(type: string, listener: (event: Event) =&gt; boolean): boolean;
}

interface FooBarA extends Foo, Bar {} // Error: not correctly extended

interface FooBarB extends Foo, Bar {
    on(type: 'foo', listener: (event: MouseEvent) =&gt; boolean): boolean;
    on(type: 'bar', listener: (event: MSGestureEvent) =&gt; boolean): boolean;
    on(type: string, listener: (event: Event) =&gt; boolean): boolean;
}

type FooBarC = Foo &amp; Bar;

let foobar: FooBarC;

foobar.on('foo', (event) =&gt; { return false; });"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MouseEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">interface</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MSGestureEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">interface</span> <span class="pl-smi">FooBarA</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span><span class="pl-kos">,</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-c">// Error: not correctly extended</span>

<span class="pl-k">interface</span> <span class="pl-smi">FooBarB</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span><span class="pl-kos">,</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MouseEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-s">'bar'</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">MSGestureEvent</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
    <span class="pl-c1">on</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">listener</span>: <span class="pl-kos">(</span><span class="pl-s1">event</span>: <span class="pl-smi">Event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">boolean</span><span class="pl-kos">)</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">type</span> <span class="pl-smi">FooBarC</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo</span> <span class="pl-c1">&amp;</span> <span class="pl-smi">Bar</span><span class="pl-kos">;</span>

<span class="pl-k">let</span> <span class="pl-s1">foobar</span>: <span class="pl-smi">FooBarC</span><span class="pl-kos">;</span>

<span class="pl-s1">foobar</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'foo'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">event</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong></p>
<p dir="auto">That <code class="notranslate">FooBarA</code> would work instead of throwing an error.</p>
<p dir="auto"><strong>Actual behavior:</strong></p>
<p dir="auto"><code class="notranslate">FooBarA</code> complains <code class="notranslate">Interface 'FooBarA' cannot simultaneously extend types 'Foo' and 'Bar'. Named property 'on' of types 'Foo' and 'Bar' are not identical.</code></p>
<p dir="auto">While that is true in the strictest sense, the "base" override matches, which means in theory the string literal types could be merged and the error should only occur if there is a conflict between a specific string literal type.</p>
<p dir="auto">Using the intersection type works perfectly fine and the resulting type mirrors the runtime behaviour.  Using the "reimplement all methods" (<code class="notranslate">FooBarB</code>) gets really tedious really quickly when you are trying to do something like model event listeners like the above.</p>