I've been using Typescript for a while and am currently working with type aliases which have the following form:
type Animal = "cat" | "dog";
let a1_end = "at";
let a1: Animal = `c${a1_end}`
As far as I understood, only the values "cat" or "dog" would be allowed for any variable of the type Animal. But strictly speaking, it should be possible since the result would be "cat", right? I'm just asking since I get the error that the only allowed values for any variable of the type Animal can be either "cat" or "dog" when I'm running this code.