(oref: string)
| 149 | const waveObjectValueCache = new Map<string, WaveObjectValue<any>>(); |
| 150 | |
| 151 | function reloadWaveObject<T extends WaveObj>(oref: string): Promise<T> { |
| 152 | let wov = waveObjectValueCache.get(oref); |
| 153 | if (wov === undefined) { |
| 154 | wov = getWaveObjectValue<T>(oref, true); |
| 155 | return wov.pendingPromise; |
| 156 | } |
| 157 | const prtn = GetObject<T>(oref); |
| 158 | prtn.then((val) => { |
| 159 | globalStore.set(wov.dataAtom, { value: val, loading: false }); |
| 160 | }); |
| 161 | return prtn; |
| 162 | } |
| 163 | |
| 164 | function createWaveValueObject<T extends WaveObj>(oref: string, shouldFetch: boolean): WaveObjectValue<T> { |
| 165 | const wov = { pendingPromise: null, dataAtom: null }; |
nothing calls this directly
no test coverage detected