Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: fix tests
  • Loading branch information
vkarpov15 committed May 13, 2024
commit 713c9ba2ec153d7df8a4bb1429255d9ffb057a26
10 changes: 8 additions & 2 deletions test/types/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1503,5 +1503,11 @@ function gh13772() {
};
const schema = new Schema(schemaDefinition);
type RawDocType = InferRawDocType<typeof schemaDefinition>;
expectAssignable<{ name?: string, docArr?: Array<{ name?: string }> }>({} as RawDocType);
}
expectAssignable<
{ name?: string | null, docArr?: Array<{ name?: string | null }> }
>({} as RawDocType);

const TestModel = model('User', schema);
const doc = new TestModel();
expectAssignable<RawDocType>(doc.toObject());
}