Pagination: Iterator type / protocol / interface

Open
#4,036 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Start by reading the SDK implementation behind the bucket.list() use case and identify how collection results are currently represented. Define the iterator protocol and its scope across the affected APIs, then verify that callers can iterate without requiring all items to be loaded into memory.

Written by the indexing model from the issue text.

Description

✨ enhancement 🎨 sdk 📐 language-design needs-discussion
Feature Spec

We would like to have a way to to model APIs that let you iterate over some number of items, but without having to necessarily load all of the items in memory.

Use Cases

For example, bucket.list() should return Iterator<string> instead of Array<string>.

Implementation Notes

No response

Component

SDK

Community Notes
  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
Dominant language
TypeScript
Stars
5.4k
Forks
215
Avg merge
2h 9m
Merged PRs (30d)
27

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from winglang/wing

All issues in winglang/wing

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.