rust/editors/code/src/persistent_state.ts
Andrei Listochkin f247090558 prettier run
2022-05-17 18:15:06 +01:00

21 lines
639 B
TypeScript

import * as vscode from "vscode";
import { log } from "./util";
export class PersistentState {
constructor(private readonly globalState: vscode.Memento) {
const { serverVersion } = this;
log.info("PersistentState:", { serverVersion });
}
/**
* Version of the extension that installed the server.
* Used to check if we need to run patchelf again on NixOS.
*/
get serverVersion(): string | undefined {
return this.globalState.get("serverVersion");
}
async updateServerVersion(value: string | undefined) {
await this.globalState.update("serverVersion", value);
}
}