1 | import * as reflect from 'jsii-reflect';
|
2 | import { MarkdownDocument } from './markdown-doc';
|
3 | import { ApiReferenceSchema, AssemblyMetadataSchema, ClassSchema, ConstructSchema, EnumMemberSchema, EnumSchema, InitializerSchema, InterfaceSchema, JsiiEntity, MethodSchema, ParameterSchema, PropertySchema, Schema, StructSchema, TypeSchema } from '../schema';
|
4 | import { Language } from '../transpile/transpile';
|
5 | export interface MarkdownFormattingOptions {
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | readonly anchorFormatter?: (type: JsiiEntity) => string;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | readonly linkFormatter?: (type: JsiiEntity, metadata: AssemblyMetadataSchema) => string;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | readonly typeFormatter?: (type: TypeSchema, metadata: AssemblyMetadataSchema, linkFormatter: (type: JsiiEntity, metadata: AssemblyMetadataSchema) => string) => string;
|
48 | readonly header?: {
|
49 | title: string;
|
50 | id: string;
|
51 | };
|
52 | }
|
53 | export interface MarkdownRendererOptions extends MarkdownFormattingOptions, AssemblyMetadataSchema {
|
54 | |
55 |
|
56 |
|
57 | readonly language: Language;
|
58 | }
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | export declare class MarkdownRenderer {
|
77 | static fromSchema(schema: Schema, options: MarkdownFormattingOptions): MarkdownDocument;
|
78 | static fromSubmodules(submodules: readonly reflect.Submodule[], fileSuffix: string, options: MarkdownRendererOptions): MarkdownDocument;
|
79 | private readonly anchorFormatter;
|
80 | private readonly linkFormatter;
|
81 | private readonly typeFormatter;
|
82 | private readonly metadata;
|
83 | private readonly language;
|
84 | constructor(options: MarkdownRendererOptions);
|
85 | visitSubmodules(submodules: readonly reflect.Submodule[], fileSuffix: string): MarkdownDocument;
|
86 | visitApiReference(apiRef: ApiReferenceSchema, header?: {
|
87 | title: string;
|
88 | id: string;
|
89 | }): MarkdownDocument;
|
90 | visitConstructs(constructs: ConstructSchema[]): MarkdownDocument;
|
91 | visitStructs(structs: StructSchema[]): MarkdownDocument;
|
92 | visitClasses(classes: ClassSchema[]): MarkdownDocument;
|
93 | visitInterfaces(ifaces: InterfaceSchema[]): MarkdownDocument;
|
94 | visitEnums(enums: EnumSchema[]): MarkdownDocument;
|
95 | visitConstruct(construct: ConstructSchema): MarkdownDocument;
|
96 | visitStruct(struct: StructSchema): MarkdownDocument;
|
97 | visitClass(klass: ClassSchema): MarkdownDocument;
|
98 | visitInterface(iface: InterfaceSchema): MarkdownDocument;
|
99 | visitEnum(enu: EnumSchema): MarkdownDocument;
|
100 | visitEnumMembers(enus: EnumMemberSchema[]): MarkdownDocument;
|
101 | visitProperties(properties: PropertySchema[]): MarkdownDocument;
|
102 | visitInitializer(init: InitializerSchema): MarkdownDocument;
|
103 | visitInstanceMethods(methods: MethodSchema[]): MarkdownDocument;
|
104 | visitStaticFunctions(methods: MethodSchema[]): MarkdownDocument;
|
105 | visitConstants(constants: PropertySchema[]): MarkdownDocument;
|
106 | visitEnumMember(em: EnumMemberSchema): MarkdownDocument;
|
107 | visitProperty(prop: PropertySchema): MarkdownDocument;
|
108 | visitParameter(parameter: ParameterSchema): MarkdownDocument;
|
109 | visitInstanceMethod(method: MethodSchema): MarkdownDocument;
|
110 | visitStaticFunction(method: MethodSchema): MarkdownDocument;
|
111 | visitConstant(constant: PropertySchema): MarkdownDocument;
|
112 | private createTable;
|
113 | private createTableWithTypes;
|
114 | }
|
115 | export declare const defaultAnchorFormatter: (type: JsiiEntity) => string;
|
116 | export declare const defaultLinkFormatter: (type: JsiiEntity, metadata: AssemblyMetadataSchema) => string;
|
117 | export declare const defaultTypeFormatter: (type: TypeSchema, metadata: AssemblyMetadataSchema, linkFormatter: (type: JsiiEntity, metadata: AssemblyMetadataSchema) => string) => string;
|