method mongoose.Schema.prototype.indeximport { mongoose } from "https://deno.land/x/mongoose@6.13.4/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