-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.d.ts
78 lines (77 loc) · 1.82 KB
/
index.d.ts
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Generate by [js2dts](https://github.com/whxaxes/js2dts#readme)
export interface CheckOption {
cwd: string;
fix?: boolean;
exitLevel?: "none" | "info" | "warn" | "error";
root?: string[];
defaultIndex?: string[];
preset?: string;
pattern?: string | string[];
ignore?: string | string[];
}
export interface ReportListItem {
errMsg: string;
matchUrl: string;
fullText: string;
fileUrl: string;
line: number;
col: number;
}
export interface ReportResult {
msg: string;
list: ReportListItem[];
type: "none" | "info" | "warn" | "error";
}
export interface T100 {
warning: ReportResult;
deadlink: ReportResult;
}
/**
* check markdown
* @param {CheckOption} options
*/
declare function check_1(options: CheckOption): Promise<T100>;
export const check: typeof check_1;
/**
* check and throw
* @param {CheckOption} options
*/
declare function checkAndThrow_1(options: CheckOption): Promise<void>;
export const checkAndThrow: typeof checkAndThrow_1;
export interface T101 {
root: string[];
cwd: string;
}
export interface T102 {
defaultIndex: string[];
root: string[];
pattern: string;
ignore: string[];
cwd: string;
exitLevel: string;
}
export interface T103 {
vuepress: T101;
default: T102;
}
export const presetConfig: T103;
/**
* set content with cache
* @param {String} fileUrl
* @param {String} content
*/
declare function setContent_1(fileUrl: string, content: string): void;
export const setContent: typeof setContent_1;
export interface CacheObj {
content: string;
dirty: boolean;
fileUrl: string;
headings?: string[];
}
/**
* get content with cache
* @param {String} fileUrl
* @return {CacheObj}
*/
declare function getContent_1(fileUrl: string): CacheObj;
export const getContent: typeof getContent_1;