UNPKG

763 BTypeScriptView Raw
1import { ChangeDetectorRef, PipeTransform, OnDestroy, NgZone } from '@angular/core';
2import * as moment from 'moment';
3export declare class TimeAgoPipe implements PipeTransform, OnDestroy {
4 private cdRef;
5 private ngZone;
6 private currentTimer;
7 private lastTime;
8 private lastValue;
9 private lastOmitSuffix;
10 private lastLocale?;
11 private lastText;
12 constructor(cdRef: ChangeDetectorRef, ngZone: NgZone);
13 transform(value: Date | moment.Moment, omitSuffix?: boolean): string;
14 ngOnDestroy(): void;
15 private createTimer();
16 private removeTimer();
17 private getSecondsUntilUpdate(momentInstance);
18 private hasChanged(value, omitSuffix?);
19 private getTime(value);
20 private getLocale(value);
21}