We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18b1e78 commit 1284e68Copy full SHA for 1284e68
test/types/models.test.ts
@@ -458,5 +458,5 @@ async function gh12286() {
458
const User = model<IUser>('User', schema);
459
460
const user = await User.findById('0'.repeat(24), { name: 1 }).lean();
461
- expectType<LeanDocument<IUser & { _id: ObjectId; }> | null>(user);
+ expectType<string | undefined>(user?.name);
462
}
0 commit comments