Adrià Vilanova MartÃnez | 33a009c | 2024-11-09 22:41:56 +0100 | [diff] [blame^] | 1 | import Script, { |
| 2 | ConcreteScript, |
| 3 | } from '../../common/architecture/scripts/Script'; |
| 4 | import ScriptFilterListProvider from '../../common/architecture/scripts/ScriptFilterListProvider'; |
| 5 | |
| 6 | export default class StandaloneScripts extends ScriptFilterListProvider { |
| 7 | private scripts: ConcreteScript[] = []; |
| 8 | private initializedScripts: Script[]; |
| 9 | |
| 10 | protected getUnfilteredScriptsList() { |
| 11 | if (this.initializedScripts === undefined) { |
| 12 | this.initializedScripts = this.scripts.map((script) => new script()); |
| 13 | } |
| 14 | return this.initializedScripts; |
| 15 | } |
| 16 | } |