title: Sequelize V5->V6 upgrade: Typescript Error Property 'x' does not exist on type 'y'
body: <p>I will upgrade from sequelize 5.x.x to 6.x.x.
  In sequelize v5 everything works well but when i upgrade, all properties which are generated via associations get a typescript error when i want to use objects from the include.
  I tried also the examples from <a href="https://sequelize.org/master/manual/typescript.html" rel="nofollow noreferrer">https://sequelize.org/master/manual/typescript.html</a> without success.</p>
  <p>I hope anyone can help me!!</p>
  <p>Model:
  <strong>Participant.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>import { Model, DataTypes } from 'sequelize';
  import { STATUS } from '@bb/shared-core/dist/constants/participant';
  
  import sequelize from '@bb/db';
  import User from '@bb/components/erp/v1/modules/users/models/User';
  import OrderItem from '@bb/components/ecommerce/v2/modules/orders/models/OrderItem';
  import Contact from '@bb/components/erp/v1/modules/contacts/models/Contact';
  
  import { DeserializedModel } from '../interfaces/Participant';
  
  export class Participant extends Model implements DeserializedModel {
    id!: number;
    fkUser: number;
    fkOrderItem: number;
    fkContact: number;
    adminNotes: string;
    trainerNotes: string;
    attendance: string;
    status: string;
    readonly createdAt: Date;
    readonly updatedAt: Date;
  }
  
  Participant.init({
    fkUser: {
      type: DataTypes.NUMBER,
      field: 'fk_user'
    },
    fkOrderItem: {
      type: DataTypes.NUMBER,
      field: 'fk_order_item'
    },
    fkContact: {
      type: DataTypes.NUMBER,
      field: 'fk_contact'
    },
    trainerNotes: {
      type: DataTypes.STRING,
      field: 'trainer_notes'
    },
    adminNotes: {
      type: DataTypes.STRING,
      field: 'admin_notes'
    },
    attendance: {
      type: DataTypes.ENUM('confirmed', 'unconfirmed'),
      field: 'attendance'
    },
    status: {
      type: DataTypes.ENUM(STATUS.REBOOKED, STATUS.CANCELLED, STATUS.PARTICIPATING),
      field: 'status',
      defaultValue: 'participating'
    }
  }, {
    sequelize,
    modelName: 'participant'
  });
  
  Participant.belongsTo(User, {
    as: 'user',
    foreignKey: 'fk_user',
    targetKey: 'id'
  });
  
  Participant.belongsTo(OrderItem, {
    as: 'orderItem',
    foreignKey: 'fk_order_item',
    targetKey: 'id'
  });
  
  OrderItem.hasMany(Participant, {
    as: 'participants',
    foreignKey: 'fk_order_item',
    sourceKey: 'id'
  });
  
  Participant.belongsTo(Contact, {
    as: 'contact',
    foreignKey: 'fk_contact',
    targetKey: 'id'
  });
  
  if (process.env.NODE_ENV === 'test') {
    Participant.sync();
  }
  
  export default Participant;
  
  </code></pre>
  <p>And here is the function which used the model:
  <strong>ParticipantService.js</strong></p>
  <pre class="lang-js prettyprint-override"><code>  private async getEventIdFromParticipant(participantId: number): Promise&lt;number|undefined&gt; {
      const participant = await Participant.findOne({
        where: {
          id: participantId,
        },
        include: [
          {
            model: OrderItem,
            as: 'orderItem',
          }
        ]
      });
  
      return participant?.orderItem?.fkEvent;
    }
  </code></pre>
  <p>The error is in <strong>ParticipantService.js</strong> in the return statement.</p>
  <pre><code>Property 'orderItem' does not exist on type 'Participant'
  </code></pre>