Fix BigQuery Job.cancel() return type compatibility - change interface from Promise<void> to Promise<unknown> to match actual CancelResponse return type

Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
This commit is contained in:
Devin AI 2025-08-01 22:06:21 +00:00
parent 4f633a0eac
commit 1d06ae1c47
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import { type AdapterQueryResult, BaseAdapter, type FieldMetadata } from './base
class BigQueryCancellableQuery implements CancellableQuery<AdapterQueryResult> { class BigQueryCancellableQuery implements CancellableQuery<AdapterQueryResult> {
private cancelled = false; private cancelled = false;
private controller = new BaseCancellationController(); private controller = new BaseCancellationController();
private job?: unknown; private job?: { cancel(): Promise<unknown> };
constructor( constructor(
private client: BigQuery, private client: BigQuery,
@ -66,7 +66,7 @@ class BigQueryCancellableQuery implements CancellableQuery<AdapterQueryResult> {
this.controller.onCancellation(async () => { this.controller.onCancellation(async () => {
if (this.job) { if (this.job) {
try { try {
await (this.job as any).cancel(); await this.job.cancel();
} catch (error) { } catch (error) {
console.warn('BigQuery job cancellation warning:', error); console.warn('BigQuery job cancellation warning:', error);
} }