Skip to content

postgrelize / ModelType

Type Alias: ModelType<TModelAttributes, TCreationAttributes> ​

ModelType<TModelAttributes, TCreationAttributes> = new () => Model<TModelAttributes, TCreationAttributes>

Defined in: src/model/v6-aliases.ts:38

A no-argument model constructor with the given attribute types (Sequelize v6 ModelType).

Type Parameters ​

TModelAttributes ​

TModelAttributes extends object = any

TCreationAttributes ​

TCreationAttributes extends object = TModelAttributes

Returns ​

Model<TModelAttributes, TCreationAttributes>

Example ​

ts
const factory: ModelType<{ id: number }> = class extends Model<{ id: number }> {};

Released under the MIT License.