title: Mongoose static Model definitions in Typescript
body: <p>I created a Mongoose Schema and added some static methods for the Model, named Campaign.</p>
  
  <p>If I console.log Campaign I can see the methods present on it. The problem is I don't know where to add those methods so that Typescript is also aware of them.</p>
  
  <p>If I add them to my CampaignModelInterface, they are only available for instances of the model (or at least TS thinks they are).</p>
  
  <p><strong>campaignSchema.ts</strong></p>
  
  <pre><code>  export interface CampaignModelInterface extends CampaignInterface, Document {
        // will only show on model instance
    }
  
    export const CampaignSchema = new Schema({
        title: { type: String, required: true },
        titleId: { type: String, required: true }
        ...etc
    )}
  
    CampaignSchema.statics.getLiveCampaigns = Promise.method(function (){
        const now: Date = new Date()
        return this.find({
             $and: [{startDate: {$lte: now} }, {endDate: {$gte: now} }]
        }).exec()
    })
  
    const Campaign = mongoose.model&lt;CampaignModelInterface&gt;('Campaign', CampaignSchema)
    export default Campaign
  </code></pre>
  
  <p>I also tried accessing it via Campaign.schema.statics, but without luck.</p>
  
  <p>Can anyone advise how to let TS know about the methods present on the Model, not the Model instances?</p>