MCPcopy
hub / github.com/andremichelle/openDAW / clear

Method clear

packages/lib/std/src/observables.ts:84–89  ·  view source on GitHub ↗
(procedure?: Procedure<T>)

Source from the content-addressed store, hash-verified

82 }
83
84 clear(procedure?: Procedure<T>): void {
85 if (this.#option.isEmpty()) {return}
86 if (isDefined(procedure)) {procedure(this.#option.unwrap())}
87 this.#option = Option.None
88 this.#notifier.notify(this)
89 }
90
91 assert(fail?: ValueOrProvider<string>): this {
92 this.#option.assert(fail)

Callers

nothing calls this directly

Calls 4

isDefinedFunction · 0.90
isEmptyMethod · 0.65
unwrapMethod · 0.65
notifyMethod · 0.45

Tested by

no test coverage detected