Type Alias BelongsToCreateAssociationMixin<T>

BelongsToCreateAssociationMixin: (
    values?: CreationAttributes<T>,
    options?: BelongsToCreateAssociationMixinOptions<T>,
) => Promise<T>

The createAssociation mixin applied to models with belongsTo. An example of usage is as follows:

class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
declare createRole: BelongsToCreateAssociationMixin<Role>;
}

User.belongsTo(Role);

Type Parameters

Type declaration

Model.belongsTo