Skip to content

Commit eda0e5d

Browse files
committed
👍 Fix name and type of executor
1 parent 258f7c1 commit eda0e5d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

denops_std/autocmd/group.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export type GroupRemoveOptions = Omit<RemoveOptions, "group">;
1414
export async function group(
1515
denops: Denops,
1616
name: string,
17-
main: (helper: GroupHelper) => void,
17+
executor: (helper: GroupHelper) => void,
1818
): Promise<void> {
1919
const commands: string[] = [];
2020
const helper = new GroupHelper(commands);
21-
main(helper);
21+
executor(helper);
2222
await execute(denops, [
2323
`aug ${name}`,
2424
...commands,

denops_std/batch/batch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ class BatchHelper implements Denops {
8686
*/
8787
export async function batch(
8888
denops: Denops,
89-
main: (helper: BatchHelper) => Promise<void>,
89+
executor: (helper: BatchHelper) => Promise<void>,
9090
): Promise<void> {
9191
const helper = new BatchHelper(denops);
9292
try {
93-
await main(helper);
93+
await executor(helper);
9494
} finally {
9595
BatchHelper.close(helper);
9696
}

denops_std/batch/gather.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ class GatherHelper implements Denops {
8888
*/
8989
export async function gather(
9090
denops: Denops,
91-
main: (helper: GatherHelper) => Promise<void>,
91+
executor: (helper: GatherHelper) => Promise<void>,
9292
): Promise<unknown[]> {
9393
const helper = new GatherHelper(denops);
9494
try {
95-
await main(helper);
95+
await executor(helper);
9696
} finally {
9797
GatherHelper.close(helper);
9898
}

denops_std/buffer/buffer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ export async function concrete(
256256
/**
257257
* Ensure the executor is executed under the specified buffer
258258
*/
259-
export async function ensure<T = void>(
259+
export async function ensure<T>(
260260
denops: Denops,
261261
bufnr: number,
262-
executor: () => Promise<T>,
262+
executor: () => T,
263263
): Promise<T> {
264264
const [bufnrCur, winidCur, winidNext] = await batch.gather(
265265
denops,
@@ -295,10 +295,10 @@ export async function ensure<T = void>(
295295
/**
296296
* Ensure the executor is executed under a modifiable buffer
297297
*/
298-
export async function modifiable<T = void>(
298+
export async function modifiable<T>(
299299
denops: Denops,
300300
bufnr: number,
301-
executor: () => Promise<T>,
301+
executor: () => T,
302302
): Promise<T> {
303303
const [modified, modifiable, foldmethod] = await batch.gather(
304304
denops,

0 commit comments

Comments
 (0)