Structural Subtyping
Noun · Development
Definitions
A type compatibility rule in which a type is considered a subtype of another if it has at least the same structure — the same properties or methods with compatible signatures — regardless of whether it was explicitly declared to implement or extend it. TypeScript and Go both use structural subtyping (duck typing at the type level).
In plain English: A system where two types are compatible if they have the same shape, even if they were never explicitly linked to each other.
Example: "In TypeScript I never wrote 'implements Printable' — the object has a print() method so it structurally satisfies the interface."