title: Using Sequelize.Instance with Sequelize v5 & Typescript
body: <p>In most guides, chats, tutorial etc... the recommended way to type Sequelize models is to use the following code:</p>
  
  <pre><code>export interface IUserInstance extends Sequelize.Instance&lt;IUserAttributes&gt;, IUserAttributes {
    prototype: {
      verifyPassword: (password: string) =&gt; boolean;
    };
  }
  </code></pre>
  
  <p>the key part here is <code>Sequelize.Instance&lt;</code>, in Sequelize v5+ you see the error:</p>
  
  <pre><code>Namespace '".../node_modules/sequelize/types/index"' has no exported member 'Instance'.
  </code></pre>
  
  <p>I have looked around but have not come across solution. </p>
  
  <p>** Looking at this guide, section "Usage of sequelize.define"
  <a href="http://docs.sequelizejs.com/manual/typescript" rel="noreferrer">http://docs.sequelizejs.com/manual/typescript</a></p>
  
  <p>There does NOT seem to be a clear way of working with associations in using define and typescript.</p>
  
  <p>Any help / advice would be appreciated.</p>
  
  <p>References:</p>
  
  <ul>
  <li><a href="https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35013" rel="noreferrer">https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35013</a></li>
  <li><a href="https://github.com/sequelize/sequelize/issues/9760#issuecomment-472905585" rel="noreferrer">https://github.com/sequelize/sequelize/issues/9760#issuecomment-472905585</a></li>
  <li><a href="https://vivacitylabs.com/setup-typescript-sequelize/" rel="noreferrer">https://vivacitylabs.com/setup-typescript-sequelize/</a></li>
  </ul>
  
  <p>Regards,
  Emir</p>