-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
43 lines (37 loc) · 1.04 KB
/
types.ts
File metadata and controls
43 lines (37 loc) · 1.04 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
/** A single documentation entry from the DevDocs index. */
export interface DocEntry {
name: string;
path: string;
type: string;
}
/** The full documentation index for a Python version. */
export interface DocIndex {
entries: DocEntry[];
}
/** An anchor point within a document, representing a heading with an ID. */
export interface Anchor {
name: string;
heading: string;
level: number;
startOffset: number;
endOffset: number;
parentAnchor: string | null;
}
/** Index of all anchors in a document with total content length. */
export interface AnchorIndex {
anchors: Anchor[];
totalLength: number;
}
/** Cached document data stored on disk. */
export interface CachedDoc {
markdown: string;
anchorIndex: AnchorIndex;
fetchedAt: number;
}
/** Result of fetching a document, includes cache status and normalized path. */
export interface FetchedDoc extends CachedDoc {
fromCache: boolean;
path: string;
}
/** Log levels supported by the OpenCode plugin API. */
export type LogLevel = "debug" | "info" | "warn" | "error";