File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -83,5 +83,5 @@ function gh13755() {
83
83
84
84
const TestModel = model ( 'Test' , testSchema ) ;
85
85
const doc = new TestModel ( ) ;
86
- expectType < Map < string , string > | undefined > ( doc . instance ) ;
86
+ expectType < Map < string , string > | undefined | null > ( doc . instance ) ;
87
87
}
Original file line number Diff line number Diff line change @@ -744,9 +744,9 @@ function gh13957() {
744
744
}
745
745
746
746
interface ITest {
747
- name ? : string
747
+ name : string
748
748
}
749
- const schema = new Schema ( { name : String } ) ;
749
+ const schema = new Schema ( { name : { type : String , required : true } } ) ;
750
750
const TestModel = model ( 'Test' , schema ) ;
751
751
const repository = new RepositoryBase < ITest > ( TestModel ) ;
752
752
expectType < Promise < ITest [ ] > > ( repository . insertMany ( [ { name : 'test' } ] ) ) ;
You can’t perform that action at this time.
0 commit comments