Skip to content

Commit 25f2b60

Browse files
authored
Merge pull request #48 from gamoutatsumi/main
Change argument names of some functions
2 parents c81e5a0 + cb6e3d9 commit 25f2b60

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

denops_std/function/buffer.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export async function bufadd(
4040
*/
4141
export async function bufexists(
4242
denops: Denops,
43-
name: string | number,
43+
expr: string | number,
4444
): Promise<boolean> {
45-
const result = await denops.call("bufexists", name) as number;
45+
const result = await denops.call("bufexists", expr) as number;
4646
return !!result;
4747
}
4848

@@ -53,9 +53,9 @@ export async function bufexists(
5353
*/
5454
export async function buflisted(
5555
denops: Denops,
56-
name: string | number,
56+
expr: string | number,
5757
): Promise<boolean> {
58-
const result = await denops.call("buflisted", name) as number;
58+
const result = await denops.call("buflisted", expr) as number;
5959
return !!result;
6060
}
6161

@@ -70,9 +70,9 @@ export async function buflisted(
7070
*/
7171
export async function bufload(
7272
denops: Denops,
73-
name: string | number,
73+
expr: string | number,
7474
): Promise<void> {
75-
await denops.call("bufload", name);
75+
await denops.call("bufload", expr);
7676
}
7777

7878
/**
@@ -82,9 +82,9 @@ export async function bufload(
8282
*/
8383
export async function bufloaded(
8484
denops: Denops,
85-
name: string | number,
85+
expr: string | number,
8686
): Promise<boolean> {
87-
const result = await denops.call("bufloaded", name) as number;
87+
const result = await denops.call("bufloaded", expr) as number;
8888
return !!result;
8989
}
9090

@@ -119,9 +119,9 @@ export async function bufloaded(
119119
*/
120120
export async function bufname(
121121
denops: Denops,
122-
name?: string | number,
122+
expr?: string | number,
123123
): Promise<string> {
124-
return await denops.call("bufname", name) as string;
124+
return await denops.call("bufname", expr) as string;
125125
}
126126

127127
/**
@@ -140,10 +140,10 @@ export async function bufname(
140140
*/
141141
export async function bufnr(
142142
denops: Denops,
143-
name?: string | number,
143+
expr?: string | number,
144144
create?: boolean,
145145
): Promise<number> {
146-
return await denops.call("bufnr", name, create) as number;
146+
return await denops.call("bufnr", expr, create) as number;
147147
}
148148

149149
/**
@@ -158,9 +158,9 @@ export async function bufnr(
158158
*/
159159
export async function bufwinid(
160160
denops: Denops,
161-
name: string | number,
161+
expr: string | number,
162162
): Promise<number> {
163-
return await denops.call("bufwinid", name) as number;
163+
return await denops.call("bufwinid", expr) as number;
164164
}
165165

166166
/**
@@ -177,9 +177,9 @@ export async function bufwinid(
177177
*/
178178
export async function bufwinnr(
179179
denops: Denops,
180-
name: string | number,
180+
expr: string | number,
181181
): Promise<number> {
182-
return await denops.call("bufwinnr", name) as number;
182+
return await denops.call("bufwinnr", expr) as number;
183183
}
184184

185185
/**
@@ -208,14 +208,14 @@ export async function bufwinnr(
208208
*/
209209
export async function getbufline(
210210
denops: Denops,
211-
name: string | number,
211+
expr: string | number,
212212
lnum: string | number,
213213
end?: string | number,
214214
): Promise<string[]> {
215215
if (end == undefined) {
216-
return await denops.call("getbufline", name, lnum) as string[];
216+
return await denops.call("getbufline", expr, lnum) as string[];
217217
}
218-
return await denops.call("getbufline", name, lnum, end) as string[];
218+
return await denops.call("getbufline", expr, lnum, end) as string[];
219219
}
220220

221221
/**
@@ -233,10 +233,10 @@ export async function getbufline(
233233
*/
234234
export async function setbufline(
235235
denops: Denops,
236-
name: string | number,
236+
expr: string | number,
237237
lnum: string | number,
238238
text: string | string[],
239239
): Promise<boolean> {
240-
const result = await denops.call("setbufline", name, lnum, text) as number;
240+
const result = await denops.call("setbufline", expr, lnum, text) as number;
241241
return !!result;
242242
}

denops_std/function/common.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ import { Denops } from "../deps.ts";
8787
*/
8888
export async function exists(
8989
denops: Denops,
90-
name: string,
90+
expr: string,
9191
): Promise<boolean> {
92-
const result = await denops.call("exists", name) as number;
92+
const result = await denops.call("exists", expr) as number;
9393
return !!result;
9494
}
9595

@@ -138,14 +138,14 @@ export async function exists(
138138
*/
139139
export async function has(
140140
denops: Denops,
141-
name: string,
141+
feature: string,
142142
check?: boolean,
143143
): Promise<boolean> {
144144
if (check) {
145-
const result = await denops.call("has", name, 1) as number;
145+
const result = await denops.call("has", feature, 1) as number;
146146
return !!result;
147147
}
148-
const result = await denops.call("has", name) as number;
148+
const result = await denops.call("has", feature) as number;
149149
return !!result;
150150
}
151151

0 commit comments

Comments
 (0)