Skip to content

Commit

Permalink
test(types): add type test re: #11997
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrahmanHafez committed Jun 28, 2022
1 parent 16b17cc commit 6a068ee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/types/schema.test.ts
Expand Up @@ -559,3 +559,13 @@ function gh11828() {
}
});
}
function gh11997() {
interface IUser {
name: string;
}

const userSchema = new Schema<IUser>({
name: { type: String, default: () => 'Hafez' }
});
userSchema.index({ name: 1 }, { weights: { name: 1 } });
}

0 comments on commit 6a068ee

Please sign in to comment.