Repository: TypeScript
Issue: Methods in simple mixin result as type any.
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  3.9.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

typescript mixin method is any

**Code**

```ts
type AnyCtor = new (...a: any[]) => any

function Foo<T extends AnyCtor>(Base: T) {
	return class Foo extends Base {
		foo() {}
	}
}
function Bar<T extends AnyCtor>(Base: T) {
	return class Bar extends Base {
		bar() {}
	}
}
function One<T extends AnyCtor>(Base: T) {
	return class One extends Base {
		one() {}
	}
}
function Two<T extends AnyCtor>(Base: T) {
	return class Two extends Base {
		two() {}
	}
}
function Three<T extends AnyCtor>(Base: T) {
	return class Three extends One(Two(Base)) {
		three() {}
	}
}

class MyClass extends Three(Foo(Bar(Object))) {
	test() {
		// @ts-expect-error
		this.foo(123)
		// @ts-expect-error
		this.bar(123)
		// @ts-expect-error // ERROR
		this.one(123) // this.one is type `any`!
		// @ts-expect-error // ERROR
		this.two(123) // this.two is type `any`!
		// @ts-expect-error
		this.three(123)
		console.log('no runtime errors')
	}
}

const m = new MyClass()
m.test()
```

**Expected behavior:**

There should be an error on all the lines marked with `// @ts-expect-error`

**Actual behavior:**

There is no type error on the lines with `this.one` and `this.two` because `this.one` and `this.two` are seen as type `any`.

The expectation is that the `one` and `two` methods have the proper type (with zero parameters) which would therefore cause a type error from passing in arguments.

**[Playground Link](https://www.staging-typescript.org/play?target=7&jsx=0#code/C4TwDgpgBAggdiAwsA9gJygXinCB3KACgDpSBDALijIQG0BdASiwD5qEBYAKG4DMBXOAGNgASxRwoAMRQoAPABUoEAB7AIcACYBnWAmToWhAEJltEKguYBvbgEg0EYPzSShAGzO6ZKZWo06UKbmULZcdna8soQ2AL728VyJAsJiEkFkaIp+6lq68EioaEbBFlBWofaOzq5QHl4ZGKq5gaWV4XYARpkxoYl2icmCIuKSAPK42c0B+fpFJWZlFWEOTi5untq6E9DTeRkhK3YSEL3W-YN8w2mSCnjySnuBBQbFJouWNlVrtfVb5fccjMDtAjsB7mcLtwhqlRuUABaOCBTfz7F7zd7mT7tVY1DYNBSIiC7VGBHaEO4oTEQRhfDrAImnOIJaHcbh-XQAWSQm10T10hKRhB87zQhDGnQAVhARLS6XZ1NpgGd7HYAPRqqAAAWA2gAtKpICIDWg0OhVQzRNpiFEqQBGABMAGZGKqNdrdQaVEbgCazWgLfCrcRumLHS63ZqdfrDTLfRBTeb6UHrSdCOHmO7LancFArVBQJAoAADGggYsAQkjHpj3rjfqTEWzxHB9udmc1zdbed0hegpYQler0a9PobAeTwYZQozqqEEm0KHcEGI7hQAHNCAByOC+NCCMQAW12ibQ2i3rvClx4XHncCVUEPWBw+Cg3MQvJi3EPLYgSpiQA)** 

**Related Issues:** 

Someone from the Discord chat thought perhaps https://github.com/microsoft/TypeScript/pull/29571 _**might**_ be related, but not with 100% certainty. They do however think this is a bug.

Ultimately, making mixins in TypeScript is too hard. It's too easy to get them wrong and they become a very inconvenient in TypeScript (whereas they are very convenient in plain JavaScript).

Also related: https://github.com/microsoft/TypeScript/issues/32080