moost 0.4.20 → 0.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +22 -0
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -595,6 +595,28 @@ declare function useControllerContext<T extends object>(): {
595
595
  * @returns
596
596
  */
597
597
  declare function defineInterceptorFn(fn: TInterceptorFn, priority?: TInterceptorPriority): TInterceptorFn;
598
+ /**
599
+ * Class based interceptor interface
600
+ *
601
+ * Use it to create class-based interceptors and don't forget to make it **@Injectable()**
602
+ *
603
+ * @example
604
+ * "@Injectable()
605
+ * export class MyInterceptor implements TInterceptorClass {
606
+ * static priority = TInterceptorPriority.INTERCEPTOR
607
+ * handler: TInterceptorClass['handler'] = (before, after, onError) => {
608
+ * before((reply) => {
609
+ * console.log('before')
610
+ * })
611
+ * after((response, reply) => {
612
+ * console.log('after')
613
+ * })
614
+ * onError((error, reply) => {
615
+ * console.log('error')
616
+ * })
617
+ * }
618
+ * }
619
+ */
598
620
  type TInterceptorClass = TClassFunction<TInterceptorFn>;
599
621
  /**
600
622
  * ### Define Pipe Function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moost",
3
- "version": "0.4.20",
3
+ "version": "0.4.22",
4
4
  "description": "moost",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -33,10 +33,10 @@
33
33
  "dependencies": {
34
34
  "@prostojs/infact": "^0.2.3",
35
35
  "@prostojs/mate": "^0.3.2",
36
- "@prostojs/logger": "^0.4.0",
37
- "@wooksjs/event-core": "^0.5.13",
36
+ "@prostojs/logger": "^0.4.2",
37
+ "@wooksjs/event-core": "^0.5.16",
38
38
  "hookable": "^5.5.3",
39
- "wooks": "^0.5.13"
39
+ "wooks": "^0.5.16"
40
40
  },
41
41
  "author": "Artem Maltsev",
42
42
  "license": "MIT",