reactjrx 1.67.4 → 1.68.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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +458 -455
- package/dist/lib/queries/client/mutations/observers/MutationObserver.d.ts +7 -4
- package/dist/lib/queries/client/mutations/runner/MutationRunner.d.ts +1 -3
- package/dist/lib/queries/react/mutations/useMutation.switch.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -15,10 +15,13 @@ export declare class MutationObserver<TData = unknown, TError = DefaultError, TV
|
|
|
15
15
|
protected options: MutationObserverOptions<TData, TError, TVariables, TContext>;
|
|
16
16
|
protected numberOfObservers: number;
|
|
17
17
|
protected mutationRunner: MutationRunner<any, any, any, TContext>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @important
|
|
20
|
+
* Used to maintain persistance to latest mutation. This ensure
|
|
21
|
+
* - mutation does not get garbage collected
|
|
22
|
+
* - mutation mutate options are run on finish
|
|
23
|
+
*/
|
|
24
|
+
readonly observed$: Observable<never>;
|
|
22
25
|
readonly result$: Observable<{
|
|
23
26
|
state: MutationObserverResult<TData, TError, TVariables, TContext>;
|
|
24
27
|
options: MutateOptions<TData, TError, TVariables, TContext> | undefined;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ObservedValueOf, Subject, type Observable } from "rxjs";
|
|
2
2
|
import { type DefaultError } from "../../types";
|
|
3
3
|
import { type MutationObserverOptions } from "../observers/types";
|
|
4
4
|
import { type Mutation } from "../mutation/Mutation";
|
|
5
5
|
import { type MutationOptions, type MutationState } from "../mutation/types";
|
|
6
|
-
import { type MapOperator } from "../types";
|
|
7
6
|
export declare class MutationRunner<TData, TError = DefaultError, TVariables = void, TContext = unknown> {
|
|
8
7
|
protected trigger$: Subject<{
|
|
9
8
|
args: TVariables;
|
|
10
9
|
options: MutationOptions<TData, TError, TVariables, TContext>;
|
|
11
10
|
mutation: Mutation<TData, TError, TVariables, TContext>;
|
|
12
11
|
}>;
|
|
13
|
-
protected mapOperator$: BehaviorSubject<MapOperator>;
|
|
14
12
|
state$: Observable<MutationState<TData, TError, TVariables, TContext>>;
|
|
15
13
|
constructor({ __queryFinalizeHook }?: MutationObserverOptions<TData, TError, TVariables, TContext>);
|
|
16
14
|
trigger({ args, options, mutation }: ObservedValueOf<typeof this.trigger$>): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|