MCPcopy Index your code
hub / github.com/angular/angular / remove

Method remove

packages/core/src/defer/timer_scheduler.ts:72–84  ·  view source on GitHub ↗
(callback: VoidFunction)

Source from the content-addressed store, hash-verified

70 }
71
72 remove(callback: VoidFunction) {
73 const {current, deferred} = this;
74 const callbackIndex = this.removeFromQueue(current, callback);
75 if (callbackIndex === -1) {
76 // Try cleaning up deferred queue only in case
77 // we didn't find a callback in the "current" queue.
78 this.removeFromQueue(deferred, callback);
79 }
80 // If the last callback was removed and there is a pending timeout - cancel it.
81 if (current.length === 0 && deferred.length === 0) {
82 this.clearTimeout();
83 }
84 }
85
86 private addToQueue(
87 target: Array<number | VoidFunction>,

Callers

nothing calls this directly

Calls 2

removeFromQueueMethod · 0.95
clearTimeoutMethod · 0.95

Tested by

no test coverage detected