Structural typing matches JavaScript shapes without proving identity

TypeScript compares object members rather than requiring declarations to share an explicit nominal identity.

The compatibility handbook calls this structural subtyping, matching common JavaScript object and function patterns.

Objects with the required compatible members can satisfy interfaces even when they never declared them.

This flexibility improves interoperability, yet selected compatibility rules deliberately permit unsound but common patterns.

Runtime continuity explains the design, while strict settings reject some risky assignments.

Because shape agreement cannot validate provenance or behavior, runtime boundaries and tests retain separate responsibilities.

Prefer structural compatibility for composition, then tighten function variance and review casts where assumptions become consequential.