In another question I learned that for an interface
interface Example {
a: 'string';
b: 'number';
}
the identity
Example[a | b] = Example[a] | Example[b]
holds true in the typescript ecosystem, which is kind of surprising, since it seems not to be mentioned in any docs (at least I can not find it anywhere and would be happy if someone would actually show me some documentation, where it is mentioned).
If it is really not mentioned anywhere, can anyone tell me, why there exist unmentioned rules in typescript? Isn't that kind of sloppy? And far more interesting: What are other unspoken rules of typescript? Where can I get to know them?