angular-three 1.0.1 → 1.1.0

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.
@@ -7,6 +7,30 @@ type EffectFn<TValue> = (value: TValue) => void | undefined | ((cleanUpParams: {
7
7
  complete: boolean;
8
8
  error: boolean;
9
9
  }) => void);
10
+ /**
11
+ * An extended `tap` operator that accepts an `effectFn` which:
12
+ * - runs on every `next` notification from `source$`
13
+ * - can optionally return a `cleanUp` function that
14
+ * invokes from the 2nd `next` notification onward and on `unsubscribe` (destroyed)
15
+ *
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * source$.pipe(
20
+ * tapEffect((sourceValue) = {
21
+ * const cb = () => {
22
+ * doStuff(sourceValue);
23
+ * };
24
+ * addListener('event', cb);
25
+ *
26
+ * return () => {
27
+ * removeListener('event', cb);
28
+ * }
29
+ * })
30
+ * )
31
+ * ```
32
+ */
33
+ export declare function tapEffect<TValue>(effectFn: EffectFn<TValue>): MonoTypeOperatorFunction<TValue>;
10
34
  export declare class NgtRxStore<TState extends object = any, TRxState extends object = TState & Record<string, any>> extends RxState<TRxState> {
11
35
  constructor();
12
36
  protected initialize(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-three",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -6,5 +6,5 @@
6
6
  },
7
7
  "main": "./src/index.js",
8
8
  "types": "./src/index.d.ts",
9
- "version": "1.0.1"
9
+ "version": "1.1.0"
10
10
  }