MCPcopy Create free account
hub / github.com/facebook/Rapid / resetAsync

Method resetAsync

modules/core/EditSystem.js:169–180  ·  view source on GitHub ↗

* resetAsync * Called after completing an edit session to reset any internal state * @return {Promise} Promise resolved when this component has completed resetting

()

Source from the content-addressed store, hash-verified

167 * @return {Promise} Promise resolved when this component has completed resetting
168 */
169 resetAsync() {
170 const prevIndex = this._index;
171 this._reset();
172
173 // Emit all events
174 this.emit('stagingchange', this._fullDifference); // will be an empty Difference (this is ok)
175 this.emit('stablechange', this._fullDifference);
176 this.emit('historyjump', prevIndex, this._index);
177 this.emit('backupstatuschange', this._backupStatus); // emit `true` to clear any previous errors
178
179 return Promise.resolve();
180 }
181
182
183 /**

Callers 1

restoreBackupMethod · 0.45

Calls 1

_resetMethod · 0.95

Tested by

no test coverage detected