ng-time-past-pipe
Version:
Reactive textual representation of the time that has been passed between a given date and now in your Angular App.
32 lines (31 loc) • 899 B
TypeScript
import { TimeDiff } from './time-diff';
import { InjectionToken } from '@angular/core';
/**
* Function Type for the `UpdateIntervalGenerator`
*
* @public
* @api
*/
export declare type UpdateIntervalGenerator = (diff: TimeDiff) => number;
/**
* Custom `UpdateIntervalGenerator` Injection Token
*
* @public
* @api
*/
export declare const CUSTOM_UPDATE_INTERVAL_GENERATOR: InjectionToken<UpdateIntervalGenerator>;
/**
* Determinate the point of time on when the output should be checked for a update
*
* @param diff The time diff object
* @return A point of time in future in seconds
* @public
* @api
*/
export declare const defaultUpdateIntervalGenerator: UpdateIntervalGenerator;
/**
* Provides the `UpdateIntervalGenerator` preferring a custom provider for internal usage
*
* @internal
*/
export declare const UPDATE_INTERVAL_GENERATOR: InjectionToken<UpdateIntervalGenerator>;