vix void
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
jusax23 2023-02-25 17:53:28 +01:00
parent 7bd6185865
commit f3c974b82f

View file

@ -9,10 +9,10 @@ async function exitHandler() {
export class ShutdownTasks { export class ShutdownTasks {
static list: ShutdownTasks[][] = []; static list: ShutdownTasks[][] = [];
task: () => Promise<any> | void; task: () => Promise<void> | void;
maxMillis: number; maxMillis: number;
order: number; order: number;
constructor(task: () => Promise<any> | void, maxMillis: number, order: number) { constructor(task: () => Promise<void> | void, maxMillis: number, order: number) {
this.task = task; this.task = task;
this.maxMillis = maxMillis; this.maxMillis = maxMillis;
this.order = order; this.order = order;
@ -25,7 +25,7 @@ export class ShutdownTasks {
} }
} }
export const addShutdownTask = function (task: () => Promise<any> | void, maxMillis = 5000, order = 1) { export const addShutdownTask = function (task: () => Promise<void> | void, maxMillis = 5000, order = 1) {
return new ShutdownTasks(task, maxMillis, order); return new ShutdownTasks(task, maxMillis, order);
}; };