UNPKG

979 BTypeScriptView Raw
1import { ChangeDetectorRef, PipeTransform, OnDestroy, NgZone } from '@angular/core';
2import moment from 'moment';
3import * as i0 from "@angular/core";
4export declare class TimeAgoPipe implements PipeTransform, OnDestroy {
5 private cdRef;
6 private ngZone;
7 private currentTimer;
8 private lastTime;
9 private lastValue;
10 private lastOmitSuffix;
11 private lastLocale?;
12 private lastText;
13 private formatFn;
14 constructor(cdRef: ChangeDetectorRef, ngZone: NgZone);
15 format(m: moment.Moment): string;
16 transform(value: moment.MomentInput, omitSuffix?: boolean, formatFn?: (m: moment.Moment) => string): string;
17 ngOnDestroy(): void;
18 private createTimer;
19 private removeTimer;
20 private getSecondsUntilUpdate;
21 private hasChanged;
22 private getTime;
23 private getLocale;
24 static ɵfac: i0.ɵɵFactoryDeclaration<TimeAgoPipe, never>;
25 static ɵpipe: i0.ɵɵPipeDeclaration<TimeAgoPipe, "amTimeAgo">;
26}