DefinitelyTyped/types/estimate/index.d.ts
2019-10-08 16:36:02 -07:00

22 lines
572 B
TypeScript

// Type definitions for estimate 1.0
// Project: https://github.com/bevacqua/estimate
// Definitions by: Luis Rodrigues <https://github.com/goblindegook>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Options {
speed?: number;
spaces?: RegExp;
}
export interface Estimate {
progress: number;
remaining: number;
total: number;
update(): void;
initialize(): void;
}
export function element(element: HTMLElement, options?: Options): Estimate;
export function text(text: string, options?: Options): number;