Skip to content

Commit 9d71d43

Browse files
committed
typedoc-interop
1 parent c195509 commit 9d71d43

File tree

7 files changed

+40
-1
lines changed

7 files changed

+40
-1
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/class.ts

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ import { escapeHTML, serializeSignature, serializeSymbol } from "./utils";
55
export const printClass = (c: ClassDocEntry): string => {
66
const res: string[] = [];
77

8+
res.push("---");
9+
res.push(`title: dts-docs/api-reference/class/${c.name}`);
10+
res.push(`group: dts-docs`)
11+
res.push("---");
12+
res.push("");
13+
14+
815
res.push(`# ${c.name}`);
916
res.push("");
1017
if (c.heritage.extends && c.heritage.extends.length > 0) {

src/dts-docs.ts

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ function main(args: string[]): void {
8787

8888
const res: string[] = [];
8989

90+
res.push("---");
91+
res.push(`title: dts-docs/api-reference`);
92+
res.push(`group: dts-docs`)
93+
res.push("---");
94+
res.push("");
95+
9096
res.push("# API reference");
9197
res.push("");
9298

src/enum.ts

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import { escapeHTML, serializeSymbol } from "./utils";
55
export const printEnum = (e: EnumDocEntry): string => {
66
const res: string[] = [];
77

8+
res.push("---");
9+
res.push(`title: dts-docs/api-reference/enum/${e.name}`);
10+
res.push(`group: dts-docs`)
11+
res.push("---");
12+
res.push("");
13+
814
res.push(`# ${e.name}`);
915
res.push("");
1016
res.push("```ts");

src/function.ts

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ export const parseFunction = (
4545
export const printFunction = (f: FunctionDocEntry): string => {
4646
const res: string[] = [];
4747

48+
res.push("---");
49+
res.push(`title: dts-docs/api-reference/function/${f.name}`);
50+
res.push(`group: dts-docs`)
51+
res.push("---");
52+
res.push("");
53+
54+
4855
res.push("# " + f.name);
4956
res.push("");
5057
res.push("```ts");

src/interface.ts

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ import { escapeHTML, serializeSymbol } from "./utils";
55
export const printInterface = (i: InterfaceDocEntry): string => {
66
const res: string[] = [];
77

8+
res.push("---");
9+
res.push(`title: dts-docs/api-reference/interface/${i.name}`);
10+
res.push(`group: dts-docs`)
11+
res.push("---");
12+
res.push("");
13+
14+
815
res.push(`# ${i.name}`);
916
res.push("");
1017

src/type.ts

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import { escapeHTML, serializeSymbol } from "./utils";
55
export const printType = (e: TypeDocEntry): string => {
66
const res: string[] = [];
77

8+
res.push("---");
9+
res.push(`title: dts-docs/api-reference/type/${e.name}`);
10+
res.push(`group: dts-docs`)
11+
res.push("---");
12+
res.push("");
13+
814
res.push(`# ${e.name}`);
915
res.push("");
1016

0 commit comments

Comments
 (0)