MCPcopy
hub / github.com/midrender/revideo / execute

Function execute

packages/core/src/scenes/GeneratorScene.ts:358–370  ·  view source on GitHub ↗

* Invoke the given callback in the context of this scene. * * @remarks * This method makes sure that the context of this scene is globally available * during the execution of the callback. * * @param callback - The callback to invoke.

(callback: () => T)

Source from the content-addressed store, hash-verified

356 * @param callback - The callback to invoke.
357 */
358 protected execute<T>(callback: () => T): T {
359 let result: T;
360 startScene(this);
361 startPlayback(this.playback);
362 try {
363 result = callback();
364 } finally {
365 endPlayback(this.playback);
366 endScene(this);
367 }
368
369 return result;
370 }
371}

Callers

nothing calls this directly

Calls 4

startSceneFunction · 0.90
startPlaybackFunction · 0.90
endPlaybackFunction · 0.90
endSceneFunction · 0.90

Tested by

no test coverage detected