Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readable interface #274

Open
rbalicki2 opened this issue Nov 14, 2024 · 0 comments
Open

Readable interface #274

rbalicki2 opened this issue Nov 14, 2024 · 0 comments

Comments

@rbalicki2
Copy link
Collaborator

Depends on #273.

I think all things that can be read, which might just be fragment references, but could also be other things, should probably implement the following interface:

interface Readable<T> {
  read(): T,
  readButDoNotSuspend(): { kind: 'Pending' } | { kind: 'Value', value: T }
}

and we should only encounter fragment references as items of this interface, not as concrete fragment references.

All APIs (e.g. useResult, FragmentReader, etc.) should accept items of this interface, not fragment references directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant