From d9d5e3a28331899106c6698d86041fb41dd503c8 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 28 Dec 2015 16:16:02 -0500 Subject: [PATCH] Added test from #6278. --- .../stringLiteral/stringLiteralTypesOverloads05.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts new file mode 100644 index 00000000000..182155790a6 --- /dev/null +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads05.ts @@ -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; +} \ No newline at end of file