()
| 156 | |
| 157 | // Notifies watchers & parents |
| 158 | private notifyState() { |
| 159 | if (this.parent) { |
| 160 | this.parent.reportChildState(); |
| 161 | } |
| 162 | |
| 163 | if (this.watchers.length) { |
| 164 | this.watchers.forEach(watcher => { |
| 165 | watcher(this.state); |
| 166 | }); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | // Recomputes state, incorporating children's states |
| 171 | private updateTotalState() { |
no test coverage detected