-
Notifications
You must be signed in to change notification settings - Fork 620
/
Copy pathDocNoteBox.ts
32 lines (26 loc) · 1.03 KB
/
DocNoteBox.ts
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
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import { type IDocNodeParameters, DocNode, DocSection } from '@microsoft/tsdoc';
import { CustomDocNodeKind } from './CustomDocNodeKind';
/**
* Constructor parameters for {@link DocNoteBox}.
*/
export interface IDocNoteBoxParameters extends IDocNodeParameters {}
/**
* Represents a note box, which is typically displayed as a bordered box containing informational text.
*/
export class DocNoteBox extends DocNode {
public readonly content: DocSection;
public constructor(parameters: IDocNoteBoxParameters, sectionChildNodes?: ReadonlyArray<DocNode>) {
super(parameters);
this.content = new DocSection({ configuration: this.configuration }, sectionChildNodes);
}
/** @override */
public get kind(): string {
return CustomDocNodeKind.NoteBox;
}
/** @override */
protected onGetChildNodes(): ReadonlyArray<DocNode | undefined> {
return [this.content];
}
}