Closed
Description
TypeScript Version:
1.8.5
Code
declare type ConstrainedString = "La première" | "La primera" | "The first";
function f(s : ConstrainedString) {
console.log(s);
}
f("La primera");
f("La première");
f("The first");
f("De eerste"); // Error message is here, as expected.
Expected behavior:
The second sentence of the error message I see under Visual Studio Code doesn't seem to make sense, does it?
Argument of type '"De eerste"' is not assignable to parameter or type '"La première" | "La primera" | "The first"'. Type '"De eerste"' is not assignable to type "The first"'
I wonder if I should not rather open this under VS Code.
Actual behavior:
Removing that second sentence?