diff --git a/packages/notifier/src/storesub.js b/packages/notifier/src/storesub.js index 1068fa3379a..5dcfd3e2781 100644 --- a/packages/notifier/src/storesub.js +++ b/packages/notifier/src/storesub.js @@ -140,10 +140,11 @@ export const makeStoredSubscription = ( /** @type {StoredSubscription} */ const storesub = Far('StoredSubscription', { - // @ts-expect-error getStoreKey type does not have `subscription` getStoreKey: async () => { if (!storageNode) { - return harden({ subscription }); + return /** @type {Awaited['getStoreKey']>>} */ ( + harden({ subscription }) + ); } const storeKey = await E(storageNode).getStoreKey(); return harden({ ...storeKey, subscription }); diff --git a/packages/notifier/src/types-ambient.js b/packages/notifier/src/types-ambient.js index c0e7c40db34..8d6a9c36722 100644 --- a/packages/notifier/src/types-ambient.js +++ b/packages/notifier/src/types-ambient.js @@ -317,11 +317,7 @@ * identifies children by restricted ASCII name and is associated with arbitrary * string-valued data for each node, defaulting to the empty string. * - * @typedef {object} StorageNode - * @property {(data: string) => Promise} setValue publishes some data (append to the node) - * @property {() => string} getPath the chain storage path at which the node was constructed - * @property {() => Promise} getStoreKey DEPRECATED use getPath - * @property {(subPath: string, options?: {sequence?: boolean}) => StorageNode} makeChildNode + * @typedef {import('@agoric/internal/src/lib-chainStorage').StorageNode} StorageNode */ /** diff --git a/packages/notifier/tools/testSupports.js b/packages/notifier/tools/testSupports.js index f1eceb40db7..4adfc808edd 100644 --- a/packages/notifier/tools/testSupports.js +++ b/packages/notifier/tools/testSupports.js @@ -28,6 +28,9 @@ export const makeFakeStorage = (path, publication) => { publication.updateState(value); } }, + delete: async () => { + throw Error('not implemented'); + }, makeChildNode: () => storage, countSetValueCalls: () => setValueCalls, });