Type alias BelongsToGetAssociationMixin<T>

BelongsToGetAssociationMixin<T>: ((options?: BelongsToGetAssociationMixinOptions<T>) => Promise<T | null>)

Type Parameters

Type declaration

    • (options?: BelongsToGetAssociationMixinOptions<T>): Promise<T | null>
    • The getAssociation mixin applied to models with belongsTo. An example of usage is as follows:

      class User extends Model<InferAttributes<User>, InferCreationAttributes<User>> {
      declare getRole: BelongsToGetAssociationMixin<Role>;
      }

      User.belongsTo(Role);

      See

      Model.belongsTo

      Parameters

      Returns Promise<T | null>

Generated using TypeDoc