|
| 1 | +declare module "kareem" { |
| 2 | + export default class Kareem { |
| 3 | + static skipWrappedFunction(): SkipWrappedFunction; |
| 4 | + static overwriteMiddlewareResult(): OverwriteMiddlewareResult; |
| 5 | + |
| 6 | + pre(name: string | RegExp, fn: Function): this; |
| 7 | + pre(name: string | RegExp, options: Record<string, any>, fn: Function, error?: any, unshift?: boolean): this; |
| 8 | + post(name: string | RegExp, fn: Function): this; |
| 9 | + post(name: string | RegExp, options: Record<string, any>, fn: Function, unshift?: boolean): this; |
| 10 | + |
| 11 | + clone(): Kareem; |
| 12 | + merge(other: Kareem, clone?: boolean): this; |
| 13 | + |
| 14 | + createWrapper(name: string, fn: Function, context?: any, options?: Record<string, any>): Function; |
| 15 | + createWrapperSync(name: string, fn: Function): Function; |
| 16 | + hasHooks(name: string): boolean; |
| 17 | + filter(fn: Function): Kareem; |
| 18 | + |
| 19 | + wrap(name: string, fn: Function, context: any, args: any[], options?: Record<string, any>): Function; |
| 20 | + |
| 21 | + execPostSync(name: string, context: any, args: any[]): any; |
| 22 | + execPost(name: string, context: any, args: any[], options?: Record<string, any>, callback?: Function): void; |
| 23 | + execPreSync(name: string, context: any, args: any[]): any; |
| 24 | + execPre(name: string, context: any, args: any[], callback?: Function): void; |
| 25 | + } |
| 26 | + |
| 27 | + class SkipWrappedFunction {} |
| 28 | + class OverwriteMiddlewareResult {} |
| 29 | +} |
0 commit comments