Skip to content
Merged
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
12 changes: 10 additions & 2 deletions type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ export type Dispatcher = {
[key: string]: (...args: unknown[]) => unknown;
};

/**
* Represents a Vim/Neovim function call.
*
* `fn`: A function name of Vim/Neovim.
* `args`: Arguments of the function.
*/
export type Call = [fn: string, ...args: unknown[]];

/**
* Context that expands into the local namespace (l:)
*/
Expand Down Expand Up @@ -138,11 +146,11 @@ export interface Denops {
* of the error instance holds succeeded results of functions prior to the
* error.
*
* @param calls: A list of tuples ([fn, args]) to call Vim/Neovim functions.
* @param calls: A list of tuples ([fn, ...args]) to call Vim/Neovim functions.
*
* Note that arguments after `undefined` in `args` will be dropped for convenience.
*/
batch(...calls: [string, ...unknown[]][]): Promise<unknown[]>;
batch(...calls: Call[]): Promise<unknown[]>;

/**
* Execute an arbitrary command of Vim/Neovim under a given context.
Expand Down