method mongoose.Schema.prototype.indeximport { mongoose } from "https://deno.land/x/mongoose@8.7.0/types/index.d.ts"; const { Schema } = mongoose; index(fields: IndexDefinition, options?: IndexOptions): thisDefines an index (most likely compound) for this schema. Defines an index (most likely compound) for this schema. Parametersfields: IndexDefinitionoptionaloptions: IndexOptionsReturnsthis