@tanstack/query-core 5.103.3 → 5.104.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.
Files changed (78) hide show
  1. package/build/legacy/environmentManager.d.cts +3 -4
  2. package/build/legacy/environmentManager.d.cts.map +1 -1
  3. package/build/legacy/environmentManager.d.ts +3 -4
  4. package/build/legacy/environmentManager.d.ts.map +1 -1
  5. package/build/legacy/focusManager.d.cts +2 -3
  6. package/build/legacy/focusManager.d.cts.map +1 -1
  7. package/build/legacy/focusManager.d.ts +2 -3
  8. package/build/legacy/focusManager.d.ts.map +1 -1
  9. package/build/legacy/infiniteQueryBehavior.d.cts +3 -4
  10. package/build/legacy/infiniteQueryBehavior.d.cts.map +1 -1
  11. package/build/legacy/infiniteQueryBehavior.d.ts +3 -4
  12. package/build/legacy/infiniteQueryBehavior.d.ts.map +1 -1
  13. package/build/legacy/infiniteQueryObserver.d.cts +1 -2
  14. package/build/legacy/infiniteQueryObserver.d.cts.map +1 -1
  15. package/build/legacy/infiniteQueryObserver.d.ts +1 -2
  16. package/build/legacy/infiniteQueryObserver.d.ts.map +1 -1
  17. package/build/legacy/notifyManager.d.cts +3 -4
  18. package/build/legacy/notifyManager.d.cts.map +1 -1
  19. package/build/legacy/notifyManager.d.ts +3 -4
  20. package/build/legacy/notifyManager.d.ts.map +1 -1
  21. package/build/legacy/onlineManager.d.cts +2 -3
  22. package/build/legacy/onlineManager.d.cts.map +1 -1
  23. package/build/legacy/onlineManager.d.ts +2 -3
  24. package/build/legacy/onlineManager.d.ts.map +1 -1
  25. package/build/legacy/queriesObserver.d.cts +2 -3
  26. package/build/legacy/queriesObserver.d.cts.map +1 -1
  27. package/build/legacy/queriesObserver.d.ts +2 -3
  28. package/build/legacy/queriesObserver.d.ts.map +1 -1
  29. package/build/legacy/streamedQuery.cjs.map +1 -1
  30. package/build/legacy/streamedQuery.d.cts +1 -2
  31. package/build/legacy/streamedQuery.d.cts.map +1 -1
  32. package/build/legacy/streamedQuery.d.ts +1 -2
  33. package/build/legacy/streamedQuery.d.ts.map +1 -1
  34. package/build/legacy/streamedQuery.js.map +1 -1
  35. package/build/legacy/timeoutManager.d.cts +7 -8
  36. package/build/legacy/timeoutManager.d.cts.map +1 -1
  37. package/build/legacy/timeoutManager.d.ts +7 -8
  38. package/build/legacy/timeoutManager.d.ts.map +1 -1
  39. package/build/modern/environmentManager.d.cts +3 -4
  40. package/build/modern/environmentManager.d.cts.map +1 -1
  41. package/build/modern/environmentManager.d.ts +3 -4
  42. package/build/modern/environmentManager.d.ts.map +1 -1
  43. package/build/modern/focusManager.d.cts +2 -3
  44. package/build/modern/focusManager.d.cts.map +1 -1
  45. package/build/modern/focusManager.d.ts +2 -3
  46. package/build/modern/focusManager.d.ts.map +1 -1
  47. package/build/modern/infiniteQueryBehavior.d.cts +3 -4
  48. package/build/modern/infiniteQueryBehavior.d.cts.map +1 -1
  49. package/build/modern/infiniteQueryBehavior.d.ts +3 -4
  50. package/build/modern/infiniteQueryBehavior.d.ts.map +1 -1
  51. package/build/modern/infiniteQueryObserver.d.cts +1 -2
  52. package/build/modern/infiniteQueryObserver.d.cts.map +1 -1
  53. package/build/modern/infiniteQueryObserver.d.ts +1 -2
  54. package/build/modern/infiniteQueryObserver.d.ts.map +1 -1
  55. package/build/modern/notifyManager.d.cts +3 -4
  56. package/build/modern/notifyManager.d.cts.map +1 -1
  57. package/build/modern/notifyManager.d.ts +3 -4
  58. package/build/modern/notifyManager.d.ts.map +1 -1
  59. package/build/modern/onlineManager.d.cts +2 -3
  60. package/build/modern/onlineManager.d.cts.map +1 -1
  61. package/build/modern/onlineManager.d.ts +2 -3
  62. package/build/modern/onlineManager.d.ts.map +1 -1
  63. package/build/modern/queriesObserver.d.cts +2 -3
  64. package/build/modern/queriesObserver.d.cts.map +1 -1
  65. package/build/modern/queriesObserver.d.ts +2 -3
  66. package/build/modern/queriesObserver.d.ts.map +1 -1
  67. package/build/modern/streamedQuery.cjs.map +1 -1
  68. package/build/modern/streamedQuery.d.cts +1 -2
  69. package/build/modern/streamedQuery.d.cts.map +1 -1
  70. package/build/modern/streamedQuery.d.ts +1 -2
  71. package/build/modern/streamedQuery.d.ts.map +1 -1
  72. package/build/modern/streamedQuery.js.map +1 -1
  73. package/build/modern/timeoutManager.d.cts +7 -8
  74. package/build/modern/timeoutManager.d.cts.map +1 -1
  75. package/build/modern/timeoutManager.d.ts +7 -8
  76. package/build/modern/timeoutManager.d.ts.map +1 -1
  77. package/package.json +1 -1
  78. package/src/streamedQuery.ts +1 -0
@@ -7,14 +7,14 @@
7
7
  * If we don't accept a single void argument, then
8
8
  * `new Promise(resolve => timeoutManager.setTimeout(resolve, N))` is a type error.
9
9
  */
10
- type TimeoutCallback = (_: void) => void;
10
+ export type TimeoutCallback = (_: void) => void;
11
11
  /**
12
12
  * Wrapping `setTimeout` is awkward from a typing perspective because platform
13
13
  * typings may extend the return type of `setTimeout`. For example, NodeJS
14
14
  * typings add `NodeJS.Timeout`; but a non-default `timeoutManager` may not be
15
15
  * able to return such a type.
16
16
  */
17
- type ManagedTimerId = number | {
17
+ export type ManagedTimerId = number | {
18
18
  [Symbol.toPrimitive]: () => number;
19
19
  };
20
20
  /**
@@ -26,13 +26,13 @@ type ManagedTimerId = number | {
26
26
  * `setTimeout`/`setInterval`) does not do. A custom provider can implement coalescing, and can
27
27
  * also support delays longer than the ~24-day maximum of the global `setTimeout`.
28
28
  */
29
- type TimeoutProvider<TTimerId extends ManagedTimerId = ManagedTimerId> = {
29
+ export type TimeoutProvider<TTimerId extends ManagedTimerId = ManagedTimerId> = {
30
30
  readonly setTimeout: (callback: TimeoutCallback, delay: number) => TTimerId;
31
31
  readonly clearTimeout: (timeoutId: TTimerId | undefined) => void;
32
32
  readonly setInterval: (callback: TimeoutCallback, delay: number) => TTimerId;
33
33
  readonly clearInterval: (intervalId: TTimerId | undefined) => void;
34
34
  };
35
- declare const defaultTimeoutProvider: TimeoutProvider;
35
+ export declare const defaultTimeoutProvider: TimeoutProvider;
36
36
  /**
37
37
  * Allows customization of how timeouts are created.
38
38
  *
@@ -44,7 +44,7 @@ declare const defaultTimeoutProvider: TimeoutProvider;
44
44
  * If you hit this limitation, consider providing a custom TimeoutProvider that
45
45
  * coalesces timeouts.
46
46
  */
47
- declare class TimeoutManager implements Omit<TimeoutProvider, 'name'> {
47
+ export declare class TimeoutManager implements Omit<TimeoutProvider, 'name'> {
48
48
  #private;
49
49
  /**
50
50
  * `setTimeoutProvider` can be used to set a custom implementation of the
@@ -151,7 +151,7 @@ declare class TimeoutManager implements Omit<TimeoutProvider, 'name'> {
151
151
  /**
152
152
  * Singleton instance of {@link TimeoutManager}, used throughout TanStack Query to schedule and cancel timers.
153
153
  */
154
- declare const timeoutManager: TimeoutManager;
154
+ export declare const timeoutManager: TimeoutManager;
155
155
  /**
156
156
  * In many cases code wants to delay to the next event loop tick; this is not
157
157
  * mediated by {@link timeoutManager}.
@@ -159,7 +159,6 @@ declare const timeoutManager: TimeoutManager;
159
159
  * This function is provided to make auditing the `tanstack/query-core` for
160
160
  * incorrect use of system `setTimeout` easier.
161
161
  */
162
- declare function systemSetTimeoutZero(callback: TimeoutCallback): void;
162
+ export declare function systemSetTimeoutZero(callback: TimeoutCallback): void;
163
163
  //#endregion
164
- export { ManagedTimerId, TimeoutCallback, TimeoutManager, TimeoutProvider, defaultTimeoutProvider, systemSetTimeoutZero, timeoutManager };
165
164
  //# sourceMappingURL=timeoutManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeoutManager.d.ts","names":[],"sources":["../../src/timeoutManager.ts"],"mappings":";;;;;;;;;KAQY,mBAAmB;;;;;;;KAQnB;GAA6B,OAAO;;;;;;;;;;;KAWpC,gBAAgB,iBAAiB,iBAAiB;WAEjD,aAAa,UAAU,iBAAiB,kBAAkB;WAC1D,eAAe,WAAW;WAE1B,cAAc,UAAU,iBAAiB,kBAAkB;WAC3D,gBAAgB,YAAY;;cAK5B,wBAAwB;;;;;;;;;;;;cA+BxB,0BAA0B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoC1C,mBAAmB,iBAAiB,gBAClC,UAAU,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAgD5B,WAAW,UAAU,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;EAwBtD,aAAa,WAAW;;;;;;;;;;;;;;;;;;EAqBxB,YAAY,UAAU,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;EAwBvD,cAAc,YAAY;;;;;cAQf,gBAAc;;;;;;;;iBASX,qBAAqB,UAAU"}
1
+ {"version":3,"file":"timeoutManager.d.ts","names":[],"sources":["../../src/timeoutManager.ts"],"mappings":";;;;;;;;;YAQY,mBAAmB;;;;;;;YAQnB;GAA6B,OAAO;;;;;;;;;;;YAWpC,gBAAgB,iBAAiB,iBAAiB;WAEjD,aAAa,UAAU,iBAAiB,kBAAkB;WAC1D,eAAe,WAAW;WAE1B,cAAc,UAAU,iBAAiB,kBAAkB;WAC3D,gBAAgB,YAAY;;qBAK5B,wBAAwB;;;;;;;;;;;;qBA+BxB,0BAA0B,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoC1C,mBAAmB,iBAAiB,gBAClC,UAAU,gBAAgB;;;;;;;;;;;;;;;;;;;;;EAgD5B,WAAW,UAAU,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;EAwBtD,aAAa,WAAW;;;;;;;;;;;;;;;;;;EAqBxB,YAAY,UAAU,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;EAwBvD,cAAc,YAAY;;;;;qBAQf,gBAAc;;;;;;;;wBASX,qBAAqB,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-core",
3
- "version": "5.103.3",
3
+ "version": "5.104.0",
4
4
  "description": "The framework agnostic core that powers TanStack Query",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -93,6 +93,7 @@ export function streamedQuery<
93
93
 
94
94
  let result = initialValue
95
95
 
96
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
96
97
  let cancelled: boolean = false as boolean
97
98
  const streamFnContext = addConsumeAwareSignal<
98
99
  OmitKeyof<typeof context, 'signal'>