Skip to content

Commit

Permalink
Add types test case for Schema.prototype.omit()
Browse files Browse the repository at this point in the history
  • Loading branch information
amitbeck committed Jan 5, 2024
1 parent 7817339 commit f1d42a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/types/schema.test.ts
Expand Up @@ -1379,3 +1379,15 @@ function gh14147() {
const doc = new AffiliateModel();
expectType<bigint>(doc.balance);
}

function gh14235() {
interface IUser {
name: string;
age: number;
}

const userSchema = new Schema<IUser>({ name: String, age: Number });

userSchema.omit<Omit<IUser, 'age'>>(['age']);
}

0 comments on commit f1d42a7

Please sign in to comment.