Skip to content
Closed
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: quick tweak
  • Loading branch information
vkarpov15 committed Sep 12, 2023
commit 0e77ec94ba74906888f479f4159d6b9ef0e54ebc
13 changes: 2 additions & 11 deletions test/types/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1166,21 +1166,12 @@ function defaultFn() {
name: String,
email: {
type: String,
default() {
// Requires `this: any` even in 7.0.
default(this: any) {
return this.name + '@test.com';
}
}
});
type X = ObtainSchemaGeneric<typeof schema, 'DocType'>;
const x: X = {
name: String,
email: {
type: String,
default() {
return this.name + '@test.com';
}
}
}
const Test = model('Test', schema);

const doc = new Test({ name: 'john' });
Expand Down