diff --git a/src/nman.ts b/src/nman.ts index c4aeb9d..5a28f57 100644 --- a/src/nman.ts +++ b/src/nman.ts @@ -9,10 +9,10 @@ async function exitHandler() { export class ShutdownTasks { static list: ShutdownTasks[][] = []; - task: () => Promise | void; + task: () => Promise | void; maxMillis: number; order: number; - constructor(task: () => Promise | void, maxMillis: number, order: number) { + constructor(task: () => Promise | void, maxMillis: number, order: number) { this.task = task; this.maxMillis = maxMillis; this.order = order; @@ -25,7 +25,7 @@ export class ShutdownTasks { } } -export const addShutdownTask = function (task: () => Promise | void, maxMillis = 5000, order = 1) { +export const addShutdownTask = function (task: () => Promise | void, maxMillis = 5000, order = 1) { return new ShutdownTasks(task, maxMillis, order); };