add auto-highlighting of selected/updated code

This commit is contained in:
undergroundwires
2020-08-25 16:52:38 +01:00
parent 5df458739d
commit b789250cb8
39 changed files with 1163 additions and 175 deletions

View File

@@ -11,6 +11,14 @@ export class CategoryStub extends BaseEntity<number> implements ICategory {
constructor(id: number) {
super(id);
}
public getAllScriptsRecursively(): readonly IScript[] {
return [
...this.scripts,
...this.subCategories.flatMap((c) => c.getAllScriptsRecursively()),
];
}
public withScriptIds(...scriptIds: string[]): CategoryStub {
for (const scriptId of scriptIds) {
this.withScript(new ScriptStub(scriptId));