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