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

Method timeout

packages/service-worker/worker/testing/scope.ts:296–311  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

294 }
295
296 override timeout(ms: number): Promise<void> {
297 const promise = new Promise<void>((resolve) => {
298 this.timers.push({
299 at: this.mockTime + ms,
300 duration: ms,
301 fn: resolve,
302 fired: false,
303 });
304 });
305
306 if (this.autoAdvanceTime) {
307 this.advance(ms);
308 }
309
310 return promise;
311 }
312
313 advance(by: number): void {
314 this.mockTime += by;

Callers

nothing calls this directly

Calls 2

advanceMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected