This note demonstrates the way of how to avoid manual types declaration when classes are combined by mixing.
Mixin is a well-known technique which compensates the lack of built-in multiple inheritance in TS/JS. This is partly a workaround, but everything is good enough with typings as long as we adhere functional mixins or sub-class factories patterns. However if we need to merge several unrelated classes (directed acyclic graph, you know), type inference might be slightly complicated for tsc and we have to describe the result type by hand.
The problem can be illustrated by a code snippet from the official…
JS Enthusiast / System Architect at QIWI