From 02e6cede3da04236e0aac21815025320e94e5c87 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 18 Jan 2021 12:23:28 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E5=9C=A8non-term?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8B=E9=A6=96=E6=AC=A1=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/hydrooj/src/ui.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/hydrooj/src/ui.ts b/packages/hydrooj/src/ui.ts index 93d15e3a4..cbd570862 100644 --- a/packages/hydrooj/src/ui.ts +++ b/packages/hydrooj/src/ui.ts @@ -4,6 +4,7 @@ import cluster from 'cluster'; import { terminal, TextBox, LabeledInput, } from 'terminal-kit'; +import { ProgressBarOptions } from 'terminal-kit/Terminal'; import { argv } from 'yargs'; import * as bus from './service/bus'; @@ -29,10 +30,12 @@ export namespace Progress { console.log('done: ', this.args, args); } - stop: () => {} + stop() { + console.log('stop', this.args); + } } - export function create(args) { + export function create(args: ProgressBarOptions) { // TODO handle worker process return useTerminal ? terminal.progressBar(args)