title: Mongoose - can't access createdAt
body: <p>I'm creating a NestJs application using Mongoose, I'm currently having a problem trying to access createdAt even though I have set timestamps to true, my code is below.</p>
  <p>product.schema.ts</p>
  <pre><code>@Schema({timestamps: true})
  export class Product extends Document {
    @Prop({ required: true })
    name!: string;
  }
  </code></pre>
  <p>product.service.ts</p>
  <pre><code>public async getProduct(name: string): Promise&lt;void&gt; {
      const existingProduct = await this.productModel.findOne({ name });
  
      if (!existingProduct) {
        throw new NotFoundException();
      }
  
      existingProduct.createdAt //Property 'createdAt' does not exist on type 'Product'
    }
  </code></pre>