1 | import { DocNode, DocNodeKind, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode';
|
2 | import type { DocHtmlAttribute } from './DocHtmlAttribute';
|
3 | import type { TokenSequence } from '../parser/TokenSequence';
|
4 |
|
5 |
|
6 |
|
7 | export interface IDocHtmlStartTagParameters extends IDocNodeParameters {
|
8 | name: string;
|
9 | spacingAfterName?: string;
|
10 | htmlAttributes?: DocHtmlAttribute[];
|
11 | selfClosingTag?: boolean;
|
12 | }
|
13 |
|
14 |
|
15 |
|
16 | export interface IDocHtmlStartTagParsedParameters extends IDocNodeParsedParameters {
|
17 | openingDelimiterExcerpt: TokenSequence;
|
18 | nameExcerpt: TokenSequence;
|
19 | spacingAfterNameExcerpt?: TokenSequence;
|
20 | htmlAttributes: DocHtmlAttribute[];
|
21 | selfClosingTag: boolean;
|
22 | closingDelimiterExcerpt: TokenSequence;
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | export declare class DocHtmlStartTag extends DocNode {
|
30 | private readonly _openingDelimiterExcerpt;
|
31 | private _name;
|
32 | private readonly _nameExcerpt;
|
33 | private _spacingAfterName;
|
34 | private readonly _spacingAfterNameExcerpt;
|
35 | private readonly _htmlAttributes;
|
36 | private readonly _selfClosingTag;
|
37 | private readonly _closingDelimiterExcerpt;
|
38 | |
39 |
|
40 |
|
41 |
|
42 | constructor(parameters: IDocHtmlStartTagParameters | IDocHtmlStartTagParsedParameters);
|
43 | /** @override */
|
44 | get kind(): DocNodeKind | string;
|
45 | /**
|
46 | * The HTML element name.
|
47 | */
|
48 | get name(): string;
|
49 | /**
|
50 | * The HTML attributes belonging to this HTML element.
|
51 | */
|
52 | get htmlAttributes(): ReadonlyArray<DocHtmlAttribute>;
|
53 | /**
|
54 | * If true, then the HTML tag ends with `/>` instead of `>`.
|
55 | */
|
56 | get selfClosingTag(): boolean;
|
57 | /**
|
58 | * Explicit whitespace that a renderer should insert after the HTML element name.
|
59 | * If undefined, then the renderer can use a formatting rule to generate appropriate spacing.
|
60 | */
|
61 | get spacingAfterName(): string | undefined;
|
62 | /**
|
63 | * Generates the HTML for this tag.
|
64 | */
|
65 | emitAsHtml(): string;
|
66 | /** @override */
|
67 | protected onGetChildNodes(): ReadonlyArray<DocNode | undefined>;
|
68 | }
|
69 | //# sourceMappingURL=DocHtmlStartTag.d.ts.map |
\ | No newline at end of file |