TS Structural Typing.
Structural typing & excess property checks
TypeScript uses structural typing: compatibility is based on shape, not name. Inline object literals are subject to excess property checks.
Structural typing:
Excess property checks:
Structural typing & excess property checks
TypeScript uses structural typing: compatibility is based on shape, not name. Inline object literals are subject to excess property checks.
Structural typing:
Excess property checks: