title: How can I tell typescript that the getAssociation function exists in a Sequelize model?
body: <p>I have the following code:</p>
  <pre><code>interface TableBAttributes {
      TableBId: number;
  }
  
  interface TableAAttributes {
      TableAId: number;
      TableB: TableB;
  }
  
  class TableA extends Model&lt;TableAAttributes&gt; {}
  TableA.init({
     TableAId: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        allowNull: false,
        autoIncrement: true
     },
     TableB: {
        DataTypes.INTEGER,
        references: {
           model: TableB,
           key: 'tableB_id'
        },
        field: 'tableB_id'
     }
  }, {
    sequelize,
    modelName: 'TableA',
    tableName: 'TableA'
  });
  
  TableA.belongsTo(TableB, {
     foreignKey: 'tableB_id',
     as: 'TableB'
  });
  
  class TableB extends Model&lt;TableBAttributes&gt; {};
  TableB.init({
      TableBId: {
          type: DataTypes.INTEGER,
          primaryKey: true,
          allowNull: false,
          autoIncrement: true
      }
  }, {
     sequelize,
     modelName: 'TableB',
     tableName: 'TableB'
  });
  
  (async () =&gt; {
     const test = await TableA.findByPk(1);
     const relatedTableB = await test.getTableB();
     console.log(relatedTableB);
  })();
  </code></pre>
  <p>If I run this code, everything works correctly, and I get back the associated <code>TableB</code> from my query. My only problem is, that typescript complains that the <code>test.getTableB()</code> function does not exist, as this method is created by Sequelize.</p>
  <p>How could I tell typescript that this method exists?</p>