rust/editors/code/src/persistent_state.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
639 B
TypeScript
Raw Normal View History

import * as vscode from "vscode";
import { log } from "./util";
export class PersistentState {
constructor(private readonly globalState: vscode.Memento) {
2021-12-23 00:44:23 -06:00
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);
}
}