From ea8ef61c4074fd5aab3dbb9d982afe1ef1d8f9cc Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 12 Jul 2020 10:57:15 +0000 Subject: [PATCH] fix(core): update --- ts/taskbuffer.classes.taskdebounced.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/taskbuffer.classes.taskdebounced.ts b/ts/taskbuffer.classes.taskdebounced.ts index f8c9c29..7475995 100644 --- a/ts/taskbuffer.classes.taskdebounced.ts +++ b/ts/taskbuffer.classes.taskdebounced.ts @@ -9,7 +9,7 @@ export class TaskDebounced extends Task { constructor(optionsArg: { name: string; taskFunction: ITaskFunction; - type: 'atMostEvery' | 'afterQuietFor' + debounceTimeInMillis: number; }) { super({ name: optionsArg.name, @@ -18,7 +18,7 @@ export class TaskDebounced extends Task { } }); this.taskFunction = optionsArg.taskFunction; - this._observableIntake.observable.pipe(plugins.smartrx.rxjs.ops.debounceTime(2000)).subscribe((x) => { + this._observableIntake.observable.pipe(plugins.smartrx.rxjs.ops.debounceTime(optionsArg.debounceTimeInMillis)).subscribe((x) => { this.taskFunction(x); }); }