This commit is contained in:
parent
f238499f06
commit
bf89dc00fe
1 changed files with 13 additions and 0 deletions
|
@ -584,6 +584,19 @@ export class ModelManager<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A model manager extension is a mixin, building a new model manager class with extended capabilities.
|
||||
* @see https://www.typescriptlang.org/docs/handbook/mixins.html
|
||||
*/
|
||||
export type ModelManagerExtension<
|
||||
Extension extends object,
|
||||
T extends object,
|
||||
Shape extends ModelShape<T>,
|
||||
Identifier extends IdentifierDefinition<T, Shape>,
|
||||
> = (
|
||||
modelManager: ModelManager<T, Shape, Identifier>,
|
||||
) => ModelManager<T, Shape, Identifier> & Extension;
|
||||
|
||||
/**
|
||||
* Define a new model.
|
||||
* @param definition The model definition object.
|
||||
|
|
Loading…
Add table
Reference in a new issue