Type Alias HasOneCreateAssociationMixin<Target, ExcludedAttributes>

HasOneCreateAssociationMixin: (
    values?: Omit<CreationAttributes<Target>, ExcludedAttributes>,
    options?: HasOneCreateAssociationMixinOptions<Target>,
) => 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

Model.hasOne