Skip to content

Commit 4b832bd

Browse files
Use QlPackFile type in quick-query.ts
1 parent 7af65ed commit 4b832bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/ql-vscode/src/local-queries/quick-query.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { getErrorMessage } from "../common/helpers-pure";
1414
import { FALLBACK_QLPACK_FILENAME, getQlPackFilePath } from "../common/ql";
1515
import type { App } from "../common/app";
1616
import type { ExtensionApp } from "../common/vscode/vscode-app";
17+
import { QlPackFile } from "../packaging/qlpack-file";
1718

1819
const QUICK_QUERIES_DIR_NAME = "quick-queries";
1920
const QUICK_QUERY_QUERY_NAME = "quick-query.ql";
@@ -125,7 +126,7 @@ export async function displayQuickQuery(
125126

126127
// Only rewrite the qlpack file if the database has changed
127128
if (shouldRewrite) {
128-
const quickQueryQlpackYaml: any = {
129+
const quickQueryQlpackYaml: QlPackFile = {
129130
name: "vscode/quick-query",
130131
version: "1.0.0",
131132
dependencies: {
@@ -175,6 +176,6 @@ async function checkShouldRewrite(
175176
if (!(await pathExists(qlPackFile))) {
176177
return true;
177178
}
178-
const qlPackContents: any = load(await readFile(qlPackFile, "utf8"));
179+
const qlPackContents = load(await readFile(qlPackFile, "utf8")) as QlPackFile;
179180
return !qlPackContents.dependencies?.[newDependency];
180181
}

0 commit comments

Comments
 (0)