MCPcopy Create free account
hub / github.com/uiwjs/react-codemirror / tick

Method tick

core/src/timeoutLatch.ts:17–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 tick(): void {
18 if (!this.isCancelled && !this.isTimeExhausted) {
19 this.timeLeftMS--;
20 if (this.timeLeftMS <= 0) {
21 this.isTimeExhausted = true;
22 const callbacks = this.callbacks.slice();
23 this.callbacks.length = 0;
24 callbacks.forEach((callback) => {
25 try {
26 callback();
27 } catch (error) {
28 console.error('TimeoutLatch callback error:', error);
29 }
30 });
31 }
32 }
33 }
34
35 cancel(): void {
36 this.isCancelled = true;

Callers 1

startMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected