TypeScript/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts
2015-12-28 16:18:50 -05:00

13 lines
No EOL
374 B
TypeScript

// @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;
}