diff --git a/batch/batch.ts b/batch/batch.ts index f85fb917..e650a0e7 100644 --- a/batch/batch.ts +++ b/batch/batch.ts @@ -1,10 +1,10 @@ -import type { Context, Denops, Dispatcher, Meta } from "@denops/core"; +import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core"; type Redraw = undefined | boolean; class BatchHelper implements Denops { #denops: Denops; - #calls: [string, ...unknown[]][]; + #calls: Call[]; #redraw: Redraw; #closed: boolean; @@ -14,7 +14,7 @@ class BatchHelper implements Denops { this.#closed = false; } - static getCalls(helper: BatchHelper): [string, ...unknown[]][] { + static getCalls(helper: BatchHelper): Call[] { return helper.#calls; } @@ -64,7 +64,7 @@ class BatchHelper implements Denops { return Promise.resolve(); } - batch(...calls: [string, ...unknown[]][]): Promise { + batch(...calls: Call[]): Promise { if (this.#closed) { return this.#denops.batch(...calls); } diff --git a/batch/collect.ts b/batch/collect.ts index 8fb07f8d..0014919f 100644 --- a/batch/collect.ts +++ b/batch/collect.ts @@ -1,4 +1,4 @@ -import type { Context, Denops, Dispatcher, Meta } from "@denops/core"; +import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core"; type VimVoid = T extends void ? 0 : T; @@ -8,7 +8,7 @@ type Collect = { class CollectHelper implements Denops { #denops: Denops; - #calls: [string, ...unknown[]][]; + #calls: Call[]; #closed: boolean; constructor(denops: Denops) { @@ -17,7 +17,7 @@ class CollectHelper implements Denops { this.#closed = false; } - static getCalls(helper: CollectHelper): [string, ...unknown[]][] { + static getCalls(helper: CollectHelper): Call[] { return helper.#calls; } @@ -63,7 +63,7 @@ class CollectHelper implements Denops { return Promise.resolve(); } - batch(..._calls: [string, ...unknown[]][]): Promise { + batch(..._calls: Call[]): Promise { throw new Error("The 'batch' method is not available on CollectHelper."); } diff --git a/deno.jsonc b/deno.jsonc index 1322df6c..266a1320 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -37,7 +37,7 @@ "imports": { "@core/asyncutil": "jsr:@core/asyncutil@^1.2.0", "@core/unknownutil": "jsr:@core/unknownutil@^4.3.0", - "@denops/core": "jsr:@denops/core@^8.0.0", + "@denops/core": "jsr:@denops/core@^8.0.1", "@denops/test": "jsr:@denops/test@^4.0.0", "@lambdalisue/errorutil": "jsr:@lambdalisue/errorutil@^1.1.1", "@lambdalisue/itertools": "jsr:@lambdalisue/itertools@^1.1.2", diff --git a/eval/use_eval.ts b/eval/use_eval.ts index a15e35a0..ee275ed9 100644 --- a/eval/use_eval.ts +++ b/eval/use_eval.ts @@ -4,7 +4,7 @@ * @module */ -import type { Context, Denops, Dispatcher, Meta } from "@denops/core"; +import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core"; import { isString } from "@core/unknownutil/is/string"; import { isUndefined } from "@core/unknownutil/is/undefined"; import { ulid } from "@std/ulid"; @@ -105,11 +105,11 @@ class UseEvalHelper implements Denops { ); } - async batch(...calls: [string, ...unknown[]][]): Promise { + async batch(...calls: Call[]): Promise { const suffix = await ensurePrerequisites(this.#denops); const callHelper = `DenopsStd_Eval_UseEval_Call_${suffix}`; return await this.#denops.batch( - ...calls.map(([fn, ...args]): [string, ...unknown[]] => [ + ...calls.map(([fn, ...args]): Call => [ callHelper, fn, stringify(trimEndOfArgs(args)),