Skip to content

Commit

Permalink
1.3.1-rc.2, extend args type in process, fix args in worker
Browse files Browse the repository at this point in the history
Ni55aN committed May 17, 2019
1 parent da58089 commit c042c26
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rete",
"version": "1.3.1-rc.1",
"version": "1.3.1-rc.2",
"description": "JavaScript framework",
"main": "build/rete.common.js",
"module": "build/rete.esm.js",
2 changes: 1 addition & 1 deletion src/engine/component.ts
Original file line number Diff line number Diff line change
@@ -11,5 +11,5 @@ export abstract class Component {
this.name = name;
}

abstract worker(node: NodeData, inputs: WorkerInputs, outputs: WorkerOutputs, ...args: any): any;
abstract worker(node: NodeData, inputs: WorkerInputs, outputs: WorkerOutputs, ...args: any[]): any;
}
2 changes: 1 addition & 1 deletion src/engine/index.ts
Original file line number Diff line number Diff line change
@@ -220,7 +220,7 @@ export class Engine extends Context<EventsTypes> {
}
}

async process(data: Data, startId: number | string | null = null, ...args: []) {
async process<T extends any[]>(data: Data, startId: number | string | null = null, ...args: T) {
if (!this.processStart()) return;
if (!this.validate(data)) return;

0 comments on commit c042c26

Please sign in to comment.