Skip to content

Commit b66fab6

Browse files
committed
👍 Add signal to interrupted()
1 parent 2466093 commit b66fab6

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

denops.ts

Lines changed: 0 additions & 10 deletions
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

Lines changed: 2 additions & 7 deletions
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

Lines changed: 11 additions & 0 deletions
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)