-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
feat(store2): add dev4_get_mounted_atoms #2594
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Size Change: +141 B (+0.15%) Total Size: 92.1 kB
ℹ️ View Unchanged
|
Preview in LiveCodesLatest commit: 05a9abb
See documentations for usage instructions. |
src/vanilla/store2.ts
Outdated
@@ -243,6 +243,7 @@ const flushPending = (pending: Pending) => { | |||
// for debugging purpose only | |||
type DevStoreRev4 = { | |||
dev4_get_internal_weak_map: () => WeakMap<AnyAtom, AtomState> | |||
dev4_get_mounted_atoms: () => IterableIterator<AnyAtom> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to return the Set, given that our contract is it's read-only.
dev4_get_mounted_atoms: () => IterableIterator<AnyAtom> | |
dev4_get_mounted_atoms: () => Set<AnyAtom> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Updated it in this commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for working on this.
* feat: add dev4_get_mounted_atoms * refactor: return a set from dev4_get_mounted_atoms --------- Co-authored-by: Daishi Kato <[email protected]>
Summary
dev4_get_mounted_atoms
to return Iterable list of mounted atomsCheck List
pnpm run prettier
for formatting code and docs