Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions batch/batch.ts
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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;
}

Expand Down Expand Up @@ -64,7 +64,7 @@ class BatchHelper implements Denops {
return Promise.resolve();
}

batch(...calls: [string, ...unknown[]][]): Promise<unknown[]> {
batch(...calls: Call[]): Promise<unknown[]> {
if (this.#closed) {
return this.#denops.batch(...calls);
}
Expand Down
8 changes: 4 additions & 4 deletions batch/collect.ts
Original file line number Diff line number Diff line change
@@ -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> = T extends void ? 0 : T;

Expand All @@ -8,7 +8,7 @@ type Collect<T extends readonly unknown[] | []> = {

class CollectHelper implements Denops {
#denops: Denops;
#calls: [string, ...unknown[]][];
#calls: Call[];
#closed: boolean;

constructor(denops: Denops) {
Expand All @@ -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;
}

Expand Down Expand Up @@ -63,7 +63,7 @@ class CollectHelper implements Denops {
return Promise.resolve();
}

batch(..._calls: [string, ...unknown[]][]): Promise<unknown[]> {
batch(..._calls: Call[]): Promise<unknown[]> {
throw new Error("The 'batch' method is not available on CollectHelper.");
}

Expand Down
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions eval/use_eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -105,11 +105,11 @@ class UseEvalHelper implements Denops {
);
}

async batch(...calls: [string, ...unknown[]][]): Promise<unknown[]> {
async batch(...calls: Call[]): Promise<unknown[]> {
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)),
Expand Down
Loading