(callback: VoidFunction, options?: IdleRequestOptions)
| 64 | private readonly idleService = inject(IDLE_SERVICE); |
| 65 | |
| 66 | add(callback: VoidFunction, options?: IdleRequestOptions) { |
| 67 | const key = getIdleRequestKey(options); |
| 68 | this.callbackBucket.set(callback, key); |
| 69 | |
| 70 | let bucket = this.buckets.get(key); |
| 71 | if (bucket == null) { |
| 72 | bucket = {idleId: null, queue: new Set()}; |
| 73 | this.buckets.set(key, bucket); |
| 74 | } |
| 75 | bucket.queue.add(callback); |
| 76 | this.scheduleBucket(bucket, options); |
| 77 | } |
| 78 | |
| 79 | remove(callback: VoidFunction) { |
| 80 | const key = this.callbackBucket.get(callback); |
nothing calls this directly
no test coverage detected