@tanstack/query-core 4.39.2 → 4.40.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/build/lib/types.d.ts +19 -0
- package/package.json +1 -1
- package/src/types.ts +19 -0
package/build/lib/types.d.ts
CHANGED
|
@@ -385,6 +385,9 @@ export declare type MutateFunction<TData = unknown, TError = unknown, TVariables
|
|
|
385
385
|
export interface MutationObserverBaseResult<TData = unknown, TError = unknown, TVariables = void, TContext = unknown> extends MutationState<TData, TError, TVariables, TContext> {
|
|
386
386
|
isError: boolean;
|
|
387
387
|
isIdle: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
390
|
+
*/
|
|
388
391
|
isLoading: boolean;
|
|
389
392
|
isPending: boolean;
|
|
390
393
|
isSuccess: boolean;
|
|
@@ -396,7 +399,11 @@ export interface MutationObserverIdleResult<TData = unknown, TError = unknown, T
|
|
|
396
399
|
error: null;
|
|
397
400
|
isError: false;
|
|
398
401
|
isIdle: true;
|
|
402
|
+
/**
|
|
403
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
404
|
+
*/
|
|
399
405
|
isLoading: false;
|
|
406
|
+
isPending: false;
|
|
400
407
|
isSuccess: false;
|
|
401
408
|
status: 'idle';
|
|
402
409
|
}
|
|
@@ -405,7 +412,11 @@ export interface MutationObserverLoadingResult<TData = unknown, TError = unknown
|
|
|
405
412
|
error: null;
|
|
406
413
|
isError: false;
|
|
407
414
|
isIdle: false;
|
|
415
|
+
/**
|
|
416
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
417
|
+
*/
|
|
408
418
|
isLoading: true;
|
|
419
|
+
isPending: true;
|
|
409
420
|
isSuccess: false;
|
|
410
421
|
status: 'loading';
|
|
411
422
|
}
|
|
@@ -414,7 +425,11 @@ export interface MutationObserverErrorResult<TData = unknown, TError = unknown,
|
|
|
414
425
|
error: TError;
|
|
415
426
|
isError: true;
|
|
416
427
|
isIdle: false;
|
|
428
|
+
/**
|
|
429
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
430
|
+
*/
|
|
417
431
|
isLoading: false;
|
|
432
|
+
isPending: false;
|
|
418
433
|
isSuccess: false;
|
|
419
434
|
status: 'error';
|
|
420
435
|
}
|
|
@@ -423,7 +438,11 @@ export interface MutationObserverSuccessResult<TData = unknown, TError = unknown
|
|
|
423
438
|
error: null;
|
|
424
439
|
isError: false;
|
|
425
440
|
isIdle: false;
|
|
441
|
+
/**
|
|
442
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
443
|
+
*/
|
|
426
444
|
isLoading: false;
|
|
445
|
+
isPending: false;
|
|
427
446
|
isSuccess: true;
|
|
428
447
|
status: 'success';
|
|
429
448
|
}
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -669,6 +669,9 @@ export interface MutationObserverBaseResult<
|
|
|
669
669
|
> extends MutationState<TData, TError, TVariables, TContext> {
|
|
670
670
|
isError: boolean
|
|
671
671
|
isIdle: boolean
|
|
672
|
+
/**
|
|
673
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
674
|
+
*/
|
|
672
675
|
isLoading: boolean
|
|
673
676
|
isPending: boolean
|
|
674
677
|
isSuccess: boolean
|
|
@@ -686,7 +689,11 @@ export interface MutationObserverIdleResult<
|
|
|
686
689
|
error: null
|
|
687
690
|
isError: false
|
|
688
691
|
isIdle: true
|
|
692
|
+
/**
|
|
693
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
694
|
+
*/
|
|
689
695
|
isLoading: false
|
|
696
|
+
isPending: false
|
|
690
697
|
isSuccess: false
|
|
691
698
|
status: 'idle'
|
|
692
699
|
}
|
|
@@ -701,7 +708,11 @@ export interface MutationObserverLoadingResult<
|
|
|
701
708
|
error: null
|
|
702
709
|
isError: false
|
|
703
710
|
isIdle: false
|
|
711
|
+
/**
|
|
712
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
713
|
+
*/
|
|
704
714
|
isLoading: true
|
|
715
|
+
isPending: true
|
|
705
716
|
isSuccess: false
|
|
706
717
|
status: 'loading'
|
|
707
718
|
}
|
|
@@ -716,7 +727,11 @@ export interface MutationObserverErrorResult<
|
|
|
716
727
|
error: TError
|
|
717
728
|
isError: true
|
|
718
729
|
isIdle: false
|
|
730
|
+
/**
|
|
731
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
732
|
+
*/
|
|
719
733
|
isLoading: false
|
|
734
|
+
isPending: false
|
|
720
735
|
isSuccess: false
|
|
721
736
|
status: 'error'
|
|
722
737
|
}
|
|
@@ -731,7 +746,11 @@ export interface MutationObserverSuccessResult<
|
|
|
731
746
|
error: null
|
|
732
747
|
isError: false
|
|
733
748
|
isIdle: false
|
|
749
|
+
/**
|
|
750
|
+
* @deprecated This property will be removed in the next major version. Use `isPending` instead.
|
|
751
|
+
*/
|
|
734
752
|
isLoading: false
|
|
753
|
+
isPending: false
|
|
735
754
|
isSuccess: true
|
|
736
755
|
status: 'success'
|
|
737
756
|
}
|