mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Added test from #6278.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// @declaration: true
|
||||
|
||||
interface Animal { animal: {} };
|
||||
interface Dog extends Animal { dog: {} }
|
||||
interface Cat extends Animal { cat: {} }
|
||||
interface Moose extends Animal { moose: {} }
|
||||
|
||||
function doThing(x: "dog"): Dog;
|
||||
function doThing(x: "cat"): Cat;
|
||||
function doThing(x: string): Animal;
|
||||
function doThing(x: string, y?: string): Moose {
|
||||
return undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user