diff --git a/packages/consumer/mod.ts b/packages/consumer/mod.ts index 26de50c..69960f6 100644 --- a/packages/consumer/mod.ts +++ b/packages/consumer/mod.ts @@ -92,7 +92,7 @@ export class Consumer { /** * Asynchronously iterate through items in the user's PDS */ - async *listItems(): AsyncIterator< + async *listItems(): AsyncGenerator< DecryptedItem, void, undefined @@ -118,7 +118,7 @@ export class Consumer { ); } - if (res.data.cursor) cursor = res.data.cursor; + cursor = res.data.cursor; for (const record of res.data.records) { const item = parse(AppCisternLexiconItem.mainSchema, record.value); @@ -147,7 +147,7 @@ export class Consumer { * Subscribes to the Jetstreams for the user's items. Pass `"stop"` into `subscription.next(...)` to cancel * @todo Allow specifying Jetstream endpoint */ - async *subscribeToItems(): AsyncIterator< + async *subscribeToItems(): AsyncGenerator< DecryptedItem, void, "stop" | undefined