I used to set a schema index using this syntax:
mySchema.index({ name: 'text' });
So name is a property of my schema.
After mongoose update, I'm getting the error below:
Argument of type '{ name: string; }' is not assignable to parameter of type 'IndexSpecification'.
Property 'key' is missing in type '{ name: string; }' but required in type 'IndexSpecification'.ts(2345)
What key should I set here?
mongoose versions:
mongoose@^5.13.6
@types/mongoose@^5.11.97
Thanks!