Skip to content

Commit d49c11a

Browse files
authored
Merge pull request #4 from vim-denops/fix-interrupted
👍 Add `signal` to `interrupted()`
2 parents 2466093 + b66fab6 commit d49c11a

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

denops.ts

-10
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,3 @@ export interface Denops {
138138
*/
139139
dispatch(name: string, fn: string, ...args: unknown[]): Promise<unknown>;
140140
}
141-
142-
/**
143-
* Denops option object that is passed as a second argument of `main` function.
144-
*/
145-
export interface DenopsOptions {
146-
/**
147-
* Return a promise that resolves when the `denops#interrupt()` function is called.
148-
*/
149-
interrupted(): Promise<void>;
150-
}

mod.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,5 @@
1212
*/
1313

1414
export { BatchError } from "./denops.ts";
15-
export type {
16-
Context,
17-
Denops,
18-
DenopsOptions,
19-
Dispatcher,
20-
Meta,
21-
} from "./denops.ts";
15+
export type { Context, Denops, Dispatcher, Meta } from "./denops.ts";
16+
export type { DenopsOptions } from "./options.ts";

options.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Denops option object that is passed as a second argument of `main` function.
3+
*/
4+
export interface DenopsOptions {
5+
/**
6+
* Return a promise that resolves when the `denops#interrupt()` function is called.
7+
*
8+
* If `signal` is given, the promise will be rejected when the signal is aborted.
9+
*/
10+
interrupted({ signal }?: { signal?: AbortSignal }): Promise<void>;
11+
}

0 commit comments

Comments
 (0)