Merge pull request #3343 from github/robertbrignull/use-unknown
Use unknown instead of any where possible
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Avoid explicitly referencing Disposable type in vscode.
|
||||
// This file cannot have dependencies on the vscode API.
|
||||
export interface Disposable {
|
||||
dispose(): any;
|
||||
dispose(): unknown;
|
||||
}
|
||||
|
||||
export type DisposeHandler = (disposable: Disposable) => void;
|
||||
|
||||
@@ -293,7 +293,7 @@ export class ExtensionTelemetryListener
|
||||
export let telemetryListener: ExtensionTelemetryListener | undefined;
|
||||
|
||||
export async function initializeTelemetry(
|
||||
extension: Extension<any>,
|
||||
extension: Extension<unknown>,
|
||||
ctx: ExtensionContext,
|
||||
): Promise<ExtensionTelemetryListener> {
|
||||
if (telemetryListener !== undefined) {
|
||||
|
||||
@@ -504,7 +504,7 @@ export class QLDebugSession extends LoggingDebugSession implements Disposable {
|
||||
protected customRequest(
|
||||
command: string,
|
||||
response: CodeQLProtocol.Response,
|
||||
args: any,
|
||||
args: unknown,
|
||||
request?: Protocol.Request,
|
||||
): void {
|
||||
switch (command) {
|
||||
|
||||
@@ -130,7 +130,7 @@ export class QueryRunner {
|
||||
query: CoreQueryTarget,
|
||||
additionalPacks: string[],
|
||||
extensionPacks: string[] | undefined,
|
||||
additionalRunQueryArgs: Record<string, any>,
|
||||
additionalRunQueryArgs: Record<string, unknown>,
|
||||
generateEvalLog: boolean,
|
||||
outputDir: QueryOutputDir,
|
||||
progress: ProgressCallback,
|
||||
@@ -216,7 +216,7 @@ export class QueryRunner {
|
||||
generateEvalLog: boolean,
|
||||
additionalPacks: string[],
|
||||
extensionPacks: string[] | undefined,
|
||||
additionalRunQueryArgs: Record<string, any>,
|
||||
additionalRunQueryArgs: Record<string, unknown>,
|
||||
queryStorageDir: string,
|
||||
id = `${basename(query.queryPath)}-${nanoid()}`,
|
||||
templates: Record<string, string> | undefined,
|
||||
|
||||
@@ -28,7 +28,7 @@ export async function compileAndRunQueryAgainstDatabaseCore(
|
||||
generateEvalLog: boolean,
|
||||
additionalPacks: string[],
|
||||
extensionPacks: string[] | undefined,
|
||||
additionalRunQueryArgs: Record<string, any>,
|
||||
additionalRunQueryArgs: Record<string, unknown>,
|
||||
outputDir: QueryOutputDir,
|
||||
progress: ProgressCallback,
|
||||
token: CancellationToken,
|
||||
|
||||
Reference in New Issue
Block a user