Skip to content

Commit 5a80d02

Browse files
Merge pull request #3343 from github/robertbrignull/use-unknown
Use unknown instead of any where possible
2 parents c906e76 + e5961f2 commit 5a80d02

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

extensions/ql-vscode/src/common/disposable-object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Avoid explicitly referencing Disposable type in vscode.
22
// This file cannot have dependencies on the vscode API.
33
export interface Disposable {
4-
dispose(): any;
4+
dispose(): unknown;
55
}
66

77
export type DisposeHandler = (disposable: Disposable) => void;

extensions/ql-vscode/src/common/vscode/telemetry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export class ExtensionTelemetryListener
293293
export let telemetryListener: ExtensionTelemetryListener | undefined;
294294

295295
export async function initializeTelemetry(
296-
extension: Extension<any>,
296+
extension: Extension<unknown>,
297297
ctx: ExtensionContext,
298298
): Promise<ExtensionTelemetryListener> {
299299
if (telemetryListener !== undefined) {

extensions/ql-vscode/src/debugger/debug-session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ export class QLDebugSession extends LoggingDebugSession implements Disposable {
504504
protected customRequest(
505505
command: string,
506506
response: CodeQLProtocol.Response,
507-
args: any,
507+
args: unknown,
508508
request?: Protocol.Request,
509509
): void {
510510
switch (command) {

extensions/ql-vscode/src/query-server/query-runner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class QueryRunner {
130130
query: CoreQueryTarget,
131131
additionalPacks: string[],
132132
extensionPacks: string[] | undefined,
133-
additionalRunQueryArgs: Record<string, any>,
133+
additionalRunQueryArgs: Record<string, unknown>,
134134
generateEvalLog: boolean,
135135
outputDir: QueryOutputDir,
136136
progress: ProgressCallback,
@@ -216,7 +216,7 @@ export class QueryRunner {
216216
generateEvalLog: boolean,
217217
additionalPacks: string[],
218218
extensionPacks: string[] | undefined,
219-
additionalRunQueryArgs: Record<string, any>,
219+
additionalRunQueryArgs: Record<string, unknown>,
220220
queryStorageDir: string,
221221
id = `${basename(query.queryPath)}-${nanoid()}`,
222222
templates: Record<string, string> | undefined,

extensions/ql-vscode/src/query-server/run-queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function compileAndRunQueryAgainstDatabaseCore(
2828
generateEvalLog: boolean,
2929
additionalPacks: string[],
3030
extensionPacks: string[] | undefined,
31-
additionalRunQueryArgs: Record<string, any>,
31+
additionalRunQueryArgs: Record<string, unknown>,
3232
outputDir: QueryOutputDir,
3333
progress: ProgressCallback,
3434
token: CancellationToken,

0 commit comments

Comments
 (0)