MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / mockObjectForPreview

Function mockObjectForPreview

frontend/app/store/wos.ts:60–65  ·  view source on GitHub ↗
(oref: string, obj: T)

Source from the content-addressed store, hash-verified

58const previewMockObjects: Map<string, WaveObj> = new Map();
59
60function mockObjectForPreview<T extends WaveObj>(oref: string, obj: T): void {
61 if (!isPreviewWindow()) {
62 throw new Error("mockObjectForPreview can only be called in a preview window");
63 }
64 previewMockObjects.set(oref, obj);
65}
66
67function GetObject<T>(oref: string): Promise<T> {
68 if (isPreviewWindow()) {

Callers

nothing calls this directly

Calls 2

isPreviewWindowFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected