UNPKG

@microsoft/api-documenter

Version:

Read JSON files from api-extractor, generate documentation pages

26 lines 934 B
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. import { DocNode } from '@microsoft/tsdoc'; import { CustomDocNodeKind } from './CustomDocNodeKind'; /** * Represents a section header similar to an HTML `<h1>` or `<h2>` element. */ export class DocHeading extends DocNode { /** * Don't call this directly. Instead use {@link TSDocParser} * @internal */ constructor(parameters) { super(parameters); this.title = parameters.title; this.level = parameters.level !== undefined ? parameters.level : 1; if (this.level < 1 || this.level > 5) { throw new Error('IDocHeadingParameters.level must be a number between 1 and 5'); } } /** @override */ get kind() { return CustomDocNodeKind.Heading; } } //# sourceMappingURL=DocHeading.js.map