title: Mongoose '.inlcudes' - Argument of type 'ObjectId' is not assignable to parameter of type '{ type: ObjectId; required: true; }'
body: <p>I'm in the process of converting my JS node/express &amp; mongoose server over to Typescript, and I have an issue with mongoose's array includes method with typescript:</p>
  <pre><code>Argument of type 'ObjectId' is not assignable to parameter of type '{ type: ObjectId; required: true; }'.
    Type 'ObjectId' is missing the following properties from type '{ type: ObjectId; required: true; }': type, required
  
  78     if (!building.actors.includes(mongoose.Types.ObjectId(userID)))
  </code></pre>
  <p>The line causing this issue is below:</p>
  <pre><code>const transformedUserID = mongoose.Types.ObjectId(userID)
  if (transformedUserID &amp;&amp; !building.actors.includes(transformedUserID)) {
     ...
  </code></pre>
  <p>The error says that the required property is missing, so I thought maybe it was an issue involving userID possibly being null, so I tried this with no success:</p>
  <pre><code>transformedUserID || mongoose.Types.ObjectId()
  </code></pre>
  <p>I'm new to Typescript so am not really sure why this is happening, it worked perfectly fine in plain JS. Any help would be appreciated.</p>
  <p>Thanks</p>