Skip to content

Commit

Permalink
Merge pull request #4 from vim-denops/fix-interrupted
Browse files Browse the repository at this point in the history
👍 Add `signal` to `interrupted()`
  • Loading branch information
lambdalisue authored Jan 6, 2024
2 parents 2466093 + b66fab6 commit d49c11a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
10 changes: 0 additions & 10 deletions denops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,3 @@ export interface Denops {
*/
dispatch(name: string, fn: string, ...args: unknown[]): Promise<unknown>;
}

/**
* Denops option object that is passed as a second argument of `main` function.
*/
export interface DenopsOptions {
/**
* Return a promise that resolves when the `denops#interrupt()` function is called.
*/
interrupted(): Promise<void>;
}
9 changes: 2 additions & 7 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,5 @@
*/

export { BatchError } from "./denops.ts";
export type {
Context,
Denops,
DenopsOptions,
Dispatcher,
Meta,
} from "./denops.ts";
export type { Context, Denops, Dispatcher, Meta } from "./denops.ts";
export type { DenopsOptions } from "./options.ts";
11 changes: 11 additions & 0 deletions options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Denops option object that is passed as a second argument of `main` function.
*/
export interface DenopsOptions {
/**
* Return a promise that resolves when the `denops#interrupt()` function is called.
*
* If `signal` is given, the promise will be rejected when the signal is aborted.
*/
interrupted({ signal }?: { signal?: AbortSignal }): Promise<void>;
}

0 comments on commit d49c11a

Please sign in to comment.