title: mongoose schema.method not working : TypeScript error TS2339: Property 'myMethod' does not exist on type 'Model<MyModelI>'
body: <p>I want to use <code>mongoose</code> with <code>TypeScript</code>. Also, I want to extend Model functionality to add the new method.</p>
  
  <p>But when call tsc to transpile file I get:</p>
  
  <pre><code>spec/db/models/match/matchModelSpec.ts(47,36): error TS2339: Property 
  'findLeagueMatches' does not exist on type 'Model&lt;MatchModelI&gt;'.
  </code></pre>
  
  <p>MatchModel.ts:</p>
  
  <pre><code>import {MatchInterface} from "./matchInterface";
  import {Schema, model, Model, Document} from "mongoose";
  
  export interface MatchModelI extends MatchInterface, Document {
      findLeagueMatches(locationName: String, leagueName: String): Promise&lt;MatchModelI[]&gt;;
  }
  export let matchSchema: Schema = new Schema({
      startTime: {type: Date, required: true},
      location: {type: Schema.Types.ObjectId, ref: 'Location'},
      league: {type: Schema.Types.ObjectId, ref: 'League'}
  });
  
  matchSchema.methods.findLeagueMatches = function(locationName: String, leagueName: String){
      //...
      return matches;
  };
  
  export const Match: Model&lt;MatchModelI&gt; = model&lt;MatchModelI&gt;("Match", matchSchema);
  </code></pre>