Type alias HasOneCreateAssociationMixin<Target, ExcludedAttributes>

HasOneCreateAssociationMixin<Target, ExcludedAttributes>: ((values?, options?) => Promise<Target>)

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

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

User.hasOne(Role);

Type Parameters

Type declaration

See

Model.hasOne