type AsyncValueStoreOptions = { fetchEagerly?: boolean; }; /** * This is an abstraction that guarantees that whatever Pitcher * state we want to keep in sync, is in sync. Creating a synchronous * API to get "latest known state of a Pitcher value" * * - It does not overfetch, either in the situation where the value * is "in flight" or if you were to try to get the value later * - Whenever you change the value, it fires a change event * - Keeping the value up to date is not the responsbility of this * abstraction, but other external events using this API * * Currently you are can not really "reconnect" to a Pitcher instance, * as it requires a new "clientId", but we can keep reference to * clients on Pitcher for a certain amount of time, allowing a reconnect. * In that case you would use "refresh" to ensure you have the latest * value after reconnecting * * @deprecated * This was a bad decision. Some values can not have a reliable initial default value, like * git status, it needs to come from the VM. If a default value is required, the editor itself * is much better at setting this value */ export declare class AsyncValueStore { private changeEmitter; onChange: import("@codesandbox/pitcher-common").Event<{ value: T; prevValue: T; }>; private errorEmitter; onError: import("@codesandbox/pitcher-common").Event; private value; private getValue; private initialValuePromise?; constructor(initialValue: T, getValue: () => Promise, opts?: AsyncValueStoreOptions); get(): T; getInitPromise(): Promise | undefined; set(newValue: T): T; update(cb: (existingValue: T) => T): T; refresh(): void; } export {}; //# sourceMappingURL=AsyncValueStore.d.ts.map