@tanstack/angular-query 5.0.0-rc.4 → 5.0.0-rc.5

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 (69) hide show
  1. package/hydration-state-key.mjs +10 -13
  2. package/hydration-state-key.mjs.map +1 -1
  3. package/index.mjs +8 -20
  4. package/index.mjs.map +1 -1
  5. package/infinite-query-options.d.ts +7 -18
  6. package/infinite-query-options.mjs +6 -5
  7. package/infinite-query-options.mjs.map +1 -1
  8. package/inject-base-query.d.ts +3 -0
  9. package/inject-base-query.mjs +62 -58
  10. package/inject-base-query.mjs.map +1 -1
  11. package/inject-infinite-query.d.ts +7 -11
  12. package/inject-infinite-query.mjs +16 -32
  13. package/inject-infinite-query.mjs.map +1 -1
  14. package/inject-is-fetching.d.ts +1 -1
  15. package/inject-is-fetching.mjs +22 -15
  16. package/inject-is-fetching.mjs.map +1 -1
  17. package/inject-is-mutating.d.ts +1 -1
  18. package/inject-is-mutating.mjs +22 -15
  19. package/inject-is-mutating.mjs.map +1 -1
  20. package/inject-is-restoring.d.ts +2 -0
  21. package/inject-is-restoring.mjs +28 -17
  22. package/inject-is-restoring.mjs.map +1 -1
  23. package/inject-mutation-state.d.ts +9 -0
  24. package/inject-mutation-state.mjs +25 -23
  25. package/inject-mutation-state.mjs.map +1 -1
  26. package/inject-mutation.d.ts +2 -4
  27. package/inject-mutation.mjs +87 -67
  28. package/inject-mutation.mjs.map +1 -1
  29. package/inject-queries.d.ts +1 -3
  30. package/inject-queries.mjs +122 -114
  31. package/inject-queries.mjs.map +1 -1
  32. package/inject-queries.types.d.ts +15 -0
  33. package/inject-query.d.ts +7 -13
  34. package/inject-query.mjs +11 -14
  35. package/inject-query.mjs.map +1 -1
  36. package/internal.mjs +2 -7
  37. package/mutation-options.d.ts +2 -6
  38. package/mutation-options.mjs +6 -5
  39. package/mutation-options.mjs.map +1 -1
  40. package/package.json +2 -2
  41. package/providers.d.ts +16 -14
  42. package/providers.mjs +138 -75
  43. package/providers.mjs.map +1 -1
  44. package/query-options.d.ts +6 -16
  45. package/query-options.mjs +6 -5
  46. package/query-options.mjs.map +1 -1
  47. package/query-resource.d.ts +4 -3
  48. package/query-resource.mjs +72 -63
  49. package/query-resource.mjs.map +1 -1
  50. package/schematics/migrate-from-experimental/index.js +2 -2
  51. package/schematics/ng-add/index.js +1 -1
  52. package/types.d.ts +70 -10
  53. package/utils/inject-external-store.d.ts +3 -0
  54. package/utils/inject-external-store.mjs +54 -38
  55. package/utils/inject-external-store.mjs.map +1 -1
  56. package/utils/inject-pending-tasks-lifecycle.d.ts +13 -1
  57. package/utils/inject-pending-tasks-lifecycle.mjs +32 -29
  58. package/utils/inject-pending-tasks-lifecycle.mjs.map +1 -1
  59. package/utils/inject-query-zone.d.ts +4 -1
  60. package/utils/inject-query-zone.mjs +12 -7
  61. package/utils/inject-query-zone.mjs.map +1 -1
  62. package/utils/resource-types.d.ts +3 -0
  63. package/utils/result-fields.d.ts +9 -0
  64. package/utils/result-fields.mjs +55 -62
  65. package/utils/result-fields.mjs.map +1 -1
  66. package/utils/signal-proxy.d.ts +6 -0
  67. package/utils/signal-proxy.mjs +16 -9
  68. package/utils/signal-proxy.mjs.map +1 -1
  69. package/internal.mjs.map +0 -1
@@ -1,9 +1,14 @@
1
- import { inject, NgZone } from "@angular/core";
1
+ import { NgZone, inject } from "@angular/core";
2
+ //#region src/utils/inject-query-zone.ts
3
+ /**
4
+ * Keeps Query's background timers out of Angular's stability tracking.
5
+ * @returns A function that runs callbacks outside the injected NgZone.
6
+ */
2
7
  function injectQueryZone() {
3
- const ngZone = inject(NgZone);
4
- return (fn) => ngZone.runOutsideAngular(fn);
8
+ const ngZone = inject(NgZone);
9
+ return (fn) => ngZone.runOutsideAngular(fn);
5
10
  }
6
- export {
7
- injectQueryZone
8
- };
9
- //# sourceMappingURL=inject-query-zone.mjs.map
11
+ //#endregion
12
+ export { injectQueryZone };
13
+
14
+ //# sourceMappingURL=inject-query-zone.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"inject-query-zone.mjs","sources":["../../src/utils/inject-query-zone.ts"],"sourcesContent":["import { NgZone, inject } from '@angular/core'\n\n/** Keep Query's background timers out of Angular's stability tracking. */\nexport function injectQueryZone() {\n const ngZone = inject(NgZone)\n return <T>(fn: () => T): T => ngZone.runOutsideAngular(fn)\n}\n"],"names":[],"mappings":";AAGO,SAAS,kBAAkB;AAChC,QAAM,SAAS,OAAO,MAAM;AAC5B,SAAO,CAAI,OAAmB,OAAO,kBAAkB,EAAE;AAC3D;"}
1
+ {"version":3,"file":"inject-query-zone.mjs","names":[],"sources":["../../src/utils/inject-query-zone.ts"],"sourcesContent":["import { NgZone, inject } from '@angular/core'\n\n/**\n * Keeps Query's background timers out of Angular's stability tracking.\n * @returns A function that runs callbacks outside the injected NgZone.\n */\nexport function injectQueryZone() {\n const ngZone = inject(NgZone)\n return <T>(fn: () => T): T => ngZone.runOutsideAngular(fn)\n}\n"],"mappings":";;;;;;AAMA,SAAgB,kBAAkB;CAChC,MAAM,SAAS,OAAO,MAAM;CAC5B,QAAW,OAAmB,OAAO,kBAAkB,EAAE;AAC3D"}
@@ -1,4 +1,7 @@
1
1
  import { ResourceStatus } from '@angular/core';
2
+ /**
3
+ * A discriminated snapshot containing either a resource value or its current error.
4
+ */
2
5
  export type ResourceSnapshot<T> = {
3
6
  readonly status: 'error';
4
7
  readonly error: Error;
@@ -72,9 +72,18 @@ declare const mutationFields: {
72
72
  isSuccess: true;
73
73
  };
74
74
  export declare const queryResultFields: Array<keyof typeof queryFields>;
75
+ /**
76
+ * The query observer value fields exposed as Angular signals.
77
+ */
75
78
  export type QueryResultFields = (typeof queryResultFields)[number];
76
79
  export declare const infiniteQueryResultFields: Array<keyof typeof infiniteQueryFields>;
80
+ /**
81
+ * The paginated query observer value fields exposed as Angular signals.
82
+ */
77
83
  export type InfiniteQueryResultFields = (typeof infiniteQueryResultFields)[number];
78
84
  export declare const mutationResultFields: Array<keyof typeof mutationFields>;
85
+ /**
86
+ * The mutation observer value fields exposed as Angular signals.
87
+ */
79
88
  export type MutationResultFields = (typeof mutationResultFields)[number];
80
89
  export {};
@@ -1,65 +1,58 @@
1
- const queryFields = {
2
- data: true,
3
- dataUpdatedAt: true,
4
- error: true,
5
- errorUpdatedAt: true,
6
- failureCount: true,
7
- failureReason: true,
8
- errorUpdateCount: true,
9
- isError: true,
10
- isFetched: true,
11
- isFetchedAfterMount: true,
12
- isFetching: true,
13
- isLoading: true,
14
- isPending: true,
15
- isLoadingError: true,
16
- isInitialLoading: true,
17
- isPaused: true,
18
- isPlaceholderData: true,
19
- isRefetchError: true,
20
- isRefetching: true,
21
- isStale: true,
22
- isSuccess: true,
23
- isEnabled: true,
24
- status: true,
25
- fetchStatus: true
1
+ //#region src/utils/result-fields.ts
2
+ var queryFields = {
3
+ data: true,
4
+ dataUpdatedAt: true,
5
+ error: true,
6
+ errorUpdatedAt: true,
7
+ failureCount: true,
8
+ failureReason: true,
9
+ errorUpdateCount: true,
10
+ isError: true,
11
+ isFetched: true,
12
+ isFetchedAfterMount: true,
13
+ isFetching: true,
14
+ isLoading: true,
15
+ isPending: true,
16
+ isLoadingError: true,
17
+ isInitialLoading: true,
18
+ isPaused: true,
19
+ isPlaceholderData: true,
20
+ isRefetchError: true,
21
+ isRefetching: true,
22
+ isStale: true,
23
+ isSuccess: true,
24
+ isEnabled: true,
25
+ status: true,
26
+ fetchStatus: true
26
27
  };
27
- const infiniteQueryFields = {
28
- ...queryFields,
29
- hasNextPage: true,
30
- hasPreviousPage: true,
31
- isFetchNextPageError: true,
32
- isFetchingNextPage: true,
33
- isFetchPreviousPageError: true,
34
- isFetchingPreviousPage: true
28
+ var infiniteQueryFields = {
29
+ ...queryFields,
30
+ hasNextPage: true,
31
+ hasPreviousPage: true,
32
+ isFetchNextPageError: true,
33
+ isFetchingNextPage: true,
34
+ isFetchPreviousPageError: true,
35
+ isFetchingPreviousPage: true
35
36
  };
36
- const mutationFields = {
37
- context: true,
38
- data: true,
39
- error: true,
40
- failureCount: true,
41
- failureReason: true,
42
- isPaused: true,
43
- status: true,
44
- variables: true,
45
- submittedAt: true,
46
- isError: true,
47
- isIdle: true,
48
- isPending: true,
49
- isSuccess: true
37
+ var mutationFields = {
38
+ context: true,
39
+ data: true,
40
+ error: true,
41
+ failureCount: true,
42
+ failureReason: true,
43
+ isPaused: true,
44
+ status: true,
45
+ variables: true,
46
+ submittedAt: true,
47
+ isError: true,
48
+ isIdle: true,
49
+ isPending: true,
50
+ isSuccess: true
50
51
  };
51
- const queryResultFields = /* @__PURE__ */ Object.keys(
52
- queryFields
53
- );
54
- const infiniteQueryResultFields = /* @__PURE__ */ Object.keys(
55
- infiniteQueryFields
56
- );
57
- const mutationResultFields = /* @__PURE__ */ Object.keys(
58
- mutationFields
59
- );
60
- export {
61
- infiniteQueryResultFields,
62
- mutationResultFields,
63
- queryResultFields
64
- };
65
- //# sourceMappingURL=result-fields.mjs.map
52
+ var queryResultFields = /* #__PURE__ */ Object.keys(queryFields);
53
+ var infiniteQueryResultFields = /* #__PURE__ */ Object.keys(infiniteQueryFields);
54
+ var mutationResultFields = /* #__PURE__ */ Object.keys(mutationFields);
55
+ //#endregion
56
+ export { infiniteQueryResultFields, mutationResultFields, queryResultFields };
57
+
58
+ //# sourceMappingURL=result-fields.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"result-fields.mjs","sources":["../../src/utils/result-fields.ts"],"sourcesContent":["import type {\n InfiniteQueryObserverResult,\n MutationObserverResult,\n QueryObserverResult,\n} from '@tanstack/query-core'\nimport type { MethodKeys } from './signal-proxy'\n\ntype Fields<T> = { [K in Exclude<keyof T, MethodKeys<T>>]: true }\n\n// Exhaustive maps keep the field surface aligned with query-core at compile time.\nconst queryFields = {\n data: true,\n dataUpdatedAt: true,\n error: true,\n errorUpdatedAt: true,\n failureCount: true,\n failureReason: true,\n errorUpdateCount: true,\n isError: true,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: true,\n isLoading: true,\n isPending: true,\n isLoadingError: true,\n isInitialLoading: true,\n isPaused: true,\n isPlaceholderData: true,\n isRefetchError: true,\n isRefetching: true,\n isStale: true,\n isSuccess: true,\n isEnabled: true,\n status: true,\n fetchStatus: true,\n} satisfies Fields<QueryObserverResult>\n\nconst infiniteQueryFields = {\n ...queryFields,\n hasNextPage: true,\n hasPreviousPage: true,\n isFetchNextPageError: true,\n isFetchingNextPage: true,\n isFetchPreviousPageError: true,\n isFetchingPreviousPage: true,\n} satisfies Fields<InfiniteQueryObserverResult>\n\nconst mutationFields = {\n context: true,\n data: true,\n error: true,\n failureCount: true,\n failureReason: true,\n isPaused: true,\n status: true,\n variables: true,\n submittedAt: true,\n isError: true,\n isIdle: true,\n isPending: true,\n isSuccess: true,\n} satisfies Fields<MutationObserverResult>\n\nexport const queryResultFields = /* @__PURE__ */ Object.keys(\n queryFields,\n) as Array<keyof typeof queryFields>\nexport type QueryResultFields = (typeof queryResultFields)[number]\n\nexport const infiniteQueryResultFields = /* @__PURE__ */ Object.keys(\n infiniteQueryFields,\n) as Array<keyof typeof infiniteQueryFields>\nexport type InfiniteQueryResultFields =\n (typeof infiniteQueryResultFields)[number]\n\nexport const mutationResultFields = /* @__PURE__ */ Object.keys(\n mutationFields,\n) as Array<keyof typeof mutationFields>\nexport type MutationResultFields = (typeof mutationResultFields)[number]\n"],"names":[],"mappings":"AAUA,MAAM,cAAc;AAAA,EAClB,MAAM;AAAA,EACN,eAAe;AAAA,EACf,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,aAAa;AACf;AAEA,MAAM,sBAAsB;AAAA,EAC1B,GAAG;AAAA,EACH,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,0BAA0B;AAAA,EAC1B,wBAAwB;AAC1B;AAEA,MAAM,iBAAiB;AAAA,EACrB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,aAAa;AAAA,EACb,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AACb;AAEO,MAAM,oBAAoC,uBAAO;AAAA,EACtD;AACF;AAGO,MAAM,4BAA4C,uBAAO;AAAA,EAC9D;AACF;AAIO,MAAM,uBAAuC,uBAAO;AAAA,EACzD;AACF;"}
1
+ {"version":3,"file":"result-fields.mjs","names":[],"sources":["../../src/utils/result-fields.ts"],"sourcesContent":["import type {\n InfiniteQueryObserverResult,\n MutationObserverResult,\n QueryObserverResult,\n} from '@tanstack/query-core'\nimport type { MethodKeys } from './signal-proxy'\n\ntype Fields<T> = { [K in Exclude<keyof T, MethodKeys<T>>]: true }\n\n// Exhaustive maps keep the field surface aligned with query-core at compile time.\nconst queryFields = {\n data: true,\n dataUpdatedAt: true,\n error: true,\n errorUpdatedAt: true,\n failureCount: true,\n failureReason: true,\n errorUpdateCount: true,\n isError: true,\n isFetched: true,\n isFetchedAfterMount: true,\n isFetching: true,\n isLoading: true,\n isPending: true,\n isLoadingError: true,\n isInitialLoading: true,\n isPaused: true,\n isPlaceholderData: true,\n isRefetchError: true,\n isRefetching: true,\n isStale: true,\n isSuccess: true,\n isEnabled: true,\n status: true,\n fetchStatus: true,\n} satisfies Fields<QueryObserverResult>\n\nconst infiniteQueryFields = {\n ...queryFields,\n hasNextPage: true,\n hasPreviousPage: true,\n isFetchNextPageError: true,\n isFetchingNextPage: true,\n isFetchPreviousPageError: true,\n isFetchingPreviousPage: true,\n} satisfies Fields<InfiniteQueryObserverResult>\n\nconst mutationFields = {\n context: true,\n data: true,\n error: true,\n failureCount: true,\n failureReason: true,\n isPaused: true,\n status: true,\n variables: true,\n submittedAt: true,\n isError: true,\n isIdle: true,\n isPending: true,\n isSuccess: true,\n} satisfies Fields<MutationObserverResult>\n\nexport const queryResultFields = /* #__PURE__ */ Object.keys(\n queryFields,\n) as Array<keyof typeof queryFields>\n/**\n * The query observer value fields exposed as Angular signals.\n */\nexport type QueryResultFields = (typeof queryResultFields)[number]\n\nexport const infiniteQueryResultFields = /* #__PURE__ */ Object.keys(\n infiniteQueryFields,\n) as Array<keyof typeof infiniteQueryFields>\n/**\n * The paginated query observer value fields exposed as Angular signals.\n */\nexport type InfiniteQueryResultFields =\n (typeof infiniteQueryResultFields)[number]\n\nexport const mutationResultFields = /* #__PURE__ */ Object.keys(\n mutationFields,\n) as Array<keyof typeof mutationFields>\n/**\n * The mutation observer value fields exposed as Angular signals.\n */\nexport type MutationResultFields = (typeof mutationResultFields)[number]\n"],"mappings":";AAUA,IAAM,cAAc;CAClB,MAAM;CACN,eAAe;CACf,OAAO;CACP,gBAAgB;CAChB,cAAc;CACd,eAAe;CACf,kBAAkB;CAClB,SAAS;CACT,WAAW;CACX,qBAAqB;CACrB,YAAY;CACZ,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,kBAAkB;CAClB,UAAU;CACV,mBAAmB;CACnB,gBAAgB;CAChB,cAAc;CACd,SAAS;CACT,WAAW;CACX,WAAW;CACX,QAAQ;CACR,aAAa;AACf;AAEA,IAAM,sBAAsB;CAC1B,GAAG;CACH,aAAa;CACb,iBAAiB;CACjB,sBAAsB;CACtB,oBAAoB;CACpB,0BAA0B;CAC1B,wBAAwB;AAC1B;AAEA,IAAM,iBAAiB;CACrB,SAAS;CACT,MAAM;CACN,OAAO;CACP,cAAc;CACd,eAAe;CACf,UAAU;CACV,QAAQ;CACR,WAAW;CACX,aAAa;CACb,SAAS;CACT,QAAQ;CACR,WAAW;CACX,WAAW;AACb;AAEA,IAAa,oBAAoC,uBAAO,KACtD,WACF;AAMA,IAAa,4BAA4C,uBAAO,KAC9D,mBACF;AAOA,IAAa,uBAAuC,uBAAO,KACzD,cACF"}
@@ -1,7 +1,13 @@
1
1
  import { Signal } from '@angular/core';
2
+ /**
3
+ * Names of object properties whose values are callable.
4
+ */
2
5
  export type MethodKeys<T> = {
3
6
  [K in keyof T]: T[K] extends (...args: Array<any>) => any ? K : never;
4
7
  }[keyof T];
8
+ /**
9
+ * Exposes selected object fields as Angular signals and leaves all other fields unchanged.
10
+ */
5
11
  export type MapToSignals<T, TSignalFields extends keyof any = never> = {
6
12
  [K in keyof T as K extends TSignalFields ? K : never]: Signal<T[K]>;
7
13
  } & {
@@ -1,12 +1,19 @@
1
1
  import { computed } from "@angular/core";
2
+ //#region src/utils/signal-proxy.ts
3
+ /**
4
+ * Maps known result fields to lazy computed signals on an ordinary object.
5
+ * Creating or enumerating the fields never evaluates the source. Imperative
6
+ * methods are defined by each adapter, outside this mapping.
7
+ * @param inputSignal - The source snapshot.
8
+ * @param fields - The fields exposed as signals.
9
+ * @returns An object containing one stable signal per field.
10
+ */
2
11
  function signalProxy(inputSignal, fields) {
3
- const result = {};
4
- for (const field of fields) {
5
- result[field] = computed(() => inputSignal()[field]);
6
- }
7
- return result;
12
+ const result = {};
13
+ for (const field of fields) result[field] = computed(() => inputSignal()[field]);
14
+ return result;
8
15
  }
9
- export {
10
- signalProxy
11
- };
12
- //# sourceMappingURL=signal-proxy.mjs.map
16
+ //#endregion
17
+ export { signalProxy };
18
+
19
+ //# sourceMappingURL=signal-proxy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"signal-proxy.mjs","sources":["../../src/utils/signal-proxy.ts"],"sourcesContent":["import { computed } from '@angular/core'\nimport type { Signal } from '@angular/core'\n\nexport type MethodKeys<T> = {\n [K in keyof T]: T[K] extends (...args: Array<any>) => any ? K : never\n}[keyof T]\n\nexport type MapToSignals<T, TSignalFields extends keyof any = never> = {\n [K in keyof T as K extends TSignalFields ? K : never]: Signal<T[K]>\n} & {\n [K in keyof T as K extends TSignalFields ? never : K]: T[K]\n}\n\n/**\n * Maps known result fields to lazy computed signals on an ordinary object.\n * Creating or enumerating the fields never evaluates the source. Imperative\n * methods are defined by each adapter, outside this mapping.\n * @param inputSignal - The source snapshot.\n * @param fields - The fields exposed as signals.\n * @returns An object containing one stable signal per field.\n */\nexport function signalProxy<T, TField extends keyof T>(\n inputSignal: Signal<T>,\n fields: ReadonlyArray<TField>,\n): { [P in TField]: Signal<T[P]> } {\n const result = {} as { [P in TField]: Signal<T[P]> }\n for (const field of fields) {\n result[field] = computed(() => inputSignal()[field])\n }\n return result\n}\n"],"names":[],"mappings":";AAqBO,SAAS,YACd,aACA,QACiC;AACjC,QAAM,SAAS,CAAA;AACf,aAAW,SAAS,QAAQ;AAC1B,WAAO,KAAK,IAAI,SAAS,MAAM,YAAA,EAAc,KAAK,CAAC;AAAA,EACrD;AACA,SAAO;AACT;"}
1
+ {"version":3,"file":"signal-proxy.mjs","names":[],"sources":["../../src/utils/signal-proxy.ts"],"sourcesContent":["import { computed } from '@angular/core'\nimport type { Signal } from '@angular/core'\n\n/**\n * Names of object properties whose values are callable.\n */\nexport type MethodKeys<T> = {\n [K in keyof T]: T[K] extends (...args: Array<any>) => any ? K : never\n}[keyof T]\n\n/**\n * Exposes selected object fields as Angular signals and leaves all other fields unchanged.\n */\nexport type MapToSignals<T, TSignalFields extends keyof any = never> = {\n [K in keyof T as K extends TSignalFields ? K : never]: Signal<T[K]>\n} & {\n [K in keyof T as K extends TSignalFields ? never : K]: T[K]\n}\n\n/**\n * Maps known result fields to lazy computed signals on an ordinary object.\n * Creating or enumerating the fields never evaluates the source. Imperative\n * methods are defined by each adapter, outside this mapping.\n * @param inputSignal - The source snapshot.\n * @param fields - The fields exposed as signals.\n * @returns An object containing one stable signal per field.\n */\nexport function signalProxy<T, TField extends keyof T>(\n inputSignal: Signal<T>,\n fields: ReadonlyArray<TField>,\n): { [P in TField]: Signal<T[P]> } {\n const result = {} as { [P in TField]: Signal<T[P]> }\n for (const field of fields) {\n result[field] = computed(() => inputSignal()[field])\n }\n return result\n}\n"],"mappings":";;;;;;;;;;AA2BA,SAAgB,YACd,aACA,QACiC;CACjC,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,SAAS,QAClB,OAAO,SAAS,eAAe,YAAY,CAAC,CAAC,MAAM;CAErD,OAAO;AACT"}
package/internal.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}