slog-progress
Version:
nodejs简单的进度条
25 lines (24 loc) • 603 B
TypeScript
interface BarOptions {
width?: number;
incomplete?: string;
complete?: string;
}
interface Tokens {
current: number;
total: number;
[key: string]: string | number;
}
declare class SlogBar {
length: number;
description: string;
incomplete: string;
complete: string;
/**
*
* @param {string} description 描述文字和占位符
* @param {object | number} options 配置或进度条长度
*/
constructor(description: string | undefined, options: BarOptions | number);
render(arg: Tokens): false | undefined;
}
export default SlogBar;