Skip to content

Commit

Permalink
perf(types): make $assertPopulated() not use this, because `Omit<…
Browse files Browse the repository at this point in the history
…this, ...>` causes perf issues

Re: #10349
  • Loading branch information
vkarpov15 committed Aug 1, 2022
1 parent ce4a4bf commit 77d2c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/document.d.ts
Expand Up @@ -26,7 +26,7 @@ declare module 'mongoose' {
__v?: any;

/** Assert that a given path or paths is populated. Throws an error if not populated. */
$assertPopulated<Paths = {}>(paths: string | string[]): Omit<this, keyof Paths> & Paths;
$assertPopulated<Paths = {}>(paths: string | string[]): Omit<DocType, keyof Paths> & Paths;

/* Get all subdocs (by bfs) */
$getAllSubdocs(): Document[];
Expand Down

0 comments on commit 77d2c70

Please sign in to comment.