Skip to content

Commit

Permalink
add recomputeInvalidatedAtoms to secret internals
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaskasky committed Jan 21, 2025
1 parent 50c4d12 commit ce88664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vanilla/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ type SecretStoreMethods = readonly [
atom: Atom<Value>,
atomState: AtomState<Value>,
) => Mounted | undefined,
recomputeInvalidatedAtoms: () => void,
]

type Store = {
Expand Down Expand Up @@ -229,7 +230,6 @@ type BuildStore = (
atom: WritableAtom<Value, Args, Result>,
...params: Parameters<WritableAtom<Value, Args, Result>['write']>
) => Result,
atomOnInit?: (atom: AnyAtom, store: Store) => void,
atomOnMount?: <Value, Args extends unknown[], Result>(
atom: WritableAtom<Value, Args, Result>,
setAtom: (...args: Args) => Result,
Expand All @@ -240,7 +240,6 @@ const buildStore: BuildStore = (
ensureAtomState,
atomRead = (atom, ...params) => atom.read(...params),
atomWrite = (atom, ...params) => atom.write(...params),
atomOnInit = (atom, store) => atom.unstable_onInit?.(store),
atomOnMount = (atom, setAtom) => atom.onMount?.(setAtom),
): Store => {
// These are store state.
Expand Down Expand Up @@ -699,6 +698,7 @@ const buildStore: BuildStore = (
writeAtomState,
mountAtom,
unmountAtom,
recomputeInvalidatedAtoms,
],
}
return store
Expand Down

0 comments on commit ce88664

Please sign in to comment.