forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocEmphasisSpan.ts
More file actions
37 lines (32 loc) · 1.02 KB
/
DocEmphasisSpan.ts
File metadata and controls
37 lines (32 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import {
DocNode,
DocNodeContainer,
IDocNodeContainerParameters
} from '@microsoft/tsdoc';
import { CustomDocNodeKind } from './CustomDocNodeKind';
/**
* Constructor parameters for {@link DocEmphasisSpan}.
*/
export interface IDocEmphasisSpanParameters extends IDocNodeContainerParameters {
bold?: boolean;
italic?: boolean;
}
/**
* Represents a span of text that is styled with CommonMark emphasis (italics), strong emphasis (boldface),
* or both.
*/
export class DocEmphasisSpan extends DocNodeContainer {
public readonly bold: boolean;
public readonly italic: boolean;
public constructor(parameters: IDocEmphasisSpanParameters, children?: DocNode[]) {
super(parameters, children);
this.bold = !!parameters.bold;
this.italic = !!parameters.italic;
}
/** @override */
public get kind(): string {
return CustomDocNodeKind.EmphasisSpan;
}
}