# Mixed

typedef

Helper type that creates constructor types from a base class and a mixin interface.

```typescript
interface MyMixinInterface {
	mixinMethod(): void;
}

function MyMixin<Base extends Constructor>( base: Base ): Mixed<Base, MyMixinInterface> {
	// ...
}

class BaseClass {
	baseMethod(): void {
		// ...
	}
}

const MixedClass = MyMixin( BaseClass );

// Contains both `mixinMethod()` and `baseMethod()`.
const myObject = new MixedClass();
myObject.mixinMethod();
myObject.baseMethod();
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/mix.ts#L56)

<a id="type-parameters">

## Type parameters

### `Base: extends Constructor`

A type of constructor of a class to apply mixin to.

### `Mixin`

An interface representing mixin.

<a id="properties">

## Properties

<a id="member-prototype">

### `prototype: Mixin & InstanceType<Base>`

#### Value

`new ( args: ConstructorParameters<Base> ) => Mixin & InstanceType<Base> & { [ K in keyof Base ]?: }`

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
