Derive TypeScript Types from Mongoose Schemas ?
When working with Mongoose and TypeScript, two helper types make your life much easier:
⛶/**
* Extracts the “plain” shape of your schema—
* just the fields you defined, without Mongoose’s built-in methods or `_id`.
*/
export type User = InferSchemaTypetypeof userSchema;
/**
* ...
? https://www.roastdev.com/post/derive-typescript-types-from-mongoose-schemas


