MCPcopy
hub / github.com/mobxjs/mobx / clear

Method clear

packages/mobx/src/types/observablemap.ts:366–374  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

364 }
365
366 clear() {
367 transaction(() => {
368 untracked(() => {
369 for (const key of this.keys()) {
370 this.delete(key)
371 }
372 })
373 })
374 }
375
376 replace(values: IObservableMapInitialValues<K, V>): ObservableMap<K, V> {
377 // Implementation requirements:

Callers

nothing calls this directly

Calls 4

keysMethod · 0.95
deleteMethod · 0.95
transactionFunction · 0.50
untrackedFunction · 0.50

Tested by

no test coverage detected