typeof a schema instance.
typeof
Obtains document schema type from Schema instance.
const userSchema = new Schema({userName:String});type UserType = InferSchemaType<typeof userSchema>;// resulttype UserType = {userName?: string} Copy
const userSchema = new Schema({userName:String});type UserType = InferSchemaType<typeof userSchema>;// resulttype UserType = {userName?: string}
Generated using TypeDoc
typeof
a schema instance.