UNPKG

ngx-countdown

Version:

Simple, easy and performance countdown for angular

62 lines (61 loc) 1.86 kB
import { OnChanges, SimpleChanges, OnDestroy, EventEmitter, OnInit, SimpleChange, TemplateRef } from '@angular/core'; import { CountdownConfig, CountdownEvent, CountdownItem } from './interfaces'; import * as i0 from "@angular/core"; export declare class CountdownComponent implements OnInit, OnChanges, OnDestroy { private locale; private timer; private cdr; private ngZone; private defCog; private frequency; private _notify; private status; private isDestroy; private _config; i: CountdownItem; left: number; set config(i: CountdownConfig); get config(): CountdownConfig; render?: TemplateRef<{ $implicit: CountdownItem; }>; readonly event: EventEmitter<CountdownEvent>; /** * Start countdown, you must manually call when `demand: false` */ begin(): void; /** * Restart countdown */ restart(): void; /** * Stop countdown, must call `restart` when stopped, it's different from pause, unable to recover */ stop(): void; /** * Pause countdown, you can use `resume` to recover again */ pause(): void; /** * Resume countdown */ resume(): void; private callEvent; private init; private destroy; /** * 更新时钟 */ private reflow; /** * 获取倒计时剩余帧数 */ private getLeft; ngOnInit(): void; ngOnDestroy(): void; ngOnChanges(changes: { [P in keyof this]?: SimpleChange; } & SimpleChanges): void; static ɵfac: i0.ɵɵFactoryDeclaration<CountdownComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<CountdownComponent, "countdown", never, { "config": { "alias": "config"; "required": true; }; "render": { "alias": "render"; "required": false; }; }, { "event": "event"; }, never, never, true, never>; }