Skip to content

Commit d8bfd9d

Browse files
authored
Merge pull request #296 from vim-denops/use-call-type
👍 Use Call type from @denops/core v8.0.1
2 parents 39c1554 + fcabe6c commit d8bfd9d

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

batch/batch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { Context, Denops, Dispatcher, Meta } from "@denops/core";
1+
import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core";
22

33
type Redraw = undefined | boolean;
44

55
class BatchHelper implements Denops {
66
#denops: Denops;
7-
#calls: [string, ...unknown[]][];
7+
#calls: Call[];
88
#redraw: Redraw;
99
#closed: boolean;
1010

@@ -14,7 +14,7 @@ class BatchHelper implements Denops {
1414
this.#closed = false;
1515
}
1616

17-
static getCalls(helper: BatchHelper): [string, ...unknown[]][] {
17+
static getCalls(helper: BatchHelper): Call[] {
1818
return helper.#calls;
1919
}
2020

@@ -64,7 +64,7 @@ class BatchHelper implements Denops {
6464
return Promise.resolve();
6565
}
6666

67-
batch(...calls: [string, ...unknown[]][]): Promise<unknown[]> {
67+
batch(...calls: Call[]): Promise<unknown[]> {
6868
if (this.#closed) {
6969
return this.#denops.batch(...calls);
7070
}

batch/collect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Context, Denops, Dispatcher, Meta } from "@denops/core";
1+
import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core";
22

33
type VimVoid<T> = T extends void ? 0 : T;
44

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

99
class CollectHelper implements Denops {
1010
#denops: Denops;
11-
#calls: [string, ...unknown[]][];
11+
#calls: Call[];
1212
#closed: boolean;
1313

1414
constructor(denops: Denops) {
@@ -17,7 +17,7 @@ class CollectHelper implements Denops {
1717
this.#closed = false;
1818
}
1919

20-
static getCalls(helper: CollectHelper): [string, ...unknown[]][] {
20+
static getCalls(helper: CollectHelper): Call[] {
2121
return helper.#calls;
2222
}
2323

@@ -63,7 +63,7 @@ class CollectHelper implements Denops {
6363
return Promise.resolve();
6464
}
6565

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

deno.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"imports": {
3838
"@core/asyncutil": "jsr:@core/asyncutil@^1.2.0",
3939
"@core/unknownutil": "jsr:@core/unknownutil@^4.3.0",
40-
"@denops/core": "jsr:@denops/core@^8.0.0",
40+
"@denops/core": "jsr:@denops/core@^8.0.1",
4141
"@denops/test": "jsr:@denops/test@^4.0.0",
4242
"@lambdalisue/errorutil": "jsr:@lambdalisue/errorutil@^1.1.1",
4343
"@lambdalisue/itertools": "jsr:@lambdalisue/itertools@^1.1.2",

eval/use_eval.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @module
55
*/
66

7-
import type { Context, Denops, Dispatcher, Meta } from "@denops/core";
7+
import type { Call, Context, Denops, Dispatcher, Meta } from "@denops/core";
88
import { isString } from "@core/unknownutil/is/string";
99
import { isUndefined } from "@core/unknownutil/is/undefined";
1010
import { ulid } from "@std/ulid";
@@ -105,11 +105,11 @@ class UseEvalHelper implements Denops {
105105
);
106106
}
107107

108-
async batch(...calls: [string, ...unknown[]][]): Promise<unknown[]> {
108+
async batch(...calls: Call[]): Promise<unknown[]> {
109109
const suffix = await ensurePrerequisites(this.#denops);
110110
const callHelper = `DenopsStd_Eval_UseEval_Call_${suffix}`;
111111
return await this.#denops.batch(
112-
...calls.map(([fn, ...args]): [string, ...unknown[]] => [
112+
...calls.map(([fn, ...args]): Call => [
113113
callHelper,
114114
fn,
115115
stringify(trimEndOfArgs(args)),

0 commit comments

Comments
 (0)