blob: 8964a78dc321e131ee52051ac04c6a4d2c68fa83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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);
}
}
|