Skip to content

Commit 93c478d

Browse files
committed
fix: "JSDoc types may be moved to TypeScript types"
1 parent 4c85e12 commit 93c478d

File tree

3 files changed

+26
-27
lines changed

3 files changed

+26
-27
lines changed

packages/neovim/src/api/Neovim.ts

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ export class Neovim extends BaseApi {
202202
/**
203203
* Gets a map of buffer-local |user-commands|.
204204
*
205-
* @param {Object} options Optional parameters (currently not used)
206-
* @return {Object} Map of maps describing commands
205+
* @param options Optional parameters (currently not used)
206+
* @return Map of maps describing commands
207207
*/
208208
getCommands(options = {}): Promise<Command> {
209209
return this.request(`${this.prefix}get_commands`, [options]);
@@ -248,7 +248,7 @@ export class Neovim extends BaseApi {
248248
/**
249249
* Gets the current window
250250
*
251-
* @return {Window} Window handle
251+
* @return Window handle
252252
*/
253253
get window(): AsyncWindow {
254254
return this.getWindow();
@@ -257,7 +257,7 @@ export class Neovim extends BaseApi {
257257
/**
258258
* Sets the current window
259259
*
260-
* @param {Window} Window handle
260+
* @param win Window handle
261261
*/
262262
set window(win: AsyncWindow) {
263263
if (win instanceof Window) this.setWindow(win);
@@ -287,7 +287,7 @@ export class Neovim extends BaseApi {
287287
/**
288288
* Sets the current window
289289
*
290-
* @param {Window} Window handle
290+
* @param win Window handle
291291
*/
292292
setWindow(win: Window) {
293293
// Throw error if win is not instance of Window?
@@ -306,7 +306,7 @@ export class Neovim extends BaseApi {
306306
/**
307307
* Changes the global working directory
308308
*
309-
* @param {String} Directory path
309+
* @param dir Directory path
310310
*
311311
*/
312312
set dir(dir: string) {
@@ -365,7 +365,7 @@ export class Neovim extends BaseApi {
365365
/**
366366
* Gets the current mode. |mode()| "blocking" is true if Nvim is waiting for input.
367367
*
368-
* @return {Object} Dictionary { "mode": String, "blocking": Boolean }
368+
* @return Mode info
369369
*/
370370
get mode(): Promise<{ mode: string; blocking: boolean }> {
371371
return this.request(`${this.prefix}get_mode`);
@@ -374,7 +374,7 @@ export class Neovim extends BaseApi {
374374
/**
375375
* Gets map of defined colors
376376
*
377-
* @return {Object} Color map
377+
* @return Color map
378378
*/
379379
get colorMap(): Promise<{ [name: string]: number }> {
380380
return this.request(`${this.prefix}get_color_map`);
@@ -383,8 +383,8 @@ export class Neovim extends BaseApi {
383383
/**
384384
* Get color by name
385385
*
386-
* @param {String} name Color name
387-
* @return {Number} Color value
386+
* @param name Color name
387+
* @return Color value
388388
*/
389389
getColorByName(name: string): Promise<number> {
390390
return this.request(`${this.prefix}get_color_by_name`, [name]);
@@ -393,9 +393,9 @@ export class Neovim extends BaseApi {
393393
/**
394394
* Get highlight by name or id
395395
*
396-
* @param {String|Number} nameOrId Name or ID
397-
* @param {Boolean} isRgb Should export RGB colors
398-
* @return {Object} Highlight definition map
396+
* @param nameOrId Name or ID
397+
* @param isRgb Should export RGB colors
398+
* @return Highlight definition map
399399
*/
400400
getHighlight(
401401
nameOrId: string | number,
@@ -411,9 +411,9 @@ export class Neovim extends BaseApi {
411411
/**
412412
* Get highlight definition by name
413413
*
414-
* @param {String} name Highlight group name
415-
* @param {Boolean} isRgb Should export RGB colors
416-
* @return {Object} Highlight definition map
414+
* @param name Highlight group name
415+
* @param isRgb Should export RGB colors
416+
* @return Highlight definition map
417417
*/
418418
getHighlightByName(name: string, isRgb = true): Promise<object> {
419419
return this.request(`${this.prefix}get_hl_by_name`, [name, isRgb]);
@@ -422,9 +422,9 @@ export class Neovim extends BaseApi {
422422
/**
423423
* Get highlight definition by id |hlID()|
424424
*
425-
* @param {Number} id Highlight id as returned by |hlID()|
426-
* @param {Boolean} isRgb Should export RGB colors
427-
* @return {Object} Highlight definition map
425+
* @param id Highlight id as returned by |hlID()|
426+
* @param isRgb Should export RGB colors
427+
* @return Highlight definition map
428428
*/
429429
getHighlightById(id: number, isRgb = true): Promise<object> {
430430
return this.request(`${this.prefix}get_hl_by_id`, [id, isRgb]);
@@ -839,8 +839,8 @@ export class Neovim extends BaseApi {
839839
* existing namespace, the associated id is returned. If `name`
840840
* is an empty string a new, anonymous namespace is created.
841841
*
842-
* @param {String} name Namespace name or empty string
843-
* @return {Number} Namespace id
842+
* @param name Namespace name or empty string
843+
* @return Namespace id
844844
*/
845845
createNamespace(name = ''): Promise<number> {
846846
return this.request(`${this.prefix}create_namespace`, [name]);
@@ -962,10 +962,9 @@ export class Neovim extends BaseApi {
962962
* and `relative` must be reconfigured together. Only changing a
963963
* subset of these is an error.
964964
*
965-
* @param {Window} window Window handle
966-
* @param {Number} width Width of window (in character cells)
967-
* @param {Number} height Height of window (in character cells)
968-
* @Param {Object} options Options object
965+
* @param window Window handle
966+
* @param options height, width of window (in character cells)
967+
* @Param Options object
969968
*/
970969
private winConfig(window: Window, options: object = {}) {
971970
return window.config(options);

packages/neovim/src/host/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class Host {
8181
return plugin.handleRequest(procName, type, args);
8282
}
8383

84-
handleRequestSpecs(method: string, args: any[], res: Response) {
84+
handleRequestSpecs(_method: string, args: any[], res: Response) {
8585
const filename = args[0];
8686
this.nvim?.logger.debug(`requested specs for ${filename}`);
8787
// Can return null if there is nothing defined in plugin

packages/neovim/src/utils/buffered.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class Buffered extends Transform {
2626
}
2727

2828
// eslint-disable-next-line consistent-return
29-
override _transform(chunk: Buffer, encoding: any, callback: any): void {
29+
override _transform(chunk: Buffer, _encoding: any, callback: any): void {
3030
const { chunks, timer } = this;
3131

3232
if (timer) clearTimeout(timer);

0 commit comments

Comments
 (0)