Compare commits

..

2 Commits

Author SHA1 Message Date
eee146ae8b 2.1.4 2020-07-12 10:57:15 +00:00
ea8ef61c40 fix(core): update 2020-07-12 10:57:15 +00:00
3 changed files with 4 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/taskbuffer", "name": "@pushrocks/taskbuffer",
"version": "2.1.3", "version": "2.1.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/taskbuffer", "name": "@pushrocks/taskbuffer",
"version": "2.1.3", "version": "2.1.4",
"private": false, "private": false,
"description": "flexible task management. TypeScript ready!", "description": "flexible task management. TypeScript ready!",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -9,7 +9,7 @@ export class TaskDebounced<T = unknown> extends Task {
constructor(optionsArg: { constructor(optionsArg: {
name: string; name: string;
taskFunction: ITaskFunction; taskFunction: ITaskFunction;
type: 'atMostEvery' | 'afterQuietFor' debounceTimeInMillis: number;
}) { }) {
super({ super({
name: optionsArg.name, name: optionsArg.name,
@ -18,7 +18,7 @@ export class TaskDebounced<T = unknown> extends Task {
} }
}); });
this.taskFunction = optionsArg.taskFunction; 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); this.taskFunction(x);
}); });
} }