UNPKG

time-ago-pipe

Version:

A really simple, lightweight Angular pipe for converting a date string into a time ago

12 lines (11 loc) 444 B
import { PipeTransform, NgZone, ChangeDetectorRef, OnDestroy } from "@angular/core"; export declare class TimeAgoPipe implements PipeTransform, OnDestroy { private changeDetectorRef; private ngZone; private timer; constructor(changeDetectorRef: ChangeDetectorRef, ngZone: NgZone); transform(value: string): string; ngOnDestroy(): void; private removeTimer(); private getSecondsUntilUpdate(seconds); }