Skip to content

Commit

Permalink
fix: Make IAtom['reportObserved'] return boolean (#3193)
Browse files Browse the repository at this point in the history
* Make `IAtom['reportObserved']` return `boolean`

This is more like [the docs](https://mobx.js.org/custom-observables.html#atoms)

* Create beige-goats-vanish.md

Co-authored-by: urugator <11457665+urugator@users.noreply.github.com>
  • Loading branch information
ChocolateLoverRaj and urugator committed Nov 24, 2021
1 parent 50b8010 commit 9d5e65c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/beige-goats-vanish.md
@@ -0,0 +1,5 @@
---
"mobx": patch
---

Make `IAtom['reportObserved']` return `boolean`
2 changes: 1 addition & 1 deletion packages/mobx/src/core/atom.ts
Expand Up @@ -17,7 +17,7 @@ import {
export const $mobx = Symbol("mobx administration")

export interface IAtom extends IObservable {
reportObserved()
reportObserved(): boolean
reportChanged()
}

Expand Down

0 comments on commit 9d5e65c

Please sign in to comment.