代码拉取完成,页面将自动刷新
同步操作将从 fisher/logsets 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import type { NamedColorStyles } from "./colors"
import type { Logsets } from "./"
import type { DeepRequired } from "ts-essentials"
export interface TaskListStatus{
style?:NamedColorStyles
symbol?:string
note?:string
}
export interface TaskListPluginOptions{
indent? : string // 列表缩进字符
style? : NamedColorStyles // 标题样式
width? : number // 列表总宽度
refInterval?:number // 列表项渲染间隔
progressbar?:{
style?:NamedColorStyles // 进度条样式
char?:string // 进度条字符
},
status?:Record<string,TaskListStatus>
}
export type CustomTaskList<CUSTOM_STATUS> = {
[key in keyof CUSTOM_STATUS]: (note?:string)=>void
}
export interface Task {
note(info:string):void
running():boolean
start():void
end():void
running(note?:string):void
complete(note?:string):void
error(note?:string):void
fail(note?:string):void
skip(note?:string):void
stop(note?:string):void
todo(note?:string):void
ignore(note?:string):void
cancel(note?:string):void
}
export type InlineTaskStatus = 'ignore' | 'running' | 'complete' | 'error' | 'abort' | 'fail' | 'cancel' | 'skip' | 'stop' | 'todo'
export type TaskWrokerResult =void | string | InlineTaskStatus | Uppercase<InlineTaskStatus> | [InlineTaskStatus,string] | [Uppercase<InlineTaskStatus>,string]
export type TaskList<CUSTOM_STATUS=any> = {
add(title:string,vars?:any[] | Record<string,any>):void
add(title:string,...vars:any[]):void
// 运行函数任务
run(title:string,vars:any[] | Record<string,any>,worker:()=>Promise<TaskWrokerResult>,options?:{catchError?:boolean,showErrorStack?:boolean}):TaskWrokerResult
run(title:string,worker:()=>Promise<TaskWrokerResult>,options?:{catchError?:boolean,showErrorStack?:boolean}):TaskWrokerResult
separator(char?:string):void
} & Task & CustomTaskList<CUSTOM_STATUS>
export declare const TaskListPlugin: {
(logsets:Logsets,options:DeepRequired<TaskListPluginOptions>):TaskList
}
export default TaskListPlugin
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。