-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.ts
More file actions
31 lines (29 loc) · 747 Bytes
/
source.ts
File metadata and controls
31 lines (29 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { Denops } from "@denops/std";
import type { Detail, IdItem } from "./item.ts";
/**
* Parameters for collecting items.
*/
export type CollectParams = {
/**
* Arguments passed to the picker.
*/
readonly args: readonly string[];
};
/**
* Source that collects items.
*/
export type Source<T extends Detail> = {
/**
* Collects items.
*
* @param denops - The Denops instance.
* @param params - Parameters specifying the items to collect.
* @param options - Additional options, including an abort signal.
* @returns An async iterator over the collected items.
*/
collect(
denops: Denops,
params: CollectParams,
options: { signal?: AbortSignal },
): AsyncIterableIterator<IdItem<T>>;
};