Компромиссы
- Prefer
interface для public/exported object и class contracts — лучше errors, consumers augment. Historical TS default: interface unless only type can.
- Prefer
type для unions, tuples, functions, computed (mapped/conditional, template literals). Не style — interfaces literally cannot.
- Declaration merging double-edged. Essential augmentation, но shape interface не guaranteed в одном месте — footgun для internal closed definitions.
- Consistency > dogma. Team rule («type by default, interface when merging/OO») — practical diff small, arbitrary mix — cognitive load.
Итог
Public object contracts → interface; unions/computed → type; consistency важнее dogma.