@krai-tech/web-api
Version:
A set of common tokens for consuming Web API with Angular.
12 lines (11 loc) • 581 B
TypeScript
import { InjectionToken } from '@angular/core';
import type { Observable } from 'rxjs';
/**
* Injection token for an Observable that emits the visibility state of the document.
*
* This token provides an Observable that emits a boolean value indicating whether the document
* is visible or hidden. It uses the `visibilitychange` event of the document to detect changes
* in visibility state. The Observable is shared and replayed, ensuring that subscribers receive
* the latest visibility state.
*/
export declare const PAGE_VISIBILITY: InjectionToken<Observable<boolean>>;