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

ReferenceStore creation, non-async #203

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

keller-mark
Copy link
Collaborator

Fixes #202

Copy link

changeset-bot bot commented Aug 23, 2024

🦋 Changeset detected

Latest commit: 8ad0ddf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@zarrita/storage Patch
@zarrita/core Patch
@zarrita/indexing Patch
@zarrita/ndarray Patch
zarrita Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Owner

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this! Yeah the function coloring isn't the nicest and this is a great solution. I think we could support refs as a Promise or the original, to keep the constructor signature similar to before.

If one were to load the references separately, it might be a bit awkward to require:

new ReferenceStore(Promise.resolve(map))

packages/storage/src/ref.ts Outdated Show resolved Hide resolved
packages/storage/src/ref.ts Outdated Show resolved Hide resolved
@keller-mark
Copy link
Collaborator Author

Just made those changes. Potentially a use case for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/try once available as well

Copy link
Owner

@manzt manzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@manzt manzt merged commit 00bebf9 into manzt:main Aug 23, 2024
2 checks passed
@github-actions github-actions bot mentioned this pull request Aug 23, 2024
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

Successfully merging this pull request may close these issues.

Non-async store creation for ReferenceStore
2 participants