Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import { escapeHTML, serializeSignature, serializeSymbol } from "./utils";
export const printClass = (c: ClassDocEntry): string => {
const res: string[] = [];

res.push("---");
res.push(`title: dts-docs/api-reference/class/${c.name}`);
res.push(`group: dts-docs`)
res.push("---");
res.push("");


res.push(`# ${c.name}`);
res.push("");
if (c.heritage.extends && c.heritage.extends.length > 0) {
Expand Down
6 changes: 6 additions & 0 deletions src/dts-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ function main(args: string[]): void {

const res: string[] = [];

res.push("---");
res.push(`title: dts-docs/api-reference`);
res.push(`group: dts-docs`)
res.push("---");
res.push("");

res.push("# API reference");
res.push("");

Expand Down
6 changes: 6 additions & 0 deletions src/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import { escapeHTML, serializeSymbol } from "./utils";
export const printEnum = (e: EnumDocEntry): string => {
const res: string[] = [];

res.push("---");
res.push(`title: dts-docs/api-reference/enum/${e.name}`);
res.push(`group: dts-docs`)
res.push("---");
res.push("");

res.push(`# ${e.name}`);
res.push("");
res.push("```ts");
Expand Down
7 changes: 7 additions & 0 deletions src/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export const parseFunction = (
export const printFunction = (f: FunctionDocEntry): string => {
const res: string[] = [];

res.push("---");
res.push(`title: dts-docs/api-reference/function/${f.name}`);
res.push(`group: dts-docs`)
res.push("---");
res.push("");


res.push("# " + f.name);
res.push("");
res.push("```ts");
Expand Down
7 changes: 7 additions & 0 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ import { escapeHTML, serializeSymbol } from "./utils";
export const printInterface = (i: InterfaceDocEntry): string => {
const res: string[] = [];

res.push("---");
res.push(`title: dts-docs/api-reference/interface/${i.name}`);
res.push(`group: dts-docs`)
res.push("---");
res.push("");


res.push(`# ${i.name}`);
res.push("");

Expand Down
6 changes: 6 additions & 0 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import { escapeHTML, serializeSymbol } from "./utils";
export const printType = (e: TypeDocEntry): string => {
const res: string[] = [];

res.push("---");
res.push(`title: dts-docs/api-reference/type/${e.name}`);
res.push(`group: dts-docs`)
res.push("---");
res.push("");

res.push(`# ${e.name}`);
res.push("");

Expand Down