After working with Typescript for some time, I have delved into type aliases that come in the form:
type Animal = "cat" | "dog";
let a1_end = "at";
let a1: Animal = `c${a1_end}`
I initially thought that only the values "cat" or "dog" would be accepted for any variable of the type Animal. However, technically speaking, shouldn't it be allowed since the result would be "cat"? This confusion arises because when I run this code, I get an error stating that variables of type Animal can only hold "cat" or "dog".