Skip to main content
zerotal

Documentation


Documentation / @zerotal/orm / index / Mixin

Type Alias: Mixin<TIn, TOut>

Mixin<TIn, TOut> = (Base) => TOut

Defined in: packages/orm/src/model/mixins.ts:31

A model mixin: receives a base constructor and returns an extended one. Authors write the generic form so the mixin composes onto whatever base it is given:

export const SoftDeletes = (Base: T) => class extends Base { … };

Type Parameters

TIn

TIn extends Constructor = Constructor

TOut

TOut extends Constructor = Constructor

Parameters

Base

TIn

Returns

TOut