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ent":["import { TSDocConfiguration, DocNodeKind } from '@microsoft/tsdoc';\nimport { DocEmphasisSpan } from './DocEmphasisSpan';\nimport { DocHeading } from './DocHeading';\nimport { DocNoteBox } from './DocNoteBox';\nimport { DocTable } from './DocTable';\nimport { DocTableCell } from './DocTableCell';\nimport { DocTableRow } from './DocTableRow';\n\n// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * Identifies custom subclasses of {@link DocNode}.\n */\nexport const enum CustomDocNodeKind {\n EmphasisSpan = 'EmphasisSpan',\n Heading = 'Heading',\n NoteBox = 'NoteBox',\n Table = 'Table',\n TableCell = 'TableCell',\n TableRow = 'TableRow'\n}\n\nexport class CustomDocNodes {\n private static _configuration: TSDocConfiguration | undefined;\n\n public static get configuration(): TSDocConfiguration {\n if (CustomDocNodes._configuration === undefined) {\n const configuration: TSDocConfiguration = new TSDocConfiguration();\n\n configuration.docNodeManager.registerDocNodes('@micrososft/api-documenter', [\n { docNodeKind: CustomDocNodeKind.EmphasisSpan, constructor: DocEmphasisSpan },\n { docNodeKind: CustomDocNodeKind.Heading, constructor: DocHeading },\n { docNodeKind: CustomDocNodeKind.NoteBox, constructor: DocNoteBox },\n { docNodeKind: CustomDocNodeKind.Table, constructor: DocTable },\n { docNodeKind: CustomDocNodeKind.TableCell, constructor: DocTableCell },\n { docNodeKind: CustomDocNodeKind.TableRow, constructor: DocTableRow }\n ]);\n\n configuration.docNodeManager.registerAllowableChildren(CustomDocNodeKind.EmphasisSpan, [\n DocNodeKind.PlainText,\n DocNodeKind.SoftBreak\n ]);\n\n configuration.docNodeManager.registerAllowableChildren(DocNodeKind.Section, [\n CustomDocNodeKind.Heading,\n CustomDocNodeKind.NoteBox,\n CustomDocNodeKind.Table\n ]);\n\n configuration.docNodeManager.registerAllowableChildren(DocNodeKind.Paragraph, [\n CustomDocNodeKind.EmphasisSpan\n ]);\n\n CustomDocNodes._configuration = configuration;\n }\n return CustomDocNodes._configuration;\n }\n}\n"]}
\No newline at end of file