445b4fc27f
see: - https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md - https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md
21 lines
644 B
TypeScript
21 lines
644 B
TypeScript
import type * 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);
|
|
}
|
|
}
|