MCPcopy Index your code
hub / github.com/MALSync/MALSync / run

Method run

src/chibiScript/ChibiConsumer.ts:24–36  ·  view source on GitHub ↗
(startState: any = null)

Source from the content-addressed store, hash-verified

22 }
23
24 run(startState: any = null) {
25 if (this.hasRun) {
26 throw new ChibiError('Run method can only be executed once');
27 }
28 this.hasRun = true;
29 const state = this._subroutine(this.script, startState);
30
31 if (state && state instanceof ChibiReturn) {
32 return state.getValue();
33 }
34
35 return state;
36 }
37
38 _subroutine(script: ChibiJson<any>, startState: any = null) {
39 this.ctx.setAsyncContext(false);

Callers

nothing calls this directly

Calls 2

_subroutineMethod · 0.95
getValueMethod · 0.45

Tested by

no test coverage detected