Skip to content

Commit c43fae1

Browse files
authored
Refactor testSchema to remove interface ITest
1 parent 4518f03 commit c43fae1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/types/middleware.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,11 @@ function gh11257() {
192192
}
193193

194194
function gh13601() {
195-
interface ITest extends Document {
196-
name?: string;
197-
}
198-
199-
const testSchema = new Schema<ITest>({
195+
const testSchema = new Schema({
200196
name: String
201197
});
202198

203-
testSchema.pre('deleteOne', { document: true }, function(this: ITest) {
199+
testSchema.pre('deleteOne', { document: true }, function() {
204200
expectAssignable<Document>(this);
205201
});
206202
}

0 commit comments

Comments
 (0)