|
1 | 1 | declare module 'mongoose' {
|
| 2 | + import Kareem = require('kareem'); |
2 | 3 |
|
3 | 4 | type MongooseQueryAndDocumentMiddleware = 'updateOne' | 'deleteOne';
|
4 | 5 |
|
@@ -37,13 +38,13 @@ declare module 'mongoose' {
|
37 | 38 | this: ThisType,
|
38 | 39 | next: CallbackWithoutResultAndOptionalError,
|
39 | 40 | opts?: Record<string, any>
|
40 |
| - ) => void | Promise<void> | SkipWrappedFunction; |
| 41 | + ) => void | Promise<void> | Kareem.SkipWrappedFunction; |
41 | 42 | type PreSaveMiddlewareFunction<ThisType = any> = (
|
42 | 43 | this: ThisType,
|
43 | 44 | next: CallbackWithoutResultAndOptionalError,
|
44 | 45 | opts: SaveOptions
|
45 |
| - ) => void | Promise<void> | SkipWrappedFunction; |
46 |
| - type PostMiddlewareFunction<ThisType = any, ResType = any> = (this: ThisType, res: ResType, next: CallbackWithoutResultAndOptionalError) => void | Promise<void> | OverwriteMiddlewareResult; |
| 46 | + ) => void | Promise<void> | Kareem.SkipWrappedFunction; |
| 47 | + type PostMiddlewareFunction<ThisType = any, ResType = any> = (this: ThisType, res: ResType, next: CallbackWithoutResultAndOptionalError) => void | Promise<void> | Kareem.OverwriteMiddlewareResult; |
47 | 48 | type ErrorHandlingMiddlewareFunction<ThisType = any, ResType = any> = (this: ThisType, err: NativeError, res: ResType, next: CallbackWithoutResultAndOptionalError) => void;
|
48 |
| - type ErrorHandlingMiddlewareWithOption<ThisType = any, ResType = any> = (this: ThisType, err: NativeError, res: ResType | null, next: CallbackWithoutResultAndOptionalError) => void | Promise<void> | OverwriteMiddlewareResult; |
| 49 | + type ErrorHandlingMiddlewareWithOption<ThisType = any, ResType = any> = (this: ThisType, err: NativeError, res: ResType | null, next: CallbackWithoutResultAndOptionalError) => void | Promise<void> | Kareem.OverwriteMiddlewareResult; |
49 | 50 | }
|
0 commit comments