kecare-tools 1.0.0-beta.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +15 -0
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -8,7 +8,21 @@ export type Article = {
|
|
|
8
8
|
createdAt: string;
|
|
9
9
|
author: string;
|
|
10
10
|
to: string;
|
|
11
|
+
headings: heading[];
|
|
11
12
|
};
|
|
13
|
+
export type HeadingH1 = {
|
|
14
|
+
depth: 1;
|
|
15
|
+
text: string;
|
|
16
|
+
id:string;
|
|
17
|
+
children: HeadingH2[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type HeadingH2 = {
|
|
21
|
+
depth: 2;
|
|
22
|
+
text: string;
|
|
23
|
+
id:string;
|
|
24
|
+
}
|
|
25
|
+
export type heading = HeadingH1|HeadingH2
|
|
12
26
|
|
|
13
27
|
export type ArticleListGenerator = (params: {
|
|
14
28
|
projectPath: string;
|
|
@@ -25,6 +39,7 @@ export type ArticleListGenerator = (params: {
|
|
|
25
39
|
template: string;
|
|
26
40
|
}>;
|
|
27
41
|
|
|
42
|
+
|
|
28
43
|
export function defineArticleListGenerator<Generator extends ArticleListGenerator>(yourGenerator: Generator) {
|
|
29
44
|
return yourGenerator;
|
|
30
45
|
}
|