@warp-drive/core 5.7.0-alpha.27 → 5.7.0-alpha.28
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/declarations/graph/-private/-diff.d.ts +0 -13
- package/declarations/graph/-private/-edge-definition.d.ts +1 -10
- package/declarations/graph/-private/edges/resource.d.ts +1 -2
- package/declarations/reactive/-private/record.d.ts +2 -16
- package/declarations/reactive/-private/schema.d.ts +1 -67
- package/declarations/request/-private/manager.d.ts +21 -19
- package/declarations/request/-private/types.d.ts +1 -3
- package/declarations/store/-private/caches/instance-cache.d.ts +1 -1
- package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +13 -6
- package/declarations/store/-private/managers/cache-key-manager.d.ts +18 -35
- package/declarations/store/-private/managers/notification-manager.d.ts +9 -17
- package/declarations/store/-private/managers/record-array-manager.d.ts +21 -68
- package/declarations/store/-private/network/request-cache.d.ts +12 -12
- package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +3 -41
- package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +8 -29
- package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +5 -3
- package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +2 -110
- package/declarations/store/-private/record-arrays/-utils.d.ts +0 -2
- package/declarations/store/-private/record-arrays/legacy-live-array.d.ts +1 -9
- package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +5 -11
- package/declarations/store/-private/record-arrays/legacy-query.d.ts +1 -23
- package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +1 -124
- package/declarations/store/-private/record-arrays/resource-array.d.ts +3 -10
- package/declarations/store/-private/store-service.d.ts +77 -65
- package/declarations/store/-private.d.ts +4 -1
- package/declarations/store/-types/q/record-instance.d.ts +0 -1
- package/declarations/store/deprecated/-private.d.ts +0 -11
- package/declarations/types/identifier.d.ts +0 -8
- package/declarations/types/spec/json-api-raw.d.ts +6 -8
- package/declarations/utils/string.d.ts +2 -2
- package/dist/{configure-B48bFHOl.js → configure-CiFDHArV.js} +4 -4
- package/dist/configure.js +1 -1
- package/dist/graph/-private.js +2 -5
- package/dist/index.js +10 -2
- package/dist/reactive.js +5 -5
- package/dist/{request-state-DAjbHWcs.js → request-state-B908BvPK.js} +182 -36
- package/dist/store/-private.js +2 -2
- package/dist/types/-private.js +1 -1
- package/dist/utils/string.js +2 -2
- package/package.json +3 -3
|
@@ -1,44 +1,6 @@
|
|
|
1
1
|
export declare const ARRAY_SIGNAL: "___(unique) Symbol(#[])";
|
|
2
2
|
export declare const OBJECT_SIGNAL: "___(unique) Symbol(#{})";
|
|
3
3
|
/**
|
|
4
|
-
* Requirements:
|
|
5
|
-
*
|
|
6
|
-
* Signal:
|
|
7
|
-
*
|
|
8
|
-
* - signal: a way of creating a reference that we can dirty when we desire to notify
|
|
9
|
-
* - @signal: a way of creating an accessor on an object that subscribes to a signal on access
|
|
10
|
-
* and notifies the signal on set, or of upgrading a descriptor to be such an accessor
|
|
11
|
-
* - defineSignal: a way of creating a signal on an object
|
|
12
|
-
* - notifySignal: a way of notifying the underlying signal that it has been dirtied
|
|
13
|
-
* - peekSignal: a way of inspecting the signal without notifying it
|
|
14
|
-
*
|
|
15
|
-
* - gate: a memoized getter function that re-runs when on access if its signal is dirty
|
|
16
|
-
* conceptually, a gate is a tightly coupled signal and memo
|
|
17
|
-
* - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter
|
|
18
|
-
* to be a gate
|
|
19
|
-
* - defineGate: a way of creating a gate on an object
|
|
20
|
-
* - notifySignal: a way of notifying the signal for a gate that it has been dirtied
|
|
21
|
-
*
|
|
22
|
-
* - memo:
|
|
23
|
-
* - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter
|
|
24
|
-
* to be a memo
|
|
25
|
-
* - defineMemo: a way of creating a memo on an object
|
|
26
|
-
*
|
|
27
|
-
* - signalStore: storage bucket for signals associated to an object
|
|
28
|
-
* - withSignalStore: a way of pre-creating a signal store on an object
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* An Opaque type that represents a framework specific or TC39 signal.
|
|
35
|
-
*
|
|
36
|
-
* It may be an array of signals or a single signal.
|
|
37
|
-
*
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
export type SignalRef = unknown;
|
|
41
|
-
/**
|
|
42
4
|
* The hooks which MUST be configured in order to use reactive arrays,
|
|
43
5
|
* resources and documents with framework specfic signals or TC39 signals.
|
|
44
6
|
*
|
|
@@ -156,19 +118,19 @@ export declare function setupSignals<T>(buildConfig: (options: HooksOptions) =>
|
|
|
156
118
|
/**
|
|
157
119
|
* Internal method for consuming the configured `createSignal` hook
|
|
158
120
|
*
|
|
159
|
-
* @
|
|
121
|
+
* @private
|
|
160
122
|
*/
|
|
161
123
|
export declare function createSignal(obj: object, key: string | symbol): SignalRef;
|
|
162
124
|
/**
|
|
163
125
|
* Internal method for consuming the configured `consumeSignal` hook
|
|
164
126
|
*
|
|
165
|
-
* @
|
|
127
|
+
* @private
|
|
166
128
|
*/
|
|
167
129
|
export declare function consumeSignal(signal: SignalRef): void;
|
|
168
130
|
/**
|
|
169
131
|
* Internal method for consuming the configured `notifySignal` hook
|
|
170
132
|
*
|
|
171
|
-
* @
|
|
133
|
+
* @private
|
|
172
134
|
*/
|
|
173
135
|
export declare function notifySignal(signal: SignalRef): void;
|
|
174
136
|
export declare function createMemo<T>(object: object, key: string | symbol, fn: () => T): () => T;
|
|
@@ -31,30 +31,9 @@ export declare function makeInitializer(fn: () => unknown): Initializer;
|
|
|
31
31
|
* - the "key" or "name" of the signal
|
|
32
32
|
* - the "object identity" or "context" to which the signal is attached
|
|
33
33
|
*
|
|
34
|
-
* @
|
|
34
|
+
* @private
|
|
35
35
|
*/
|
|
36
36
|
export interface WarpDriveSignal {
|
|
37
|
-
/**
|
|
38
|
-
* The "key" or "name" of the signal.
|
|
39
|
-
* This is usually (but not always) the name of a property
|
|
40
|
-
* on the object to which the signal is attached.
|
|
41
|
-
*
|
|
42
|
-
* This is used for debugging purposes.
|
|
43
|
-
* It is not used for any other purpose.
|
|
44
|
-
*
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
key: string | symbol;
|
|
48
|
-
/**
|
|
49
|
-
* The "object identity" or "context" to which the
|
|
50
|
-
* signal is attached.
|
|
51
|
-
*
|
|
52
|
-
* This is used for debugging purposes.
|
|
53
|
-
* It is not used for any other purpose.
|
|
54
|
-
*
|
|
55
|
-
* @internal
|
|
56
|
-
*/
|
|
57
|
-
context: object;
|
|
58
37
|
/**
|
|
59
38
|
* The underlying signal(s) in-use.
|
|
60
39
|
*
|
|
@@ -98,14 +77,14 @@ export interface WarpDriveSignal {
|
|
|
98
77
|
* },
|
|
99
78
|
* });
|
|
100
79
|
*
|
|
101
|
-
* @
|
|
80
|
+
* @private
|
|
102
81
|
*/
|
|
103
82
|
signal: SignalRef;
|
|
104
83
|
/**
|
|
105
84
|
* The last "value" computed for this signal when
|
|
106
85
|
* a signal is also used for storage.
|
|
107
86
|
*
|
|
108
|
-
* @
|
|
87
|
+
* @private
|
|
109
88
|
*/
|
|
110
89
|
value: unknown;
|
|
111
90
|
/**
|
|
@@ -114,7 +93,7 @@ export interface WarpDriveSignal {
|
|
|
114
93
|
* `value` cache and when using the signal as a
|
|
115
94
|
* "gate"
|
|
116
95
|
*
|
|
117
|
-
* @
|
|
96
|
+
* @private
|
|
118
97
|
*/
|
|
119
98
|
isStale: boolean;
|
|
120
99
|
}
|
|
@@ -134,14 +113,14 @@ export interface WarpDriveSignal {
|
|
|
134
113
|
* initializeSignalStore(obj);
|
|
135
114
|
* ```
|
|
136
115
|
*
|
|
137
|
-
* @
|
|
116
|
+
* @private
|
|
138
117
|
*/
|
|
139
118
|
export declare const Signals: "___(unique) Symbol(Signals)";
|
|
140
119
|
export type SignalStore = Map<string | symbol, WarpDriveSignal>;
|
|
141
120
|
/**
|
|
142
121
|
* A type util to recast the object as having a signal store.
|
|
143
122
|
*
|
|
144
|
-
* @
|
|
123
|
+
* @private
|
|
145
124
|
*/
|
|
146
125
|
export declare function upgradeWithSignals<T extends object>(obj: T): asserts obj is T & {
|
|
147
126
|
[Signals]: SignalStore;
|
|
@@ -151,7 +130,7 @@ export declare function upgradeWithSignals<T extends object>(obj: T): asserts ob
|
|
|
151
130
|
* if it does not already exist and returns the associated
|
|
152
131
|
* signal store.
|
|
153
132
|
*
|
|
154
|
-
* @
|
|
133
|
+
* @private
|
|
155
134
|
*/
|
|
156
135
|
export declare function withSignalStore<T extends object>(obj: T): SignalStore;
|
|
157
136
|
/**
|
|
@@ -161,7 +140,7 @@ export declare function withSignalStore<T extends object>(obj: T): SignalStore;
|
|
|
161
140
|
* Useful for pre-warming the shape of an object to ensure
|
|
162
141
|
* a key-transition to add it is not required later.
|
|
163
142
|
*
|
|
164
|
-
* @
|
|
143
|
+
* @private
|
|
165
144
|
*/
|
|
166
145
|
export declare function initializeSignalStore<T extends object>(obj: T): asserts obj is T & {
|
|
167
146
|
[Signals]: SignalStore;
|
|
@@ -4,7 +4,7 @@ import type { SignalStore, WarpDriveSignal } from "./internal.js";
|
|
|
4
4
|
*
|
|
5
5
|
* Use when you need to ensure a signal exists and is subscribed to.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @private
|
|
8
8
|
*/
|
|
9
9
|
export declare function entangleSignal<T extends object>(signals: SignalStore, obj: T, key: string | symbol, initialValue: unknown): WarpDriveSignal;
|
|
10
10
|
export declare function createSignalDescriptor(key: string | symbol, intialValue: unknown): PropertyDescriptor;
|
|
@@ -16,13 +16,13 @@ export declare function createSignalDescriptor(key: string | symbol, intialValue
|
|
|
16
16
|
* The signal will be lazily created when accessed and scoped to the
|
|
17
17
|
* instance of the object.
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
19
|
+
* @private
|
|
20
20
|
*/
|
|
21
21
|
export declare function defineSignal<T extends object>(obj: T, key: string, v?: unknown): void;
|
|
22
22
|
/**
|
|
23
23
|
* Define a non-enumerable signal property.
|
|
24
24
|
*
|
|
25
|
-
* @
|
|
25
|
+
* @private
|
|
26
26
|
*/
|
|
27
27
|
export declare function defineNonEnumerableSignal<T extends object>(obj: T, key: string, v?: unknown): void;
|
|
28
28
|
interface DecoratorPropertyDescriptor extends PropertyDescriptor {
|
|
@@ -44,6 +44,8 @@ export declare function memoized<
|
|
|
44
44
|
>(target: T, key: K, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
45
45
|
/**
|
|
46
46
|
* Decorator version of creating a gate.
|
|
47
|
+
*
|
|
48
|
+
* @private
|
|
47
49
|
*/
|
|
48
50
|
export declare function gate<
|
|
49
51
|
T extends object,
|
|
@@ -149,82 +149,11 @@ export declare class RequestSubscription<
|
|
|
149
149
|
*/
|
|
150
150
|
isRefreshing: boolean;
|
|
151
151
|
/**
|
|
152
|
-
* The
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* This will never be the original request passed as an arg to
|
|
156
|
-
* the component.
|
|
157
|
-
*
|
|
158
|
-
* @internal
|
|
159
|
-
*/
|
|
160
|
-
private _localRequest;
|
|
161
|
-
/**
|
|
162
|
-
* The most recent request that was made, typically due to either a
|
|
163
|
-
* reload or a refresh.
|
|
164
|
-
*
|
|
165
|
-
* This will never be the original request passed as an arg to
|
|
166
|
-
* the component.
|
|
167
|
-
*
|
|
168
|
-
* @internal
|
|
169
|
-
*/
|
|
170
|
-
private _latestRequest;
|
|
171
|
-
/**
|
|
172
|
-
* The time at which the network was reported as offline.
|
|
173
|
-
*
|
|
174
|
-
* @internal
|
|
175
|
-
*/
|
|
176
|
-
private _unavailableStart;
|
|
177
|
-
/** @internal */
|
|
178
|
-
private _intervalStart;
|
|
179
|
-
/** @internal */
|
|
180
|
-
private _nextInterval;
|
|
181
|
-
/** @internal */
|
|
182
|
-
private _invalidated;
|
|
183
|
-
/** @internal */
|
|
184
|
-
private _isUpdating;
|
|
185
|
-
/** @internal */
|
|
186
|
-
private isDestroyed;
|
|
187
|
-
/**
|
|
188
|
-
* The event listener for network status changes,
|
|
189
|
-
* cached to use the reference for removal.
|
|
190
|
-
*
|
|
191
|
-
* @internal
|
|
192
|
-
*/
|
|
193
|
-
private _onlineChanged;
|
|
194
|
-
/**
|
|
195
|
-
* The event listener for visibility status changes,
|
|
196
|
-
* cached to use the reference for removal.
|
|
197
|
-
*
|
|
198
|
-
* @internal
|
|
152
|
+
* The Store this subscription subscribes to or the RequestManager
|
|
153
|
+
* which issues this request.
|
|
199
154
|
*/
|
|
200
|
-
private _backgroundChanged;
|
|
201
|
-
/**
|
|
202
|
-
* The last request passed as an arg to the component,
|
|
203
|
-
* cached for comparison.
|
|
204
|
-
*
|
|
205
|
-
* @internal
|
|
206
|
-
*/
|
|
207
|
-
private _originalRequest;
|
|
208
|
-
/**
|
|
209
|
-
* The last query passed as an arg to the component,
|
|
210
|
-
* cached for comparison.
|
|
211
|
-
*
|
|
212
|
-
* @internal
|
|
213
|
-
*/
|
|
214
|
-
private _originalQuery;
|
|
215
|
-
/** @internal */
|
|
216
|
-
private _subscription;
|
|
217
|
-
/** @internal */
|
|
218
|
-
private _subscribedTo;
|
|
219
|
-
/** @internal */
|
|
220
|
-
private _args;
|
|
221
|
-
/** @internal */
|
|
222
155
|
store: Store | RequestManager;
|
|
223
156
|
constructor(store: Store | RequestManager, args: SubscriptionArgs<RT, E>);
|
|
224
|
-
/**
|
|
225
|
-
* @internal
|
|
226
|
-
*/
|
|
227
|
-
private _beginPolling;
|
|
228
157
|
get isIdle(): boolean;
|
|
229
158
|
get autorefreshTypes(): Set<AutorefreshBehaviorType>;
|
|
230
159
|
// we only run this function on component creation
|
|
@@ -238,39 +167,6 @@ export declare class RequestSubscription<
|
|
|
238
167
|
private _scheduleInterval;
|
|
239
168
|
private _clearInterval;
|
|
240
169
|
/**
|
|
241
|
-
* @internal
|
|
242
|
-
*/
|
|
243
|
-
private _updateSubscriptions;
|
|
244
|
-
/**
|
|
245
|
-
* @internal
|
|
246
|
-
*/
|
|
247
|
-
private _removeSubscriptions;
|
|
248
|
-
/**
|
|
249
|
-
* Install the event listeners for network and visibility changes.
|
|
250
|
-
* This is only done in browser environments with a global `window`.
|
|
251
|
-
*
|
|
252
|
-
* @internal
|
|
253
|
-
*/
|
|
254
|
-
private _installListeners;
|
|
255
|
-
/**
|
|
256
|
-
* If the network is online and the tab is visible, either reload or refresh the request
|
|
257
|
-
* based on the component's configuration and the requested update mode.
|
|
258
|
-
*
|
|
259
|
-
* Valid modes are:
|
|
260
|
-
*
|
|
261
|
-
* - `'reload'`: Force a reload of the request.
|
|
262
|
-
* - `'refresh'`: Refresh the request in the background.
|
|
263
|
-
* - `'policy'`: Make the request, letting the store's configured CachePolicy decide whether to reload, refresh, or do nothing.
|
|
264
|
-
* - `undefined`: Make the request using the component's autorefreshBehavior setting if the autorefreshThreshold has passed.
|
|
265
|
-
*
|
|
266
|
-
* @internal
|
|
267
|
-
*/
|
|
268
|
-
private _maybeUpdate;
|
|
269
|
-
/**
|
|
270
|
-
* @internal
|
|
271
|
-
*/
|
|
272
|
-
private _getRequester;
|
|
273
|
-
/**
|
|
274
170
|
* Retry the request, reloading it from the server.
|
|
275
171
|
*/
|
|
276
172
|
retry: () => Promise<void>;
|
|
@@ -286,10 +182,6 @@ export declare class RequestSubscription<
|
|
|
286
182
|
* features to yield to the content slot of a component
|
|
287
183
|
*/
|
|
288
184
|
get contentFeatures(): ContentFeatures<RT>;
|
|
289
|
-
/**
|
|
290
|
-
* @internal
|
|
291
|
-
*/
|
|
292
|
-
get _request(): Future<RT>;
|
|
293
185
|
get request(): Future<RT>;
|
|
294
186
|
get reqState(): RequestState<RT, StructuredErrorDocument<E>>;
|
|
295
187
|
get result(): RT;
|
|
@@ -20,8 +20,6 @@ export interface LegacyArray<T = unknown> extends ReactiveResourceArray<T> {
|
|
|
20
20
|
```
|
|
21
21
|
*/
|
|
22
22
|
isUpdating: boolean;
|
|
23
|
-
/** @internal */
|
|
24
|
-
_updatingPromise: Promise<LegacyArray<T>> | null;
|
|
25
23
|
/**
|
|
26
24
|
Used to get the latest version of all of the records in this array
|
|
27
25
|
from the adapter.
|
|
@@ -66,14 +66,12 @@ import type { LegacyArray, MinimumManager } from "./-utils.js";
|
|
|
66
66
|
*/
|
|
67
67
|
export interface LegacyLiveArray<T = unknown> extends LegacyArray<T> {
|
|
68
68
|
isLoaded: boolean;
|
|
69
|
-
/** @internal */
|
|
70
|
-
DEPRECATED_CLASS_NAME: string;
|
|
71
69
|
modelName: TypeFromInstanceOrString<T>;
|
|
72
70
|
}
|
|
73
71
|
/**
|
|
74
72
|
* The options for {@link createLegacyLiveArray}
|
|
75
73
|
*
|
|
76
|
-
* @
|
|
74
|
+
* @private
|
|
77
75
|
*/
|
|
78
76
|
export interface LegacyLiveArrayCreateOptions {
|
|
79
77
|
store: Store;
|
|
@@ -81,9 +79,3 @@ export interface LegacyLiveArrayCreateOptions {
|
|
|
81
79
|
source: ResourceKey[];
|
|
82
80
|
type: string;
|
|
83
81
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Creates a {@link LegacyLiveArray}
|
|
86
|
-
*
|
|
87
|
-
* @internal
|
|
88
|
-
*/
|
|
89
|
-
export declare function createLegacyLiveArray(options: LegacyLiveArrayCreateOptions): LegacyLiveArray;
|
|
@@ -50,21 +50,15 @@ relationship's _owner_.
|
|
|
50
50
|
export interface LegacyManyArray<T = unknown> extends ReactiveResourceArray<T> {
|
|
51
51
|
meta: Meta | null;
|
|
52
52
|
links: Links | PaginationLinks | null;
|
|
53
|
-
/** @
|
|
54
|
-
isPolymorphic: boolean;
|
|
55
|
-
/** @internal */
|
|
56
|
-
isAsync: boolean;
|
|
57
|
-
/** @internal */
|
|
53
|
+
/** @private */
|
|
58
54
|
key: string;
|
|
59
|
-
/** @
|
|
55
|
+
/** @private */
|
|
60
56
|
modelName: T extends TypedRecordInstance ? TypeFromInstance<T> : string;
|
|
61
57
|
/**
|
|
62
58
|
The loading state of this array
|
|
63
59
|
@public
|
|
64
60
|
*/
|
|
65
61
|
isLoaded: boolean;
|
|
66
|
-
/** @internal */
|
|
67
|
-
notify(): void;
|
|
68
62
|
/**
|
|
69
63
|
Reloads all of the records in the manyArray. If the manyArray
|
|
70
64
|
holds a relationship that was originally fetched using a links url
|
|
@@ -113,13 +107,13 @@ export interface LegacyManyArray<T = unknown> extends ReactiveResourceArray<T> {
|
|
|
113
107
|
@public
|
|
114
108
|
*/
|
|
115
109
|
save: () => Promise<LegacyManyArray<T>>;
|
|
116
|
-
/** @
|
|
110
|
+
/** @private */
|
|
117
111
|
destroy: () => void;
|
|
118
112
|
}
|
|
119
113
|
/**
|
|
120
114
|
* The options for {@link createLegacyManyArray}
|
|
121
115
|
*
|
|
122
|
-
* @
|
|
116
|
+
* @private
|
|
123
117
|
*/
|
|
124
118
|
export interface LegacyManyArrayCreateOptions extends LegacyLiveArrayCreateOptions {
|
|
125
119
|
isLoaded: boolean;
|
|
@@ -134,6 +128,6 @@ export interface LegacyManyArrayCreateOptions extends LegacyLiveArrayCreateOptio
|
|
|
134
128
|
/**
|
|
135
129
|
* Creates a {@link LegacyManyArray}
|
|
136
130
|
*
|
|
137
|
-
* @
|
|
131
|
+
* @private
|
|
138
132
|
*/
|
|
139
133
|
export declare function createLegacyManyArray<T>(options: LegacyManyArrayCreateOptions): LegacyManyArray<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImmutableRequestInfo } from "../../../types/request.js";
|
|
2
2
|
import type { Links, Meta, PaginationLinks } from "../../../types/spec/json-api-raw.js";
|
|
3
|
-
import type { LegacyLiveArray
|
|
3
|
+
import type { LegacyLiveArray } from "./legacy-live-array.js";
|
|
4
4
|
/**
|
|
5
5
|
* QueryArrays contain the primary records returned when querying
|
|
6
6
|
* for records by `ResourceType`.
|
|
@@ -79,25 +79,3 @@ export interface LegacyQueryArray<T = unknown> extends LegacyLiveArray<T> {
|
|
|
79
79
|
links: PaginationLinks | Links | null;
|
|
80
80
|
meta: Meta | null;
|
|
81
81
|
}
|
|
82
|
-
/**
|
|
83
|
-
* The options for {@link createLegacyQueryArray}
|
|
84
|
-
*
|
|
85
|
-
* See also {@link LegacyLiveArrayCreateOptions} which
|
|
86
|
-
* this extends.
|
|
87
|
-
*
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
export interface LegacyQueryArrayCreateOptions extends LegacyLiveArrayCreateOptions {
|
|
91
|
-
query: ImmutableRequestInfo | Record<string, unknown> | null;
|
|
92
|
-
isLoaded: boolean;
|
|
93
|
-
links: PaginationLinks | Links | null;
|
|
94
|
-
meta: Meta | null;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Creates a {@link LegacyQueryArray}
|
|
98
|
-
*
|
|
99
|
-
* Options: {@link LegacyQueryArrayCreateOptions}
|
|
100
|
-
*
|
|
101
|
-
* @internal
|
|
102
|
-
*/
|
|
103
|
-
export declare function createLegacyQueryArray<T = unknown>(options: LegacyQueryArrayCreateOptions): LegacyQueryArray<T>;
|
|
@@ -1,126 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
We redefine Proxy because the native Proxy type treats the `target` and
|
|
4
|
-
`receiver` as the same type incorrectly.
|
|
5
|
-
|
|
6
|
-
We ported this from Typescript's own Proxy types on 3/10/2024.
|
|
7
|
-
*/
|
|
8
|
-
interface ProxyHandler<T extends object> {
|
|
9
|
-
/**
|
|
10
|
-
* A trap method for a function call.
|
|
11
|
-
* @param target The original callable object which is being proxied.
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
apply?(target: T, thisArg: any, argArray: any[]): any;
|
|
15
|
-
/**
|
|
16
|
-
* A trap for the `new` operator.
|
|
17
|
-
* @param target The original object which is being proxied.
|
|
18
|
-
* @param newTarget The constructor that was originally called.
|
|
19
|
-
* @internal
|
|
20
|
-
*/
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
22
|
-
construct?(target: T, argArray: any[], newTarget: Function): object;
|
|
23
|
-
/**
|
|
24
|
-
* A trap for `Object.defineProperty()`.
|
|
25
|
-
* @param target The original object which is being proxied.
|
|
26
|
-
* @return A `Boolean` indicating whether or not the property has been defined.
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* A trap for the `delete` operator.
|
|
32
|
-
* @param target The original object which is being proxied.
|
|
33
|
-
* @param p The name or `Symbol` of the property to delete.
|
|
34
|
-
* @return A `Boolean` indicating whether or not the property was deleted.
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
deleteProperty?(target: T, p: string | symbol): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* A trap for getting a property value.
|
|
40
|
-
* @param target The original object which is being proxied.
|
|
41
|
-
* @param p The name or `Symbol` of the property to get.
|
|
42
|
-
* @param receiver The proxy or an object that inherits from the proxy.
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
get?(target: T, p: string | symbol, receiver: any): any;
|
|
46
|
-
/**
|
|
47
|
-
* A trap for `Object.getOwnPropertyDescriptor()`.
|
|
48
|
-
* @param target The original object which is being proxied.
|
|
49
|
-
* @param p The name of the property whose description should be retrieved.
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
|
-
getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* A trap for the `[[GetPrototypeOf]]` internal method.
|
|
55
|
-
* @param target The original object which is being proxied.
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
getPrototypeOf?(target: T): object | null;
|
|
59
|
-
/**
|
|
60
|
-
* A trap for the `in` operator.
|
|
61
|
-
* @param target The original object which is being proxied.
|
|
62
|
-
* @param p The name or `Symbol` of the property to check for existence.
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
has?(target: T, p: string | symbol): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* A trap for `Object.isExtensible()`.
|
|
68
|
-
* @param target The original object which is being proxied.
|
|
69
|
-
* @internal
|
|
70
|
-
*/
|
|
71
|
-
isExtensible?(target: T): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* A trap for `Reflect.ownKeys()`.
|
|
74
|
-
* @param target The original object which is being proxied.
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
ownKeys?(target: T): ArrayLike<string | symbol>;
|
|
78
|
-
/**
|
|
79
|
-
* A trap for `Object.preventExtensions()`.
|
|
80
|
-
* @param target The original object which is being proxied.
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
preventExtensions?(target: T): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* A trap for setting a property value.
|
|
86
|
-
* @param target The original object which is being proxied.
|
|
87
|
-
* @param p The name or `Symbol` of the property to set.
|
|
88
|
-
* @param receiver The object to which the assignment was originally directed.
|
|
89
|
-
* @return A `Boolean` indicating whether or not the property was set.
|
|
90
|
-
* @internal
|
|
91
|
-
*/
|
|
92
|
-
set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* A trap for `Object.setPrototypeOf()`.
|
|
95
|
-
* @param target The original object which is being proxied.
|
|
96
|
-
* @param newPrototype The object's new prototype or `null`.
|
|
97
|
-
* @internal
|
|
98
|
-
*/
|
|
99
|
-
setPrototypeOf?(target: T, v: object | null): boolean;
|
|
100
|
-
}
|
|
101
|
-
interface ProxyConstructor {
|
|
102
|
-
/**
|
|
103
|
-
* Creates a revocable Proxy object.
|
|
104
|
-
* @param target A target object to wrap with Proxy.
|
|
105
|
-
* @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
|
|
106
|
-
* @internal
|
|
107
|
-
*/
|
|
108
|
-
revocable<T extends object>(target: T, handler: ProxyHandler<T>): {
|
|
109
|
-
proxy: T;
|
|
110
|
-
revoke: () => void;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the
|
|
114
|
-
* original object, but which may redefine fundamental Object operations like getting, setting, and defining
|
|
115
|
-
* properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs.
|
|
116
|
-
* @param target A target object to wrap with Proxy.
|
|
117
|
-
* @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it.
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
new <
|
|
121
|
-
TSource extends object,
|
|
122
|
-
TTarget extends object
|
|
123
|
-
>(target: TSource, handler: ProxyHandler<TSource>): TTarget;
|
|
124
|
-
}
|
|
1
|
+
interface ProxyConstructor {}
|
|
125
2
|
export declare const NativeProxy: ProxyConstructor;
|
|
126
3
|
export {};
|
|
@@ -36,22 +36,15 @@ interface ReactiveResourceArrayContext extends ReactiveResourceArrayCreateOption
|
|
|
36
36
|
transaction: boolean;
|
|
37
37
|
boundFns: Map<KeyType, ProxiedMethod>;
|
|
38
38
|
}
|
|
39
|
-
export interface ReactiveResourceArray<T = unknown> extends Omit<Array<T>, "[]"> {
|
|
40
|
-
|
|
39
|
+
export interface ReactiveResourceArray<T = unknown> extends Omit<Array<T>, "[]"> {}
|
|
40
|
+
export interface PrivateReactiveResourceArray<T = unknown> extends Omit<Array<T>, "[]"> {
|
|
41
41
|
isDestroying: boolean;
|
|
42
|
-
/** @internal */
|
|
43
42
|
isDestroyed: boolean;
|
|
44
|
-
/** @internal */
|
|
45
43
|
destroy: (this: ReactiveResourceArray, clear: boolean) => void;
|
|
46
|
-
/** @internal */
|
|
47
44
|
[IS_COLLECTION]: boolean;
|
|
48
|
-
/** @internal */
|
|
49
|
-
[Context]: ReactiveResourceArrayContext;
|
|
50
|
-
}
|
|
51
|
-
export interface TargetArray extends Array<ResourceKey> {
|
|
52
|
-
/** @internal */
|
|
53
45
|
[Context]: ReactiveResourceArrayContext;
|
|
54
46
|
}
|
|
47
|
+
export interface TargetArray extends Array<ResourceKey> {}
|
|
55
48
|
export declare function createReactiveResourceArray<T>(options: ReactiveResourceArrayCreateOptions): ReactiveResourceArray<T>;
|
|
56
49
|
export declare function destroy(this: ReactiveResourceArray, clear: boolean): void;
|
|
57
50
|
export interface ReactiveRequestCollectionCreateArgs {
|