@syntrologie/adapt-faq 2.10.0 → 2.12.0

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.
@@ -0,0 +1,759 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ export type MarkedToken = (Tokens.Blockquote | Tokens.Br | Tokens.Checkbox | Tokens.Code | Tokens.Codespan | Tokens.Def | Tokens.Del | Tokens.Em | Tokens.Escape | Tokens.Heading | Tokens.Hr | Tokens.HTML | Tokens.Image | Tokens.Link | Tokens.List | Tokens.ListItem | Tokens.Paragraph | Tokens.Space | Tokens.Strong | Tokens.Table | Tokens.Tag | Tokens.Text);
4
+ export type Token = (MarkedToken | Tokens.Generic);
5
+ export declare namespace Tokens {
6
+ interface Blockquote {
7
+ type: "blockquote";
8
+ raw: string;
9
+ text: string;
10
+ tokens: Token[];
11
+ }
12
+ interface Br {
13
+ type: "br";
14
+ raw: string;
15
+ }
16
+ interface Checkbox {
17
+ type: "checkbox";
18
+ raw: string;
19
+ checked: boolean;
20
+ }
21
+ interface Code {
22
+ type: "code";
23
+ raw: string;
24
+ codeBlockStyle?: "indented";
25
+ lang?: string;
26
+ text: string;
27
+ escaped?: boolean;
28
+ }
29
+ interface Codespan {
30
+ type: "codespan";
31
+ raw: string;
32
+ text: string;
33
+ }
34
+ interface Def {
35
+ type: "def";
36
+ raw: string;
37
+ tag: string;
38
+ href: string;
39
+ title: string;
40
+ }
41
+ interface Del {
42
+ type: "del";
43
+ raw: string;
44
+ text: string;
45
+ tokens: Token[];
46
+ }
47
+ interface Em {
48
+ type: "em";
49
+ raw: string;
50
+ text: string;
51
+ tokens: Token[];
52
+ }
53
+ interface Escape {
54
+ type: "escape";
55
+ raw: string;
56
+ text: string;
57
+ }
58
+ interface Generic {
59
+ [index: string]: any;
60
+ type: string;
61
+ raw: string;
62
+ tokens?: Token[];
63
+ }
64
+ interface Heading {
65
+ type: "heading";
66
+ raw: string;
67
+ depth: number;
68
+ text: string;
69
+ tokens: Token[];
70
+ }
71
+ interface Hr {
72
+ type: "hr";
73
+ raw: string;
74
+ }
75
+ interface HTML {
76
+ type: "html";
77
+ raw: string;
78
+ pre: boolean;
79
+ text: string;
80
+ block: boolean;
81
+ }
82
+ interface Image {
83
+ type: "image";
84
+ raw: string;
85
+ href: string;
86
+ title: string | null;
87
+ text: string;
88
+ tokens: Token[];
89
+ }
90
+ interface Link {
91
+ type: "link";
92
+ raw: string;
93
+ href: string;
94
+ title?: string | null;
95
+ text: string;
96
+ tokens: Token[];
97
+ }
98
+ interface List {
99
+ type: "list";
100
+ raw: string;
101
+ ordered: boolean;
102
+ start: number | "";
103
+ loose: boolean;
104
+ items: ListItem[];
105
+ }
106
+ interface ListItem {
107
+ type: "list_item";
108
+ raw: string;
109
+ task: boolean;
110
+ checked?: boolean;
111
+ loose: boolean;
112
+ text: string;
113
+ tokens: Token[];
114
+ }
115
+ interface Paragraph {
116
+ type: "paragraph";
117
+ raw: string;
118
+ pre?: boolean;
119
+ text: string;
120
+ tokens: Token[];
121
+ }
122
+ interface Space {
123
+ type: "space";
124
+ raw: string;
125
+ }
126
+ interface Strong {
127
+ type: "strong";
128
+ raw: string;
129
+ text: string;
130
+ tokens: Token[];
131
+ }
132
+ interface Table {
133
+ type: "table";
134
+ raw: string;
135
+ align: Array<"center" | "left" | "right" | null>;
136
+ header: TableCell[];
137
+ rows: TableCell[][];
138
+ }
139
+ interface TableCell {
140
+ text: string;
141
+ tokens: Token[];
142
+ header: boolean;
143
+ align: "center" | "left" | "right" | null;
144
+ }
145
+ interface TableRow<P = string> {
146
+ text: P;
147
+ }
148
+ interface Tag {
149
+ type: "html";
150
+ raw: string;
151
+ inLink: boolean;
152
+ inRawBlock: boolean;
153
+ text: string;
154
+ block: boolean;
155
+ }
156
+ interface Text {
157
+ type: "text";
158
+ raw: string;
159
+ text: string;
160
+ tokens?: Token[];
161
+ escaped?: boolean;
162
+ }
163
+ }
164
+ export type Links = Record<string, Pick<Tokens.Link | Tokens.Image, "href" | "title">>;
165
+ export type TokensList = Token[] & {
166
+ links: Links;
167
+ };
168
+ /**
169
+ * Renderer
170
+ */
171
+ declare class _Renderer<ParserOutput = string, RendererOutput = string> {
172
+ options: MarkedOptions<ParserOutput, RendererOutput>;
173
+ parser: _Parser<ParserOutput, RendererOutput>;
174
+ constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
175
+ space(token: Tokens.Space): RendererOutput;
176
+ code({ text, lang, escaped }: Tokens.Code): RendererOutput;
177
+ blockquote({ tokens }: Tokens.Blockquote): RendererOutput;
178
+ html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput;
179
+ def(token: Tokens.Def): RendererOutput;
180
+ heading({ tokens, depth }: Tokens.Heading): RendererOutput;
181
+ hr(token: Tokens.Hr): RendererOutput;
182
+ list(token: Tokens.List): RendererOutput;
183
+ listitem(item: Tokens.ListItem): RendererOutput;
184
+ checkbox({ checked }: Tokens.Checkbox): RendererOutput;
185
+ paragraph({ tokens }: Tokens.Paragraph): RendererOutput;
186
+ table(token: Tokens.Table): RendererOutput;
187
+ tablerow({ text }: Tokens.TableRow<ParserOutput>): RendererOutput;
188
+ tablecell(token: Tokens.TableCell): RendererOutput;
189
+ /**
190
+ * span level renderer
191
+ */
192
+ strong({ tokens }: Tokens.Strong): RendererOutput;
193
+ em({ tokens }: Tokens.Em): RendererOutput;
194
+ codespan({ text }: Tokens.Codespan): RendererOutput;
195
+ br(token: Tokens.Br): RendererOutput;
196
+ del({ tokens }: Tokens.Del): RendererOutput;
197
+ link({ href, title, tokens }: Tokens.Link): RendererOutput;
198
+ image({ href, title, text, tokens }: Tokens.Image): RendererOutput;
199
+ text(token: Tokens.Text | Tokens.Escape): RendererOutput;
200
+ }
201
+ /**
202
+ * TextRenderer
203
+ * returns only the textual part of the token
204
+ */
205
+ declare class _TextRenderer<RendererOutput = string> {
206
+ strong({ text }: Tokens.Strong): RendererOutput;
207
+ em({ text }: Tokens.Em): RendererOutput;
208
+ codespan({ text }: Tokens.Codespan): RendererOutput;
209
+ del({ text }: Tokens.Del): RendererOutput;
210
+ html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput;
211
+ text({ text }: Tokens.Text | Tokens.Escape | Tokens.Tag): RendererOutput;
212
+ link({ text }: Tokens.Link): RendererOutput;
213
+ image({ text }: Tokens.Image): RendererOutput;
214
+ br(): RendererOutput;
215
+ checkbox({ raw }: Tokens.Checkbox): RendererOutput;
216
+ }
217
+ /**
218
+ * Parsing & Compiling
219
+ */
220
+ declare class _Parser<ParserOutput = string, RendererOutput = string> {
221
+ options: MarkedOptions<ParserOutput, RendererOutput>;
222
+ renderer: _Renderer<ParserOutput, RendererOutput>;
223
+ textRenderer: _TextRenderer<RendererOutput>;
224
+ constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
225
+ /**
226
+ * Static Parse Method
227
+ */
228
+ static parse<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
229
+ /**
230
+ * Static Parse Inline Method
231
+ */
232
+ static parseInline<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
233
+ /**
234
+ * Parse Loop
235
+ */
236
+ parse(tokens: Token[]): ParserOutput;
237
+ /**
238
+ * Parse Inline Tokens
239
+ */
240
+ parseInline(tokens: Token[], renderer?: _Renderer<ParserOutput, RendererOutput> | _TextRenderer<RendererOutput>): ParserOutput;
241
+ }
242
+ declare const other: {
243
+ codeRemoveIndent: RegExp;
244
+ outputLinkReplace: RegExp;
245
+ indentCodeCompensation: RegExp;
246
+ beginningSpace: RegExp;
247
+ endingHash: RegExp;
248
+ startingSpaceChar: RegExp;
249
+ endingSpaceChar: RegExp;
250
+ nonSpaceChar: RegExp;
251
+ newLineCharGlobal: RegExp;
252
+ tabCharGlobal: RegExp;
253
+ multipleSpaceGlobal: RegExp;
254
+ blankLine: RegExp;
255
+ doubleBlankLine: RegExp;
256
+ blockquoteStart: RegExp;
257
+ blockquoteSetextReplace: RegExp;
258
+ blockquoteSetextReplace2: RegExp;
259
+ listReplaceNesting: RegExp;
260
+ listIsTask: RegExp;
261
+ listReplaceTask: RegExp;
262
+ listTaskCheckbox: RegExp;
263
+ anyLine: RegExp;
264
+ hrefBrackets: RegExp;
265
+ tableDelimiter: RegExp;
266
+ tableAlignChars: RegExp;
267
+ tableRowBlankLine: RegExp;
268
+ tableAlignRight: RegExp;
269
+ tableAlignCenter: RegExp;
270
+ tableAlignLeft: RegExp;
271
+ startATag: RegExp;
272
+ endATag: RegExp;
273
+ startPreScriptTag: RegExp;
274
+ endPreScriptTag: RegExp;
275
+ startAngleBracket: RegExp;
276
+ endAngleBracket: RegExp;
277
+ pedanticHrefTitle: RegExp;
278
+ unicodeAlphaNumeric: RegExp;
279
+ escapeTest: RegExp;
280
+ escapeReplace: RegExp;
281
+ escapeTestNoEncode: RegExp;
282
+ escapeReplaceNoEncode: RegExp;
283
+ caret: RegExp;
284
+ percentDecode: RegExp;
285
+ findPipe: RegExp;
286
+ splitPipe: RegExp;
287
+ slashPipe: RegExp;
288
+ carriageReturn: RegExp;
289
+ spaceLine: RegExp;
290
+ notSpaceStart: RegExp;
291
+ endingNewline: RegExp;
292
+ listItemRegex: (bull: string) => RegExp;
293
+ nextBulletRegex: (indent: number) => RegExp;
294
+ hrRegex: (indent: number) => RegExp;
295
+ fencesBeginRegex: (indent: number) => RegExp;
296
+ headingBeginRegex: (indent: number) => RegExp;
297
+ htmlBeginRegex: (indent: number) => RegExp;
298
+ blockquoteBeginRegex: (indent: number) => RegExp;
299
+ };
300
+ declare const blockNormal: {
301
+ blockquote: RegExp;
302
+ code: RegExp;
303
+ def: RegExp;
304
+ fences: RegExp;
305
+ heading: RegExp;
306
+ hr: RegExp;
307
+ html: RegExp;
308
+ lheading: RegExp;
309
+ list: RegExp;
310
+ newline: RegExp;
311
+ paragraph: RegExp;
312
+ table: RegExp;
313
+ text: RegExp;
314
+ };
315
+ export type BlockKeys = keyof typeof blockNormal;
316
+ declare const inlineNormal: {
317
+ _backpedal: RegExp;
318
+ anyPunctuation: RegExp;
319
+ autolink: RegExp;
320
+ blockSkip: RegExp;
321
+ br: RegExp;
322
+ code: RegExp;
323
+ del: RegExp;
324
+ delLDelim: RegExp;
325
+ delRDelim: RegExp;
326
+ emStrongLDelim: RegExp;
327
+ emStrongRDelimAst: RegExp;
328
+ emStrongRDelimUnd: RegExp;
329
+ escape: RegExp;
330
+ link: RegExp;
331
+ nolink: RegExp;
332
+ punctuation: RegExp;
333
+ reflink: RegExp;
334
+ reflinkSearch: RegExp;
335
+ tag: RegExp;
336
+ text: RegExp;
337
+ url: RegExp;
338
+ };
339
+ export type InlineKeys = keyof typeof inlineNormal;
340
+ export interface Rules {
341
+ other: typeof other;
342
+ block: Record<BlockKeys, RegExp>;
343
+ inline: Record<InlineKeys, RegExp>;
344
+ }
345
+ /**
346
+ * Tokenizer
347
+ */
348
+ declare class _Tokenizer<ParserOutput = string, RendererOutput = string> {
349
+ options: MarkedOptions<ParserOutput, RendererOutput>;
350
+ rules: Rules;
351
+ lexer: _Lexer<ParserOutput, RendererOutput>;
352
+ constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
353
+ space(src: string): Tokens.Space | undefined;
354
+ code(src: string): Tokens.Code | undefined;
355
+ fences(src: string): Tokens.Code | undefined;
356
+ heading(src: string): Tokens.Heading | undefined;
357
+ hr(src: string): Tokens.Hr | undefined;
358
+ blockquote(src: string): Tokens.Blockquote | undefined;
359
+ list(src: string): Tokens.List | undefined;
360
+ html(src: string): Tokens.HTML | undefined;
361
+ def(src: string): Tokens.Def | undefined;
362
+ table(src: string): Tokens.Table | undefined;
363
+ lheading(src: string): Tokens.Heading | undefined;
364
+ paragraph(src: string): Tokens.Paragraph | undefined;
365
+ text(src: string): Tokens.Text | undefined;
366
+ escape(src: string): Tokens.Escape | undefined;
367
+ tag(src: string): Tokens.Tag | undefined;
368
+ link(src: string): Tokens.Link | Tokens.Image | undefined;
369
+ reflink(src: string, links: Links): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
370
+ emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
371
+ codespan(src: string): Tokens.Codespan | undefined;
372
+ br(src: string): Tokens.Br | undefined;
373
+ del(src: string, maskedSrc: string, prevChar?: string): Tokens.Del | undefined;
374
+ autolink(src: string): Tokens.Link | undefined;
375
+ url(src: string): Tokens.Link | undefined;
376
+ inlineText(src: string): Tokens.Text | undefined;
377
+ }
378
+ declare class _Hooks<ParserOutput = string, RendererOutput = string> {
379
+ options: MarkedOptions<ParserOutput, RendererOutput>;
380
+ block?: boolean;
381
+ constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
382
+ static passThroughHooks: Set<string>;
383
+ static passThroughHooksRespectAsync: Set<string>;
384
+ /**
385
+ * Process markdown before marked
386
+ */
387
+ preprocess(markdown: string): string;
388
+ /**
389
+ * Process HTML after marked is finished
390
+ */
391
+ postprocess(html: ParserOutput): ParserOutput;
392
+ /**
393
+ * Process all tokens before walk tokens
394
+ */
395
+ processAllTokens(tokens: Token[] | TokensList): Token[] | TokensList;
396
+ /**
397
+ * Mask contents that should not be interpreted as em/strong delimiters
398
+ */
399
+ emStrongMask(src: string): string;
400
+ /**
401
+ * Provide function to tokenize markdown
402
+ */
403
+ provideLexer(): typeof _Lexer.lexInline;
404
+ /**
405
+ * Provide function to parse tokens
406
+ */
407
+ provideParser(): (tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput> | undefined) => ParserOutput;
408
+ }
409
+ export interface TokenizerThis {
410
+ lexer: _Lexer;
411
+ }
412
+ export type TokenizerExtensionFunction = (this: TokenizerThis, src: string, tokens: Token[] | TokensList) => Tokens.Generic | undefined;
413
+ export type TokenizerStartFunction = (this: TokenizerThis, src: string) => number | void;
414
+ export interface TokenizerExtension {
415
+ name: string;
416
+ level: "block" | "inline";
417
+ start?: TokenizerStartFunction;
418
+ tokenizer: TokenizerExtensionFunction;
419
+ childTokens?: string[];
420
+ }
421
+ export interface RendererThis<ParserOutput = string, RendererOutput = string> {
422
+ parser: _Parser<ParserOutput, RendererOutput>;
423
+ }
424
+ export type RendererExtensionFunction<ParserOutput = string, RendererOutput = string> = (this: RendererThis<ParserOutput, RendererOutput>, token: Tokens.Generic) => RendererOutput | false | undefined;
425
+ export interface RendererExtension<ParserOutput = string, RendererOutput = string> {
426
+ name: string;
427
+ renderer: RendererExtensionFunction<ParserOutput, RendererOutput>;
428
+ }
429
+ export type TokenizerAndRendererExtension<ParserOutput = string, RendererOutput = string> = TokenizerExtension | RendererExtension<ParserOutput, RendererOutput> | (TokenizerExtension & RendererExtension<ParserOutput, RendererOutput>);
430
+ export type HooksApi<ParserOutput = string, RendererOutput = string> = Omit<_Hooks<ParserOutput, RendererOutput>, "constructor" | "options" | "block">;
431
+ export type HooksObject<ParserOutput = string, RendererOutput = string> = {
432
+ [K in keyof HooksApi<ParserOutput, RendererOutput>]?: (this: _Hooks<ParserOutput, RendererOutput>, ...args: Parameters<HooksApi<ParserOutput, RendererOutput>[K]>) => ReturnType<HooksApi<ParserOutput, RendererOutput>[K]> | Promise<ReturnType<HooksApi<ParserOutput, RendererOutput>[K]>>;
433
+ };
434
+ export type RendererApi<ParserOutput = string, RendererOutput = string> = Omit<_Renderer<ParserOutput, RendererOutput>, "constructor" | "options" | "parser">;
435
+ export type RendererObject<ParserOutput = string, RendererOutput = string> = {
436
+ [K in keyof RendererApi<ParserOutput, RendererOutput>]?: (this: _Renderer<ParserOutput, RendererOutput>, ...args: Parameters<RendererApi<ParserOutput, RendererOutput>[K]>) => ReturnType<RendererApi<ParserOutput, RendererOutput>[K]> | false;
437
+ };
438
+ export type TokenizerApi<ParserOutput = string, RendererOutput = string> = Omit<_Tokenizer<ParserOutput, RendererOutput>, "constructor" | "options" | "rules" | "lexer">;
439
+ export type TokenizerObject<ParserOutput = string, RendererOutput = string> = {
440
+ [K in keyof TokenizerApi<ParserOutput, RendererOutput>]?: (this: _Tokenizer<ParserOutput, RendererOutput>, ...args: Parameters<TokenizerApi<ParserOutput, RendererOutput>[K]>) => ReturnType<TokenizerApi<ParserOutput, RendererOutput>[K]> | false;
441
+ };
442
+ export interface MarkedExtension<ParserOutput = string, RendererOutput = string> {
443
+ /**
444
+ * True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
445
+ */
446
+ async?: boolean;
447
+ /**
448
+ * Enable GFM line breaks. This option requires the gfm option to be true.
449
+ */
450
+ breaks?: boolean;
451
+ /**
452
+ * Add tokenizers and renderers to marked
453
+ */
454
+ extensions?: TokenizerAndRendererExtension<ParserOutput, RendererOutput>[] | null;
455
+ /**
456
+ * Enable GitHub flavored markdown.
457
+ */
458
+ gfm?: boolean;
459
+ /**
460
+ * Hooks are methods that hook into some part of marked.
461
+ * preprocess is called to process markdown before sending it to marked.
462
+ * processAllTokens is called with the TokensList before walkTokens.
463
+ * postprocess is called to process html after marked has finished parsing.
464
+ * emStrongMask is called to mask contents that should not be interpreted as em/strong delimiters.
465
+ * provideLexer is called to provide a function to tokenize markdown.
466
+ * provideParser is called to provide a function to parse tokens.
467
+ */
468
+ hooks?: HooksObject<ParserOutput, RendererOutput> | null;
469
+ /**
470
+ * Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
471
+ */
472
+ pedantic?: boolean;
473
+ /**
474
+ * Type: object Default: new Renderer()
475
+ *
476
+ * An object containing functions to render tokens to HTML.
477
+ */
478
+ renderer?: RendererObject<ParserOutput, RendererOutput> | null;
479
+ /**
480
+ * Shows an HTML error message when rendering fails.
481
+ */
482
+ silent?: boolean;
483
+ /**
484
+ * The tokenizer defines how to turn markdown text into tokens.
485
+ */
486
+ tokenizer?: TokenizerObject | null;
487
+ /**
488
+ * The walkTokens function gets called with every token.
489
+ * Child tokens are called before moving on to sibling tokens.
490
+ * Each token is passed by reference so updates are persisted when passed to the parser.
491
+ * The return value of the function is ignored.
492
+ */
493
+ walkTokens?: ((token: Token) => void | Promise<void>) | null;
494
+ }
495
+ export interface MarkedOptions<ParserOutput = string, RendererOutput = string> extends Omit<MarkedExtension<ParserOutput, RendererOutput>, "hooks" | "renderer" | "tokenizer" | "extensions" | "walkTokens"> {
496
+ /**
497
+ * Hooks are methods that hook into some part of marked.
498
+ */
499
+ hooks?: _Hooks<ParserOutput, RendererOutput> | null;
500
+ /**
501
+ * Type: object Default: new Renderer()
502
+ *
503
+ * An object containing functions to render tokens to HTML.
504
+ */
505
+ renderer?: _Renderer<ParserOutput, RendererOutput> | null;
506
+ /**
507
+ * The tokenizer defines how to turn markdown text into tokens.
508
+ */
509
+ tokenizer?: _Tokenizer<ParserOutput, RendererOutput> | null;
510
+ /**
511
+ * Custom extensions
512
+ */
513
+ extensions?: null | {
514
+ renderers: {
515
+ [name: string]: RendererExtensionFunction<ParserOutput, RendererOutput>;
516
+ };
517
+ childTokens: {
518
+ [name: string]: string[];
519
+ };
520
+ inline?: TokenizerExtensionFunction[];
521
+ block?: TokenizerExtensionFunction[];
522
+ startInline?: TokenizerStartFunction[];
523
+ startBlock?: TokenizerStartFunction[];
524
+ };
525
+ /**
526
+ * walkTokens function returns array of values for Promise.all
527
+ */
528
+ walkTokens?: null | ((token: Token) => void | Promise<void> | (void | Promise<void>)[]);
529
+ }
530
+ /**
531
+ * Block Lexer
532
+ */
533
+ declare class _Lexer<ParserOutput = string, RendererOutput = string> {
534
+ tokens: TokensList;
535
+ options: MarkedOptions<ParserOutput, RendererOutput>;
536
+ state: {
537
+ inLink: boolean;
538
+ inRawBlock: boolean;
539
+ top: boolean;
540
+ };
541
+ inlineQueue: {
542
+ src: string;
543
+ tokens: Token[];
544
+ }[];
545
+ private tokenizer;
546
+ constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
547
+ /**
548
+ * Expose Rules
549
+ */
550
+ static get rules(): {
551
+ block: {
552
+ normal: {
553
+ blockquote: RegExp;
554
+ code: RegExp;
555
+ def: RegExp;
556
+ fences: RegExp;
557
+ heading: RegExp;
558
+ hr: RegExp;
559
+ html: RegExp;
560
+ lheading: RegExp;
561
+ list: RegExp;
562
+ newline: RegExp;
563
+ paragraph: RegExp;
564
+ table: RegExp;
565
+ text: RegExp;
566
+ };
567
+ gfm: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "def" | "heading" | "list" | "paragraph" | "fences" | "lheading" | "newline", RegExp>;
568
+ pedantic: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "def" | "heading" | "list" | "paragraph" | "fences" | "lheading" | "newline", RegExp>;
569
+ };
570
+ inline: {
571
+ normal: {
572
+ _backpedal: RegExp;
573
+ anyPunctuation: RegExp;
574
+ autolink: RegExp;
575
+ blockSkip: RegExp;
576
+ br: RegExp;
577
+ code: RegExp;
578
+ del: RegExp;
579
+ delLDelim: RegExp;
580
+ delRDelim: RegExp;
581
+ emStrongLDelim: RegExp;
582
+ emStrongRDelimAst: RegExp;
583
+ emStrongRDelimUnd: RegExp;
584
+ escape: RegExp;
585
+ link: RegExp;
586
+ nolink: RegExp;
587
+ punctuation: RegExp;
588
+ reflink: RegExp;
589
+ reflinkSearch: RegExp;
590
+ tag: RegExp;
591
+ text: RegExp;
592
+ url: RegExp;
593
+ };
594
+ gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
595
+ breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
596
+ pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
597
+ };
598
+ };
599
+ /**
600
+ * Static Lex Method
601
+ */
602
+ static lex<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): TokensList;
603
+ /**
604
+ * Static Lex Inline Method
605
+ */
606
+ static lexInline<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): Token[];
607
+ /**
608
+ * Preprocessing
609
+ */
610
+ lex(src: string): TokensList;
611
+ /**
612
+ * Lexing
613
+ */
614
+ blockTokens(src: string, tokens?: Token[], lastParagraphClipped?: boolean): Token[];
615
+ blockTokens(src: string, tokens?: TokensList, lastParagraphClipped?: boolean): TokensList;
616
+ inline(src: string, tokens?: Token[]): Token[];
617
+ /**
618
+ * Lexing/Compiling
619
+ */
620
+ inlineTokens(src: string, tokens?: Token[]): Token[];
621
+ }
622
+ /**
623
+ * Gets the original marked default options.
624
+ */
625
+ declare function _getDefaults<ParserOutput = string, RendererOutput = string>(): MarkedOptions<ParserOutput, RendererOutput>;
626
+ declare let _defaults: MarkedOptions<any, any>;
627
+ export type MaybePromise = void | Promise<void>;
628
+ export declare class Marked<ParserOutput = string, RendererOutput = string> {
629
+ defaults: MarkedOptions<ParserOutput, RendererOutput>;
630
+ options: (opt: MarkedOptions<ParserOutput, RendererOutput>) => this;
631
+ parse: {
632
+ (src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
633
+ async: true;
634
+ }): Promise<ParserOutput>;
635
+ (src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
636
+ async: false;
637
+ }): ParserOutput;
638
+ (src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;
639
+ };
640
+ parseInline: {
641
+ (src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
642
+ async: true;
643
+ }): Promise<ParserOutput>;
644
+ (src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
645
+ async: false;
646
+ }): ParserOutput;
647
+ (src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;
648
+ };
649
+ Parser: {
650
+ new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Parser<ParserOutput, RendererOutput>;
651
+ parse<ParserOutput_1 = string, RendererOutput_1 = string>(tokens: Token[], options?: MarkedOptions<ParserOutput_1, RendererOutput_1>): ParserOutput_1;
652
+ parseInline<ParserOutput_1 = string, RendererOutput_1 = string>(tokens: Token[], options?: MarkedOptions<ParserOutput_1, RendererOutput_1>): ParserOutput_1;
653
+ };
654
+ Renderer: {
655
+ new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Renderer<ParserOutput, RendererOutput>;
656
+ };
657
+ TextRenderer: {
658
+ new (): _TextRenderer<RendererOutput>;
659
+ };
660
+ Lexer: typeof _Lexer;
661
+ Tokenizer: {
662
+ new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Tokenizer<ParserOutput, RendererOutput>;
663
+ };
664
+ Hooks: {
665
+ new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Hooks<ParserOutput, RendererOutput>;
666
+ passThroughHooks: Set<string>;
667
+ passThroughHooksRespectAsync: Set<string>;
668
+ };
669
+ constructor(...args: MarkedExtension<ParserOutput, RendererOutput>[]);
670
+ /**
671
+ * Run callback for every token
672
+ */
673
+ walkTokens(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]): MaybePromise[];
674
+ use(...args: MarkedExtension<ParserOutput, RendererOutput>[]): this;
675
+ setOptions(opt: MarkedOptions<ParserOutput, RendererOutput>): this;
676
+ lexer(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): TokensList;
677
+ parser(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
678
+ private parseMarkdown;
679
+ private onError;
680
+ }
681
+ /**
682
+ * Compiles markdown to HTML asynchronously.
683
+ *
684
+ * @param src String of markdown source to be compiled
685
+ * @param options Hash of options, having async: true
686
+ * @return Promise of string of compiled HTML
687
+ */
688
+ export declare function marked(src: string, options: MarkedOptions & {
689
+ async: true;
690
+ }): Promise<string>;
691
+ /**
692
+ * Compiles markdown to HTML.
693
+ *
694
+ * @param src String of markdown source to be compiled
695
+ * @param options Optional hash of options
696
+ * @return String of compiled HTML. Will be a Promise of string if async is set to true by any extensions.
697
+ */
698
+ export declare function marked(src: string, options: MarkedOptions & {
699
+ async: false;
700
+ }): string;
701
+ export declare function marked(src: string, options: MarkedOptions & {
702
+ async: true;
703
+ }): Promise<string>;
704
+ export declare function marked(src: string, options?: MarkedOptions | null): string | Promise<string>;
705
+ export declare namespace marked {
706
+ var options: (options: MarkedOptions) => typeof marked;
707
+ var setOptions: (options: MarkedOptions) => typeof marked;
708
+ var getDefaults: typeof _getDefaults;
709
+ var defaults: MarkedOptions<any, any>;
710
+ var use: (...args: MarkedExtension[]) => typeof marked;
711
+ var walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
712
+ var parseInline: {
713
+ (src: string, options: MarkedOptions<string, string> & {
714
+ async: true;
715
+ }): Promise<string>;
716
+ (src: string, options: MarkedOptions<string, string> & {
717
+ async: false;
718
+ }): string;
719
+ (src: string, options?: MarkedOptions<string, string> | null | undefined): string | Promise<string>;
720
+ };
721
+ var Parser: typeof _Parser;
722
+ var parser: typeof _Parser.parse;
723
+ var Renderer: typeof _Renderer;
724
+ var TextRenderer: typeof _TextRenderer;
725
+ var Lexer: typeof _Lexer;
726
+ var lexer: typeof _Lexer.lex;
727
+ var Tokenizer: typeof _Tokenizer;
728
+ var Hooks: typeof _Hooks;
729
+ var parse: typeof marked;
730
+ }
731
+ export declare const options: (options: MarkedOptions) => typeof marked;
732
+ export declare const setOptions: (options: MarkedOptions) => typeof marked;
733
+ export declare const use: (...args: MarkedExtension[]) => typeof marked;
734
+ export declare const walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
735
+ export declare const parseInline: {
736
+ (src: string, options: MarkedOptions<string, string> & {
737
+ async: true;
738
+ }): Promise<string>;
739
+ (src: string, options: MarkedOptions<string, string> & {
740
+ async: false;
741
+ }): string;
742
+ (src: string, options?: MarkedOptions<string, string> | null | undefined): string | Promise<string>;
743
+ };
744
+ export declare const parse: typeof marked;
745
+ export declare const parser: typeof _Parser.parse;
746
+ export declare const lexer: typeof _Lexer.lex;
747
+
748
+ export {
749
+ _Hooks as Hooks,
750
+ _Lexer as Lexer,
751
+ _Parser as Parser,
752
+ _Renderer as Renderer,
753
+ _TextRenderer as TextRenderer,
754
+ _Tokenizer as Tokenizer,
755
+ _defaults as defaults,
756
+ _getDefaults as getDefaults,
757
+ };
758
+
759
+ export {};