Mixins allow a class to inherit multiple classes in typescript. The problem is when accessing parent methods, typescript will not be able to recognise that the parent method exists. e.g

class ParentA() {
	methodA() {}
}
 
class ParentB() {}
 
class Child() extends mixin(ParentA, ParentB) {
	foo() {
		this.methodA()  // Error here
	}
}

We have to say

type ChildType = Child &
InstanceType<typeof ParentA> &
InstanceType<typeof ParentB>;

And recast this on our child to our new type

_this = (this as unknown) as ChildType;

then we access parent methods like so

class Child() extends mixin(ParentA, ParentB) {
	_this = (this as unknown) as ChildType;
	
	foo() {
		this._this.methodA()  // Error here
	}
}