@agoric/notifier 0.6.3-upgrade-14-dev-c8f9e7b.0 → 0.6.3-upgrade-16-fi-dev-8879538.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/exported.js +2 -3
- package/package.json +28 -20
- package/src/asyncIterableAdaptor.d.ts +10 -3
- package/src/asyncIterableAdaptor.d.ts.map +1 -1
- package/src/asyncIterableAdaptor.js +5 -2
- package/src/index.d.ts +2 -0
- package/src/index.js +5 -0
- package/src/notifier.d.ts +6 -2
- package/src/notifier.d.ts.map +1 -1
- package/src/notifier.js +5 -2
- package/src/publish-kit.d.ts +30 -18
- package/src/publish-kit.d.ts.map +1 -1
- package/src/publish-kit.js +14 -9
- package/src/stored-notifier.d.ts +38 -2
- package/src/stored-notifier.d.ts.map +1 -1
- package/src/stored-notifier.js +8 -1
- package/src/storesub.d.ts +31 -8
- package/src/storesub.d.ts.map +1 -1
- package/src/storesub.js +10 -5
- package/src/subscribe.d.ts +17 -13
- package/src/subscribe.d.ts.map +1 -1
- package/src/subscribe.js +5 -3
- package/src/subscriber.d.ts +7 -1
- package/src/subscriber.d.ts.map +1 -1
- package/src/subscriber.js +4 -2
- package/src/topic.d.ts +2 -0
- package/src/topic.d.ts.map +1 -1
- package/src/topic.js +5 -2
- package/src/types.d.ts +10 -79
- package/src/types.d.ts.map +1 -1
- package/src/types.js +13 -60
- package/tools/testSupports.d.ts +6 -4
- package/tools/testSupports.d.ts.map +1 -1
- package/tools/testSupports.js +4 -2
- package/CHANGELOG.md +0 -602
- package/src/types-ambient.d.ts +0 -301
- package/src/types-ambient.d.ts.map +0 -1
- package/src/types-ambient.js +0 -346
package/src/subscriber.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
|
-
/// <reference types="ses"/>
|
|
3
|
+
/// <reference types="ses" />
|
|
4
4
|
|
|
5
5
|
import { E, Far } from '@endo/far';
|
|
6
6
|
import { subscribeEach } from './subscribe.js';
|
|
@@ -8,7 +8,9 @@ import { makePublishKit } from './publish-kit.js';
|
|
|
8
8
|
|
|
9
9
|
import { makePinnedHistoryTopic } from './topic.js';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @import {EachTopic, IterationObserver, LatestTopic, Notifier, NotifierRecord, SubscriptionRecord, Publisher, PublishKit, StoredPublishKit, StoredSubscription, StoredSubscriber, Subscriber, Subscription, UpdateRecord} from '../src/types.js';
|
|
13
|
+
*/
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
16
|
* @template T
|
package/src/topic.d.ts
CHANGED
package/src/topic.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["topic.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["topic.js"],"names":[],"mappings":"AAiBO,uCAFiC,CAAC,uEAoBxC;+BA9BwC,iBAAiB;iCAAjB,iBAAiB"}
|
package/src/topic.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
2
|
|
|
3
3
|
import { Far } from '@endo/far';
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @import {EachTopic, LatestTopic} from '../src/types.js';
|
|
7
|
+
*/
|
|
5
8
|
|
|
6
9
|
/**
|
|
7
10
|
* @deprecated A pinned-history topic preserves all of its published values in
|
|
@@ -9,7 +12,7 @@ import './types-ambient.js';
|
|
|
9
12
|
*
|
|
10
13
|
* @template T
|
|
11
14
|
* @param {EachTopic<T> & LatestTopic<T>} topic needs to be near in order to
|
|
12
|
-
* preserve subscription timings. TODO: drop LatestTopic<T
|
|
15
|
+
* preserve subscription timings. TODO: drop `LatestTopic<T>` requirement
|
|
13
16
|
* @returns {EachTopic<T> & LatestTopic<T>}
|
|
14
17
|
*/
|
|
15
18
|
export const makePinnedHistoryTopic = topic => {
|
package/src/types.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export type ERef<T> = import('@endo/far').ERef<T>;
|
|
2
|
-
export type PromiseKit<T> = import('@endo/promise-kit').PromiseKit<T>;
|
|
3
|
-
/**
|
|
4
|
-
* Deprecated. Use PromiseKit instead.
|
|
5
|
-
*/
|
|
6
|
-
export type PromiseRecord<T> = import('@endo/promise-kit').PromiseRecord<T>;
|
|
7
1
|
/**
|
|
8
2
|
* An AsyncIterator that can be forked at a given position
|
|
9
3
|
* into multiple independent ForkableAsyncIterators starting from that position.
|
|
@@ -25,7 +19,6 @@ export type ForkableAsyncIterable<T, TReturn = any, TNext = undefined> = {
|
|
|
25
19
|
[Symbol.asyncIterator]: () => ForkableAsyncIterator<T, TReturn, TNext>;
|
|
26
20
|
};
|
|
27
21
|
/**
|
|
28
|
-
* <T>
|
|
29
22
|
* A valid sequence of calls to the methods of an `IterationObserver`
|
|
30
23
|
* represents an iteration. A valid sequence consists of any number of calls
|
|
31
24
|
* to `updateState` with the successive non-final values, followed by a
|
|
@@ -119,16 +112,10 @@ export type Publisher<T> = {
|
|
|
119
112
|
fail: (reason: any) => void;
|
|
120
113
|
};
|
|
121
114
|
export type PublishObserver<T> = Partial<Publisher<T>>;
|
|
122
|
-
/**
|
|
123
|
-
* <T>
|
|
124
|
-
*/
|
|
125
115
|
export type PublishKit<T> = {
|
|
126
116
|
publisher: Publisher<T>;
|
|
127
117
|
subscriber: Subscriber<T>;
|
|
128
118
|
};
|
|
129
|
-
/**
|
|
130
|
-
* <T>
|
|
131
|
-
*/
|
|
132
119
|
export type StoredPublishKit<T> = {
|
|
133
120
|
publisher: Publisher<T>;
|
|
134
121
|
subscriber: StoredSubscriber<T>;
|
|
@@ -148,11 +135,11 @@ export type StoredPublishKit<T> = {
|
|
|
148
135
|
* 'mandatory' is the only currently-supported value, and others must not be
|
|
149
136
|
* enabled without test coverage.
|
|
150
137
|
*/
|
|
151
|
-
export type DurablePublishKitValueDurability =
|
|
138
|
+
export type DurablePublishKitValueDurability = "mandatory" | "opportunistic" | "ignored";
|
|
152
139
|
export type DurablePublishKitState = {
|
|
153
140
|
valueDurability: DurablePublishKitValueDurability;
|
|
154
141
|
publishCount: bigint;
|
|
155
|
-
status:
|
|
142
|
+
status: "live" | "finished" | "failed";
|
|
156
143
|
/**
|
|
157
144
|
* hasValue indicates the presence of value. It starts off false,
|
|
158
145
|
* and can be reset to false when a durable publish kit is restored and
|
|
@@ -165,9 +152,6 @@ export type DurablePublishKitState = {
|
|
|
165
152
|
*/
|
|
166
153
|
value: any;
|
|
167
154
|
};
|
|
168
|
-
/**
|
|
169
|
-
* <T>
|
|
170
|
-
*/
|
|
171
155
|
export type UpdateRecord<T> = {
|
|
172
156
|
/**
|
|
173
157
|
* is whatever state the service wants to publish
|
|
@@ -186,9 +170,9 @@ export type UpdateRecord<T> = {
|
|
|
186
170
|
*/
|
|
187
171
|
export type NotifierInternals<T> = BaseNotifier<T>;
|
|
188
172
|
/**
|
|
189
|
-
*
|
|
173
|
+
* an object that can be used to get the current state or updates
|
|
190
174
|
*/
|
|
191
|
-
export type Notifier<T> = NotifierInternals<T> & ForkableAsyncIterable<T, T> & SharableNotifier<T>;
|
|
175
|
+
export type Notifier<T> = import("@endo/marshal").RemotableObject & NotifierInternals<T> & ForkableAsyncIterable<T, T> & SharableNotifier<T>;
|
|
192
176
|
export type SharableNotifier<T> = {
|
|
193
177
|
/**
|
|
194
178
|
* Used to replicate the multicast values at other sites. To manually create a
|
|
@@ -203,20 +187,19 @@ export type SharableNotifier<T> = {
|
|
|
203
187
|
getSharableNotifierInternals: () => Promise<NotifierInternals<T>>;
|
|
204
188
|
};
|
|
205
189
|
/**
|
|
206
|
-
*
|
|
190
|
+
* the produced notifier/updater pair
|
|
207
191
|
*/
|
|
208
192
|
export type NotifierRecord<T> = {
|
|
209
193
|
/**
|
|
210
194
|
* the (closely-held) notifier producer
|
|
211
195
|
*/
|
|
212
|
-
updater: IterationObserver<T>;
|
|
196
|
+
updater: import("@endo/marshal").RemotableObject & IterationObserver<T>;
|
|
213
197
|
/**
|
|
214
198
|
* the (widely-held) notifier consumer
|
|
215
199
|
*/
|
|
216
200
|
notifier: Notifier<T>;
|
|
217
201
|
};
|
|
218
202
|
/**
|
|
219
|
-
* <T>
|
|
220
203
|
* A form of AsyncIterable supporting distributed and multicast usage.
|
|
221
204
|
*/
|
|
222
205
|
export type Subscription<T> = IterableEachTopic<T> & EachTopic<T> & SharableSubscription<T>;
|
|
@@ -233,69 +216,17 @@ export type SharableSubscription<T> = {
|
|
|
233
216
|
*/
|
|
234
217
|
getSharableSubscriptionInternals: () => Promise<EachTopic<T>>;
|
|
235
218
|
};
|
|
236
|
-
/**
|
|
237
|
-
* <T>
|
|
238
|
-
*/
|
|
239
219
|
export type SubscriptionRecord<T> = {
|
|
240
220
|
publication: IterationObserver<T>;
|
|
241
221
|
subscription: Subscription<T>;
|
|
242
222
|
};
|
|
243
|
-
export type
|
|
244
|
-
export type Unserializer = Pick<Marshaller, 'fromCapData'>;
|
|
245
|
-
/**
|
|
246
|
-
* Defined by vstorageStoreKey in vstorage.go
|
|
247
|
-
*/
|
|
248
|
-
export type VStorageKey = {
|
|
249
|
-
storeName: string;
|
|
250
|
-
storeSubkey: string;
|
|
251
|
-
dataPrefixBytes: string;
|
|
252
|
-
noDataValue?: string | undefined;
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* This represents a node in an IAVL tree.
|
|
256
|
-
*
|
|
257
|
-
* The active implementation is x/vstorage, an Agoric extension of the Cosmos SDK.
|
|
258
|
-
*
|
|
259
|
-
* Vstorage is a hierarchical externally-reachable storage structure that
|
|
260
|
-
* identifies children by restricted ASCII name and is associated with arbitrary
|
|
261
|
-
* string-valued data for each node, defaulting to the empty string.
|
|
262
|
-
*/
|
|
263
|
-
export type StorageNode = {
|
|
264
|
-
/**
|
|
265
|
-
* publishes some data (append to the node)
|
|
266
|
-
*/
|
|
267
|
-
setValue: (data: string) => Promise<void>;
|
|
268
|
-
/**
|
|
269
|
-
* the chain storage path at which the node was constructed
|
|
270
|
-
*/
|
|
271
|
-
getPath: () => string;
|
|
272
|
-
/**
|
|
273
|
-
* DEPRECATED use getPath
|
|
274
|
-
*/
|
|
275
|
-
getStoreKey: () => Promise<VStorageKey>;
|
|
276
|
-
makeChildNode: (subPath: string, options?: {
|
|
277
|
-
sequence?: boolean;
|
|
278
|
-
}) => StorageNode;
|
|
279
|
-
};
|
|
280
|
-
export type StoredFacet = {
|
|
281
|
-
/**
|
|
282
|
-
* the chain storage path at which the node was constructed
|
|
283
|
-
*/
|
|
284
|
-
getPath: () => Promise<string>;
|
|
285
|
-
/**
|
|
286
|
-
* DEPRECATED use getPath
|
|
287
|
-
*/
|
|
288
|
-
getStoreKey: StorageNode['getStoreKey'];
|
|
289
|
-
/**
|
|
290
|
-
* get the unserializer for the stored data
|
|
291
|
-
*/
|
|
292
|
-
getUnserializer: () => Unserializer;
|
|
293
|
-
};
|
|
294
|
-
export type StoredSubscription<T> = Subscription<T> & {
|
|
223
|
+
export type StoredSubscription<T> = ForkableAsyncIterable<T, T, undefined> & EachTopic<T> & SharableSubscription<T> & {
|
|
295
224
|
getStoreKey: () => Promise<VStorageKey & {
|
|
296
225
|
subscription: Subscription<T>;
|
|
297
226
|
}>;
|
|
298
227
|
getUnserializer: () => Unserializer;
|
|
299
228
|
};
|
|
300
|
-
export type StoredSubscriber<T> =
|
|
229
|
+
export type StoredSubscriber<T> = LatestTopic<T> & EachTopic<T> & StoredFacet;
|
|
230
|
+
import type { Unserializer } from '@agoric/internal/src/lib-chainStorage.js';
|
|
231
|
+
import type { StoredFacet } from '@agoric/internal/src/lib-chainStorage.js';
|
|
301
232
|
//# sourceMappingURL=types.d.ts.map
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.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C,AAFmD,CAAC,GAC1E,qBAAyB,CACJ,CAAC,AADK,EACN,CAAC,AADQ,CAAC,GAC/B,gBAAoB,CAAC,CAAC,CAAC;6BAOsB,CAAC;;;;;;;;;;;kCAAjC,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;;;;;2BAe1B,CAAC;;;;aADV,OAAO,eAAe,EAAE,eAAe,GAAG,iBAAiB,CAClD,CAAC,AADmD,CAAC;;;;cAC9D,QAAQ,CAAC,CAAC,CAAC;;;;;yBAQC,CAAC,IADd,iBAAiB,CACJ,CAAC,AADK,CAAC,GAAG,SAAS,CACnB,CAAC,AADoB,CAAC,GAC/C,oBAAwB,CAAC,CAAC,CAAC;iCAOU,CAAC;;;;;;;;;;;sCAAzB,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;+BAed,CAAC;iBADd,iBAAiB,CACJ,CAAC,AADK,CAAC;kBACpB,YAAY,CAAC,CAAC,CAAC;;+BAS8C,CAAC;iBAA1D,MAAM,OAAO,CAAC,WAAW,GAAG;QAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;;;6BAOxD,CAAC;kCAvSmB,0CAA0C;iCAA1C,0CAA0C"}
|
package/src/types.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
export {};
|
|
2
1
|
// @jessie-check
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
|
-
* @
|
|
6
|
-
* @typedef {import('@endo/far').ERef<T>} ERef
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @template T
|
|
11
|
-
* @typedef {import('@endo/promise-kit').PromiseKit<T>} PromiseKit
|
|
4
|
+
* @import {StoredFacet, Unserializer} from '@agoric/internal/src/lib-chainStorage.js';
|
|
12
5
|
*/
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
* @template T
|
|
18
|
-
* @typedef {import('@endo/promise-kit').PromiseRecord<T>} PromiseRecord
|
|
19
|
-
*/
|
|
7
|
+
// Ensure this is a module.
|
|
8
|
+
export {};
|
|
20
9
|
|
|
21
10
|
/**
|
|
22
11
|
* @template T
|
|
@@ -58,7 +47,7 @@ export {};
|
|
|
58
47
|
|
|
59
48
|
/**
|
|
60
49
|
* @template T
|
|
61
|
-
* @typedef {object} IterationObserver
|
|
50
|
+
* @typedef {object} IterationObserver
|
|
62
51
|
* A valid sequence of calls to the methods of an `IterationObserver`
|
|
63
52
|
* represents an iteration. A valid sequence consists of any number of calls
|
|
64
53
|
* to `updateState` with the successive non-final values, followed by a
|
|
@@ -167,14 +156,14 @@ export {};
|
|
|
167
156
|
|
|
168
157
|
/**
|
|
169
158
|
* @template T
|
|
170
|
-
* @typedef {object} PublishKit
|
|
159
|
+
* @typedef {object} PublishKit
|
|
171
160
|
* @property {Publisher<T>} publisher
|
|
172
161
|
* @property {Subscriber<T>} subscriber
|
|
173
162
|
*/
|
|
174
163
|
|
|
175
164
|
/**
|
|
176
165
|
* @template T
|
|
177
|
-
* @typedef {object} StoredPublishKit
|
|
166
|
+
* @typedef {object} StoredPublishKit
|
|
178
167
|
* @property {Publisher<T>} publisher
|
|
179
168
|
* @property {StoredSubscriber<T>} subscriber
|
|
180
169
|
*/
|
|
@@ -222,7 +211,7 @@ export {};
|
|
|
222
211
|
|
|
223
212
|
/**
|
|
224
213
|
* @template T
|
|
225
|
-
* @typedef {object} UpdateRecord
|
|
214
|
+
* @typedef {object} UpdateRecord
|
|
226
215
|
* @property {T} value is whatever state the service wants to publish
|
|
227
216
|
* @property {bigint} [updateCount] is a value that identifies the update. For
|
|
228
217
|
* the last update, it is `undefined`.
|
|
@@ -237,10 +226,10 @@ export {};
|
|
|
237
226
|
|
|
238
227
|
/**
|
|
239
228
|
* @template T
|
|
240
|
-
* @typedef {NotifierInternals<T> &
|
|
229
|
+
* @typedef {import('@endo/marshal').RemotableObject & NotifierInternals<T> &
|
|
241
230
|
* ForkableAsyncIterable<T, T> &
|
|
242
231
|
* SharableNotifier<T>
|
|
243
|
-
* } Notifier
|
|
232
|
+
* } Notifier an object that can be used to get the current state or updates
|
|
244
233
|
*/
|
|
245
234
|
|
|
246
235
|
/**
|
|
@@ -259,8 +248,8 @@ export {};
|
|
|
259
248
|
|
|
260
249
|
/**
|
|
261
250
|
* @template T
|
|
262
|
-
* @typedef {object} NotifierRecord
|
|
263
|
-
* @property {IterationObserver<T>} updater the (closely-held) notifier producer
|
|
251
|
+
* @typedef {object} NotifierRecord the produced notifier/updater pair
|
|
252
|
+
* @property {import('@endo/marshal').RemotableObject & IterationObserver<T>} updater the (closely-held) notifier producer
|
|
264
253
|
* @property {Notifier<T>} notifier the (widely-held) notifier consumer
|
|
265
254
|
*/
|
|
266
255
|
|
|
@@ -269,7 +258,7 @@ export {};
|
|
|
269
258
|
/**
|
|
270
259
|
* @template T
|
|
271
260
|
* @typedef {IterableEachTopic<T> & EachTopic<T> &
|
|
272
|
-
* SharableSubscription<T>} Subscription
|
|
261
|
+
* SharableSubscription<T>} Subscription
|
|
273
262
|
* A form of AsyncIterable supporting distributed and multicast usage.
|
|
274
263
|
*/
|
|
275
264
|
|
|
@@ -289,49 +278,13 @@ export {};
|
|
|
289
278
|
|
|
290
279
|
/**
|
|
291
280
|
* @template T
|
|
292
|
-
* @typedef {object} SubscriptionRecord
|
|
281
|
+
* @typedef {object} SubscriptionRecord
|
|
293
282
|
* @property {IterationObserver<T>} publication
|
|
294
283
|
* @property {Subscription<T>} subscription
|
|
295
284
|
*/
|
|
296
285
|
|
|
297
286
|
// /////////////////////////////////////////////////////////////////////////////
|
|
298
287
|
|
|
299
|
-
/** @template [Slot=unknown] @typedef {import('@endo/marshal').Marshal<Slot>} Marshaller */
|
|
300
|
-
/** @typedef {Pick<Marshaller, 'fromCapData'>} Unserializer */
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Defined by vstorageStoreKey in vstorage.go
|
|
304
|
-
*
|
|
305
|
-
* @typedef VStorageKey
|
|
306
|
-
* @property {string} storeName
|
|
307
|
-
* @property {string} storeSubkey
|
|
308
|
-
* @property {string} dataPrefixBytes
|
|
309
|
-
* @property {string} [noDataValue]
|
|
310
|
-
*/
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* This represents a node in an IAVL tree.
|
|
314
|
-
*
|
|
315
|
-
* The active implementation is x/vstorage, an Agoric extension of the Cosmos SDK.
|
|
316
|
-
*
|
|
317
|
-
* Vstorage is a hierarchical externally-reachable storage structure that
|
|
318
|
-
* identifies children by restricted ASCII name and is associated with arbitrary
|
|
319
|
-
* string-valued data for each node, defaulting to the empty string.
|
|
320
|
-
*
|
|
321
|
-
* @typedef {object} StorageNode
|
|
322
|
-
* @property {(data: string) => Promise<void>} setValue publishes some data (append to the node)
|
|
323
|
-
* @property {() => string} getPath the chain storage path at which the node was constructed
|
|
324
|
-
* @property {() => Promise<VStorageKey>} getStoreKey DEPRECATED use getPath
|
|
325
|
-
* @property {(subPath: string, options?: {sequence?: boolean}) => StorageNode} makeChildNode
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* @typedef {object} StoredFacet
|
|
330
|
-
* @property {() => Promise<string>} getPath the chain storage path at which the node was constructed
|
|
331
|
-
* @property {StorageNode['getStoreKey']} getStoreKey DEPRECATED use getPath
|
|
332
|
-
* @property {() => Unserializer} getUnserializer get the unserializer for the stored data
|
|
333
|
-
*/
|
|
334
|
-
|
|
335
288
|
/**
|
|
336
289
|
* @deprecated use StoredSubscriber
|
|
337
290
|
* @template T
|
package/tools/testSupports.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ export function makeFakeStorage(path: string, publication?: IterationObserver<un
|
|
|
3
3
|
countSetValueCalls: () => number;
|
|
4
4
|
};
|
|
5
5
|
export function makeFakeMarshaller(): {
|
|
6
|
-
toCapData: import("@endo/marshal
|
|
7
|
-
fromCapData: import("@endo/marshal
|
|
8
|
-
serialize: import("@endo/marshal
|
|
9
|
-
unserialize: import("@endo/marshal
|
|
6
|
+
toCapData: import("@endo/marshal").ToCapData<any>;
|
|
7
|
+
fromCapData: import("@endo/marshal").FromCapData<any>;
|
|
8
|
+
serialize: import("@endo/marshal").ToCapData<any>;
|
|
9
|
+
unserialize: import("@endo/marshal").FromCapData<any>;
|
|
10
10
|
};
|
|
11
|
+
import type { IterationObserver } from '../src/types.js';
|
|
12
|
+
import type { StorageNode } from '@agoric/internal/src/lib-chainStorage.js';
|
|
11
13
|
//# sourceMappingURL=testSupports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testSupports.d.ts","sourceRoot":"","sources":["testSupports.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"testSupports.d.ts","sourceRoot":"","sources":["testSupports.js"],"names":[],"mappings":";AAaO,sCAHI,MAAM;wBAWgC,MAAM,MAAM;EAe5D;AAGM;;;;;EAGH;uCAvCgC,iBAAiB;iCACvB,0CAA0C"}
|
package/tools/testSupports.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
// eslint-disable-next-line import/order
|
|
2
1
|
import { Far, makeMarshal } from '@endo/marshal';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @import {IterationObserver} from '../src/types.js';
|
|
5
|
+
* @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
|
|
6
|
+
*/
|
|
5
7
|
|
|
6
8
|
export { eventLoopIteration } from '@agoric/internal/src/testing-utils.js';
|
|
7
9
|
|