I might be missing something, but isn't this line backwards? > Subtype of type A is a subset of type A. Supertype is a superset. Easy. Subtype of type A is actually a superset of type A, since it contains at least all the properties of A. If you had (contrived example) a Dog class that inherited from an Animal class, Dog would be a sub type of Animal, but its additional properties (say, a bark() method) mean that it…
I think it is correct.
Example:
type A = { a: number }
type B = { a: number, b: number }
B is not a superset of A, it's a subset and subtype of A. You can use B every time you want to use A.
In other words, of all types that can be assigned to A or used in functions and types expecting an A, B is one of those subsets.
type C = { a: number, c: number }
is another subtype of A.
A "subtype" C can be substituted in place of its "supertype" A.
Both C and B are subsets of A, in other words: in the infinite set of values of type A, some can be grouped in a type B or C. C itself is a subtype of A.