The interface versus type argument is one of the oldest in TypeScript, and the honest answer is that it rarely matters. What does matter, and what nobody measures, is the vocabulary a codebase settles into: how many of your types are objects, how many are unions, how deep the generics go, and which of the standard utility types you actually use.
So I counted every type declaration in ours.
The subject is Nakodo , 582 TypeScript files, 72,683 lines, strict mode, no type-generation step other than the ORM's row inference.
The headline
type aliases 357 (262 exported, 95 file-local) interfaces 1 (a global Window augmentation) enums 0 classes 19 (18 of them Error subclasses) generic aliases 2 generic functions 14
Enter fullscreen mode
Exit fullscreen mode
One interface in 72,683 lines, and it is not describing anything of ours.…