UNPKG

ngx-timeago

Version:

Live updating timestamps in Angular 6+.

28 lines (27 loc) 1.05 kB
import { OnDestroy, PipeTransform, ChangeDetectorRef } from '@angular/core'; import { Subject } from 'rxjs'; import { TimeagoClock } from './timeago.clock'; import { TimeagoFormatter } from './timeago.formatter'; import { TimeagoIntl } from './timeago.intl'; import * as i0 from "@angular/core"; export declare class TimeagoPipe implements PipeTransform, OnDestroy { private clock; private intlSubscription; private clockSubscription; private date; private value; private live; /** * Emits on: * - Input change * - Intl change * - Clock tick */ stateChanges: Subject<void>; constructor(intl: TimeagoIntl, cd: ChangeDetectorRef, formatter: TimeagoFormatter, clock: TimeagoClock); transform(date: any, ...args: any[]): string; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<TimeagoPipe, [{ optional: true; }, null, null, null]>; static ɵpipe: i0.ɵɵPipeDeclaration<TimeagoPipe, "timeago", false>; static ɵprov: i0.ɵɵInjectableDeclaration<TimeagoPipe>; }