UNPKG

@krai-tech/web-api

Version:

A set of common tokens for consuming Web API with Angular.

12 lines (11 loc) 574 B
import { InjectionToken } from '@angular/core'; import { Observable } from 'rxjs'; /** * Injection token for an Observable based on `window.requestAnimationFrame`. * * This token provides an Observable that emits timestamps on each animation frame. * It utilizes the WINDOW injection token to access the requestAnimationFrame and cancelAnimationFrame * methods of the global window object. The Observable is shared to ensure multiple subscribers * receive the same animation frame updates. */ export declare const ANIMATION_FRAME: InjectionToken<Observable<number>>;