From 7ab7ed77b385b6cf85b542045ed88374af3575e3 Mon Sep 17 00:00:00 2001 From: Kris Baumgartner Date: Fri, 31 May 2024 19:01:44 -0700 Subject: [PATCH] Add missing methods to class --- packages/scheduler/src/class/scheduler.ts | 30 ++++++++++++++--------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/scheduler/src/class/scheduler.ts b/packages/scheduler/src/class/scheduler.ts index bfbadf0..44d0cdd 100644 --- a/packages/scheduler/src/class/scheduler.ts +++ b/packages/scheduler/src/class/scheduler.ts @@ -35,17 +35,6 @@ export class Scheduler { return this; } - createTag(id: symbol | string, options?: OptionsObject): Scheduler { - const optionsFns = createOptionsFns(options); - createTag(this, id, ...optionsFns); - return this; - } - - removeTag(id: symbol | string): Scheduler { - removeTag(this, id); - return this; - } - build(): Scheduler { build(this); return this; @@ -60,4 +49,23 @@ export class Scheduler { debug(this); return this; } + + createTag(id: symbol | string, options?: OptionsObject): Scheduler { + const optionsFns = createOptionsFns(options); + createTag(this, id, ...optionsFns); + return this; + } + + removeTag(id: symbol | string): Scheduler { + removeTag(this, id); + return this; + } + + hasTag(id: symbol | string): boolean { + return this.tags.has(id); + } + + getRunnable(id: symbol | string): Runnable | undefined { + return this.symbols.get(id); + } }