Skip to content

Commit

Permalink
chore(system): clean up system class code
Browse files Browse the repository at this point in the history
  • Loading branch information
minecrawler committed May 22, 2024
1 parent afa971e commit 414f8b9
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions src/system/system-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ export class SystemBuilder<PARAMDESC extends TSystemParameterDesc> implements IS
return new System();
}

name(name: string): SystemBuilder<Readonly<PARAMDESC>> {
return this.withName(name);
}

run(fn: TSystemFunction<Readonly<PARAMDESC>>): SystemBuilder<Readonly<PARAMDESC>> {
return this.withRunFunction(fn);
}

setup(fn: TSystemFunction<Readonly<PARAMDESC>>): SystemBuilder<Readonly<PARAMDESC>> {
return this.withSetupFunction(fn);
}

withName(name: string): SystemBuilder<Readonly<PARAMDESC>> {
this.systemName = name;
return this;
Expand All @@ -76,10 +64,8 @@ export class SystemBuilder<PARAMDESC extends TSystemParameterDesc> implements IS
this.setupFunction = fn;
return this;
}
}

// Change alias refs for better performance

SystemBuilder.prototype.name = SystemBuilder.prototype.withName;
SystemBuilder.prototype.run = SystemBuilder.prototype.withRunFunction;
SystemBuilder.prototype.setup = SystemBuilder.prototype.withSetupFunction;
name = this.withName;
run = this.withRunFunction;
setup = this.withSetupFunction;
}

0 comments on commit 414f8b9

Please sign in to comment.