Skip to content

Commit

Permalink
[core] refac: don't decide how derived classes should do overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
sroussey committed Apr 9, 2024
1 parent 0f9048d commit 21cb29b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/core/src/task/base/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,12 @@ export abstract class TaskBase {
static readonly category: string = "Hidden";
static readonly sideeffects: boolean = false;

_inputs: TaskInputDefinition[] | undefined = undefined;
_outputs: TaskOutputDefinition[] | undefined = undefined;
get inputs(): TaskInputDefinition[] {
if (this._inputs) {
return this._inputs;
}
return ((this.constructor as typeof TaskBase).inputs as TaskInputDefinition[]) ?? [];
}
set inputs(inputs: TaskInputDefinition[]) {
this._inputs = inputs;
}
get outputs(): TaskOutputDefinition[] {
if (this._outputs) {
return this._outputs;
}
return ((this.constructor as typeof TaskBase).outputs as TaskInputDefinition[]) ?? [];
}
set outputs(outputs: TaskOutputDefinition[]) {
this._outputs = outputs;
}

events = new EventEmitter<TaskEvents>();
on(name: TaskEvents, fn: (...args: any[]) => void) {
Expand Down

0 comments on commit 21cb29b

Please sign in to comment.