Skip to content

Commit

Permalink
Merge pull request #12585 from naorpeled/feat/types/add-missing-const…
Browse files Browse the repository at this point in the history
…ructor-override-type

feat(types/models): add missing create constructor signature override type
  • Loading branch information
vkarpov15 authored Oct 24, 2022
2 parents 2f01f16 + d082a8d commit bd034fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/models.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ declare module 'mongoose' {

/** Creates a new document or documents */
create<DocContents = AnyKeys<T>>(docs: Array<T | DocContents>, options?: SaveOptions): Promise<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>[]>;
create<DocContents = AnyKeys<T>>(docs: Array<T | DocContents>, callback: Callback<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>[]>): void;
create<DocContents = AnyKeys<T>>(docs: Array<T | DocContents>, options?: SaveOptions, callback?: Callback<Array<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>>>): Promise<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>[]>;
create<DocContents = AnyKeys<T>>(docs: Array<T | DocContents>, callback: Callback<Array<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>>>): void;
create<DocContents = AnyKeys<T>>(doc: DocContents | T): Promise<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>>;
create<DocContents = AnyKeys<T>>(...docs: Array<T | DocContents>): Promise<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>[]>;
create<DocContents = AnyKeys<T>>(doc: T | DocContents, callback: Callback<HydratedDocument<T, TMethodsAndOverrides, TVirtuals>>): void;
Expand Down

0 comments on commit bd034fa

Please sign in to comment.