Skip to content

Commit 55b3614

Browse files
authored
Merge pull request #15769 from THE-Amrit-mahto-05/fix-tsd-bulkwrite-error
test(tsd): assert validationErrors type error in bulkWrite #15768
2 parents ca36b12 + e5e8d4b commit 55b3614

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

docs/source/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function processFile(props) {
269269
if ('constructor' in ctx && ctx.constructor === undefined) {
270270
ctx.constructorWasUndefined = true;
271271
}
272-
272+
if (!prop.tags) continue;
273273
for (const __tag of prop.tags) {
274274
// the following has been done, because otherwise no type could be applied for intellisense
275275
/** @type {TagObject} */

test/types/connection.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,6 @@ async function gh15359() {
167167
{ model: 'Test', name: 'updateOne', filter: { name: 'test4' }, update: { $set: { num: 'not a number' } } }
168168
], { ordered: false });
169169
expectType<number>(res3.insertedCount);
170+
expectError(res3.validationErrors);
170171
expectType<Error[] | undefined>(res3.mongoose?.validationErrors);
171172
}

test/types/document.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ function gh11085(): void {
166166

167167
const newUser = new UserModel();
168168

169-
let _id: number;
170-
expectError(_id = newUser._id);
171169
const _id2: Types.ObjectId = newUser._id;
172170
}
173171

0 commit comments

Comments
 (0)