diff --git a/node_modules/@microsoft/tsdoc/CHANGELOG.json b/node_modules/@microsoft/tsdoc/CHANGELOG.json new file mode 100644 index 0000000000000000000000000000000000000000..37f9a72b47cab0122f9a71cd1d530b4a18de51c0 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/CHANGELOG.json @@ -0,0 +1,778 @@ +{ + "name": "@microsoft/tsdoc", + "entries": [ + { + "version": "0.16.0", + "tag": "@microsoft/tsdoc_v0.16.0", + "date": "Tue, 11 Nov 2025 00:51:42 GMT", + "comments": { + "minor": [ + { + "comment": "Normalize builtin imports." + }, + { + "comment": "Standardize TypeScript's `@jsx`, `@jsxRuntime`, `@jsxFrag`, `@jsxImportSource` tags." + } + ], + "patch": [ + { + "comment": "Ensure TSDocEmitter does not emit a newline for the text after `@defaultValue` tags." + }, + { + "comment": "Remove test files and declaration maps from the published package." + } + ] + } + }, + { + "version": "0.15.1", + "tag": "@microsoft/tsdoc_v0.15.1", + "date": "Sat, 23 Nov 2024 00:23:35 GMT", + "comments": { + "patch": [ + { + "comment": "Include CHANGELOG.md in published releases again" + } + ] + } + }, + { + "version": "0.15.0", + "tag": "@microsoft/tsdoc_v0.15.0", + "date": "Tue, 28 May 2024 21:34:19 GMT", + "comments": { + "minor": [ + { + "comment": "Minor package cleanup." + }, + { + "comment": "Eliminate remaining const enums." + } + ], + "patch": [ + { + "comment": "Update an image URL in the README.md file" + }, + { + "comment": "Upgrade dev toolchain (Heft, Webpack, TypeScript)" + } + ] + } + }, + { + "version": "0.14.2", + "tag": "@microsoft/tsdoc_v0.14.2", + "date": "Wed, 14 Sep 2022 02:55:06 GMT", + "comments": { + "patch": [ + { + "comment": "Update an internal type import to avoid a circular reference (GitHub #327 and #328)" + } + ] + } + }, + { + "version": "0.14.1", + "tag": "@microsoft/tsdoc_v0.14.1", + "date": "Sat, 09 Apr 2022 02:28:41 GMT", + "comments": { + "patch": [ + { + "comment": "Rename the \"master\" branch to \"main.\"" + } + ] + } + }, + { + "version": "0.14.0", + "tag": "@microsoft/tsdoc_v0.14.0", + "date": "Thu, 07 Apr 2022 22:51:07 GMT", + "comments": { + "minor": [ + { + "comment": "Add `supportedHtmlElements` and `reportUnsupportedHtmlElements` options and corresponding validation" + }, + { + "comment": "Convert \"const enum\" APIs to be regular enums to enable compatibility with isolatedModules=true (GitHub #306)" + } + ] + } + }, + { + "version": "0.13.2", + "tag": "@microsoft/tsdoc_v0.13.2", + "date": "Tue, 20 Apr 2021 04:25:13 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where \"tsdoc-inline-tag-missing-braces\" and \"tsdoc-tag-should-not-have-braces\" were reported incorrectly" + } + ] + } + }, + { + "version": "0.13.1", + "tag": "@microsoft/tsdoc_v0.13.1", + "date": "Mon, 19 Apr 2021 21:22:32 GMT", + "comments": { + "patch": [ + { + "comment": "Add a new TSDocMessageId definition used by @microsoft/tsdoc-config" + } + ] + } + }, + { + "version": "0.13.0", + "tag": "@microsoft/tsdoc_v0.13.0", + "date": "Fri, 22 Jan 2021 18:07:19 GMT", + "comments": { + "patch": [ + { + "comment": "Update doc comments to fix some syntax issues" + } + ], + "minor": [ + { + "comment": "Update tsdoc.json schema to add a new field \"noStandardTags\"" + }, + { + "comment": "Add new APIs: TSDocConfiguration.clear() and TSDocTagDefinition.validateTSDocTagName()" + }, + { + "comment": "Add new \"supportForTags\" field to tsdoc.json schema" + } + ] + } + }, + { + "version": "0.12.24", + "tag": "@microsoft/tsdoc_v0.12.24", + "date": "Thu, 03 Dec 2020 08:07:55 GMT", + "comments": { + "patch": [ + { + "comment": "Add a missing declaration file" + } + ] + } + }, + { + "version": "0.12.23", + "tag": "@microsoft/tsdoc_v0.12.23", + "date": "Thu, 03 Dec 2020 04:31:52 GMT", + "comments": { + "patch": [ + { + "comment": "Add a definition for the `@decorator` block tag (RFC 271)" + } + ] + } + }, + { + "version": "0.12.22", + "tag": "@microsoft/tsdoc_v0.12.22", + "date": "Mon, 30 Nov 2020 06:16:21 GMT", + "comments": { + "patch": [ + { + "comment": "Update documentation to reference the new website URL" + }, + { + "comment": "Upgrade build tools and configuration" + }, + { + "comment": "Fix typo" + } + ] + } + }, + { + "version": "0.12.21", + "tag": "@microsoft/tsdoc_v0.12.21", + "date": "Fri, 04 Sep 2020 15:53:27 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where the line extractor's trailing whitespace trimming sometimes trimmed a non-whitespace character (GitHub #258)" + }, + { + "comment": "Update build system" + } + ] + } + }, + { + "version": "0.12.20", + "tag": "@microsoft/tsdoc_v0.12.20", + "date": "Wed, 20 May 2020 22:33:27 GMT", + "comments": { + "patch": [ + { + "comment": "Add support for `@see` tag" + }, + { + "comment": "Improve documentation for `@inheritDoc`" + } + ] + } + }, + { + "version": "0.12.19", + "tag": "@microsoft/tsdoc_v0.12.19", + "date": "Fri, 27 Mar 2020 23:14:53 GMT", + "comments": { + "patch": [ + { + "comment": "Add some missing entries to TSDocConfiguration.allTsdocMessageIds() which were breaking eslint-plugin-tsdoc" + }, + { + "comment": "Fix an issue where \"h1\" was not allowed as an HTML element name" + } + ] + } + }, + { + "version": "0.12.18", + "tag": "@microsoft/tsdoc_v0.12.18", + "date": "Sat, 22 Feb 2020 20:44:16 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where JSDoc optional params were not parsed correctly" + } + ] + } + }, + { + "version": "0.12.17", + "tag": "@microsoft/tsdoc_v0.12.17", + "date": "Sat, 22 Feb 2020 02:55:07 GMT", + "comments": { + "patch": [ + { + "comment": "Improve the parsing of `@param` and `@typeParam` tags to recognize legacy syntaxes" + } + ] + } + }, + { + "version": "0.12.16", + "tag": "@microsoft/tsdoc_v0.12.16", + "date": "Tue, 19 Nov 2019 22:01:56 GMT", + "comments": { + "patch": [ + { + "comment": "Add some new TSDocMessageId definitions used by @microsoft/tsdoc-config" + } + ] + } + }, + { + "version": "0.12.15", + "tag": "@microsoft/tsdoc_v0.12.15", + "date": "Sat, 09 Nov 2019 05:55:42 GMT", + "comments": { + "patch": [ + { + "comment": "Add new API TSDocConfiguration.allTsdocMessageIds" + } + ] + } + }, + { + "version": "0.12.14", + "tag": "@microsoft/tsdoc_v0.12.14", + "date": "Wed, 04 Sep 2019 03:30:10 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a regression where some API signatures were incompatible with TypeScript versions prior to 3.4" + } + ] + } + }, + { + "version": "0.12.13", + "tag": "@microsoft/tsdoc_v0.12.13", + "date": "Fri, 30 Aug 2019 18:38:59 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an invalid regular expression." + } + ] + } + }, + { + "version": "0.12.12", + "tag": "@microsoft/tsdoc_v0.12.12", + "date": "Wed, 07 Aug 2019 23:06:02 GMT", + "comments": { + "patch": [ + { + "comment": "Improve DeclarationReference.parse for module sources" + }, + { + "comment": "Add a definition for the `@throws` block tag (RFC 171)" + } + ] + } + }, + { + "version": "0.12.11", + "tag": "@microsoft/tsdoc_v0.12.11", + "date": "Wed, 24 Jul 2019 00:38:18 GMT", + "comments": { + "patch": [ + { + "comment": "Add new meanings to DeclarationReference and fix some parsing bugs" + } + ] + } + }, + { + "version": "0.12.10", + "tag": "@microsoft/tsdoc_v0.12.10", + "date": "Fri, 19 Jul 2019 02:47:09 GMT", + "comments": { + "patch": [ + { + "comment": "Add beta implementation of new DeclarationReference API" + } + ] + } + }, + { + "version": "0.12.9", + "tag": "@microsoft/tsdoc_v0.12.9", + "date": "Thu, 11 Apr 2019 03:58:35 GMT", + "comments": { + "patch": [ + { + "comment": "Improve the wording of the error messages involving character sequences that look like TSDoc tags" + } + ] + } + }, + { + "version": "0.12.8", + "tag": "@microsoft/tsdoc_v0.12.8", + "date": "Tue, 12 Mar 2019 23:18:11 GMT", + "comments": { + "patch": [ + { + "comment": "Fix an issue where tsdoc-param-tag-with-invalid-name was sometimes incorrectly reported certain identifiers (issue #148)" + } + ] + } + }, + { + "version": "0.12.7", + "tag": "@microsoft/tsdoc_v0.12.7", + "date": "Fri, 01 Mar 2019 06:39:52 GMT", + "comments": { + "patch": [ + { + "comment": "Add new API TSDocConfiguration.isKnownMessageId()" + } + ] + } + }, + { + "version": "0.12.6", + "tag": "@microsoft/tsdoc_v0.12.6", + "date": "Thu, 28 Feb 2019 01:29:39 GMT", + "comments": { + "patch": [ + { + "comment": "Add a new API ParserMessage.messageId with a unique ID useful for filtering and searching for errors" + } + ] + } + }, + { + "version": "0.12.5", + "tag": "@microsoft/tsdoc_v0.12.5", + "date": "Tue, 29 Jan 2019 22:49:58 GMT", + "comments": { + "patch": [ + { + "comment": "Update parser to allow `$` character in `@param` names, since ECMAScript allows this in unquoted identifiers" + }, + { + "comment": "Allow `$` character in declaration reference member identifiers (Example: `{@link Button.$render}`)" + } + ] + } + }, + { + "version": "0.12.4", + "tag": "@microsoft/tsdoc_v0.12.4", + "date": "Tue, 20 Nov 2018 21:23:06 GMT", + "comments": { + "patch": [ + { + "comment": "Add new interface `IStringBuilder`" + } + ] + } + }, + { + "version": "0.12.3", + "tag": "@microsoft/tsdoc_v0.12.3", + "date": "Tue, 20 Nov 2018 07:42:17 GMT", + "comments": { + "patch": [ + { + "comment": "Add a new API `PlainTextEmitter.hasAnyTextContent()`" + } + ] + } + }, + { + "version": "0.12.2", + "tag": "@microsoft/tsdoc_v0.12.2", + "date": "Fri, 09 Nov 2018 15:13:13 GMT", + "comments": { + "patch": [ + { + "comment": "Improve trimming of spacing for link text in `{@link}` tags" + } + ] + } + }, + { + "version": "0.12.1", + "tag": "@microsoft/tsdoc_v0.12.1", + "date": "Tue, 06 Nov 2018 01:37:22 GMT", + "comments": { + "patch": [ + { + "comment": "Allow HTML in a `DocSection` node" + }, + { + "comment": "Fix a bug where `TSDocEmitter.renderHtmlTag()` and `TSDocEmitter.renderDeclarationReference()` were including comment framing" + }, + { + "comment": "Add `DocSection.appendNodesInParagraph()` API" + } + ] + } + }, + { + "version": "0.12.0", + "tag": "@microsoft/tsdoc_v0.12.0", + "date": "Sat, 03 Nov 2018 02:07:10 GMT", + "comments": { + "patch": [ + { + "comment": "Add `DocDeclarationReference.emitAsTsdoc()`, `DocHtmlStartTag.emitAsHtml()`, and `DocHtmlEndTag.emitAsHtml()`" + }, + { + "comment": "Child nodes can now be specified as a second constructor parameter for `DocNodeContainer`" + } + ], + "minor": [ + { + "comment": "(API change) `DocErrorText` is no longer allowed in `DocSection`; instead it must be part of a `DocParagraph`" + }, + { + "comment": "(API change) Rename `TSDocParserConfiguration` to `TSDocConfiguration`" + }, + { + "comment": "(API change) Require an associated `TSDocConfiguration` to be included with the parameters for every `DocNode` constructor" + }, + { + "comment": "Introduce `TSDocConfiguration.docNodeManager` for registering custom `DocNode` subclasses and their container relationships" + } + ] + } + }, + { + "version": "0.11.0", + "tag": "@microsoft/tsdoc_v0.11.0", + "date": "Sat, 27 Oct 2018 04:52:23 GMT", + "comments": { + "minor": [ + { + "comment": "(API change) Introduce `DocParamCollection` to enable efficient lookups of parameters by name" + }, + { + "comment": "(API change) Rename `DocComment.typeParamBlocks` --> `DocComment.typeParams`" + }, + { + "comment": "(API change) Rename `DocComment.paramBlocks` --> `DocComment.params`" + } + ] + } + }, + { + "version": "0.10.0", + "tag": "@microsoft/tsdoc_v0.10.0", + "date": "Fri, 26 Oct 2018 08:42:51 GMT", + "comments": { + "minor": [ + { + "comment": "Add new APIs `DocComment.emitAsTsdoc()`, `TSDocEmitter`, and `StringBuilder`" + } + ] + } + }, + { + "version": "0.9.3", + "tag": "@microsoft/tsdoc_v0.9.3", + "date": "Thu, 25 Oct 2018 08:29:36 GMT", + "comments": { + "patch": [ + { + "comment": "Fix issue where `DocErrorText.text` returned `[object Object]` instead of the text" + } + ] + } + }, + { + "version": "0.9.2", + "tag": "@microsoft/tsdoc_v0.9.2", + "date": "Wed, 17 Oct 2018 13:41:54 GMT", + "comments": { + "patch": [ + { + "comment": "Fix stack overflow in DocFencedCode.language property getter" + } + ] + } + }, + { + "version": "0.9.1", + "tag": "@microsoft/tsdoc_v0.9.1", + "date": "Wed, 17 Oct 2018 12:49:01 GMT", + "comments": { + "patch": [ + { + "comment": "Fix a regression where the paragraph splitter was sometimes skipping blocks" + } + ] + } + }, + { + "version": "0.9.0", + "tag": "@microsoft/tsdoc_v0.9.0", + "date": "Wed, 17 Oct 2018 04:47:19 GMT", + "comments": { + "minor": [ + { + "comment": "(API change) Change `DocBlock` to have a `DocSection` property rather than inheriting from `DocSection`; this eliminates confusion about which nodes belong to the container" + }, + { + "comment": "(API change) Rename `DocParticle` to `DocExcerpt`, and eliminate the `Excerpt` class" + }, + { + "comment": "(API change) Eliminate `DocNodeLeaf`, since now `DocExcerpt` is the only class that can represent excerpts" + }, + { + "comment": "(API change) Remove `DocNode.updateParameters()` because it is no longer needed" + }, + { + "comment": "(API change) Spacing is now represented as a normal `DocExcerpt`, rather than via a special `Excerpt.spacingAfterContent`" + }, + { + "comment": "(API change) Simplify `DocNodeTransforms.trimSpacesInParagraph()` to no longer merge/remap excerpts during the transformation. If we need this information, we will track it differently." + } + ] + } + }, + { + "version": "0.8.1", + "tag": "@microsoft/api-extractor_v0.8.1", + "date": "Sun, 07 Oct 2018 06:30:34 GMT", + "comments": { + "patch": [ + { + "comment": "Improve error reporting for declaration references that are probably missing a `\"#\"` delimiter" + }, + { + "comment": "Rename `DocCodeFence` to `DocFencedCode`" + } + ] + } + }, + { + "version": "0.8.0", + "tag": "@microsoft/api-extractor_v0.8.0", + "date": "Wed, 03 Oct 2018 02:43:47 GMT", + "comments": { + "minor": [ + { + "comment": "Introduce a distinction between \"defined\" tags (i.e. recognized) versus \"supported\" tags (i.e. implemented by the tool)" + }, + { + "comment": "The parser optionally reports usage of undefined tags" + }, + { + "comment": "The parser optionally reports usage of unsupported tags" + }, + { + "comment": "The parser reports usage of inline/block syntax that is inconsistent with the tag definition" + }, + { + "comment": "Code spans are now allowed to be adjacent to other text, but must contain at least one character" + }, + { + "comment": "An `@deprecated` block must contain a deprecation message" + }, + { + "comment": "If `@inheritDoc` is used, then the summary section must be empty, and there must not be an `@remarks` block" + } + ] + } + }, + { + "version": "0.7.0", + "tag": "@microsoft/api-extractor_v0.7.0", + "date": "Tue, 02 Oct 2018 02:35:35 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for `@defaultValue` tag" + }, + { + "comment": "Add support for `@typeParam` tag" + } + ] + } + }, + { + "version": "0.6.0", + "tag": "@microsoft/api-extractor_v0.6.0", + "date": "Mon, 01 Oct 2018 22:11:24 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for `@link` tags using the new declaration reference syntax" + }, + { + "comment": "Add support for `@inheritDoc` tags" + }, + { + "comment": "Add new APIs: `DocDeclarationReference`, `DocInheritDocTag`, `DocLinkTag`, `DocMemberIdentifier`, `DocMemberReference`, `DocMemberSelector`, `DocMemberSymbol`" + }, + { + "comment": "Remove `ParserContext.verbatimNodes`" + }, + { + "comment": "Add `DocParticle.particleId` property" + } + ] + } + }, + { + "version": "0.5.0", + "tag": "@microsoft/api-extractor_v0.5.0", + "date": "Tue, 25 Sep 2018 03:04:06 GMT", + "comments": { + "minor": [ + { + "comment": "Add a new API `DocNode.updateParameters()` that allows a `DocNode` object to be updated after it was created; the tree nodes are no longer immutable" + }, + { + "comment": "Add `DocNodeTransforms.trimSpacesInParagraphNodes()` for collapsing whitespace inside `DocParagraph` subtrees" + }, + { + "comment": "Extract the `DocNode.excerpt` property into a new abstract base class `DocNodeLeaf`" + } + ] + } + }, + { + "version": "0.4.1", + "tag": "@microsoft/api-extractor_v0.4.1", + "date": "Fri, 31 Aug 2018 03:32:18 GMT", + "comments": { + "patch": [ + { + "comment": "Improve the error location reporting for DocErrorText objects" + }, + { + "comment": "Separate the **api-demo** sample into a \"simple\" scenario which parses a simple text string, and an \"advanced\" scenario which uses the TypeScript compiler API to extract comments and parse custom TSDoc tags" + } + ] + } + }, + { + "version": "0.4.0", + "tag": "@microsoft/api-extractor_v0.4.0", + "date": "Tue, 28 Aug 2018 03:17:20 GMT", + "comments": { + "minor": [ + { + "comment": "Rename `DocCodeSpan.text` to `DocCodeSpan.code` and model the delimiters using particles" + }, + { + "comment": "Add support for code fences (`DocCodeFence`)" + }, + { + "comment": "`DocSection` content is now grouped into `DocParagraph` nodes; blank lines are used to indicate paragraph boundaries" + }, + { + "comment": "Rename `DocComment.deprecated` to `deprecatedBlock`" + } + ] + } + }, + { + "version": "0.3.0", + "tag": "@microsoft/api-extractor_v0.3.0", + "date": "Sat, 25 Aug 2018 05:53:56 GMT", + "comments": { + "minor": [ + { + "comment": "Add TextRange.isEmpty()" + }, + { + "comment": "Improve the ModifierTagSet API" + }, + { + "comment": "Implement the @privateRemarks and @deprecated tags" + } + ] + } + }, + { + "version": "0.2.0", + "tag": "@microsoft/api-extractor_v0.2.0", + "date": "Fri, 24 Aug 2018 01:19:56 GMT", + "comments": { + "minor": [ + { + "comment": "Rename `CoreTags` to `StandardTags` so we can include non-core tags in the standard definitions" + }, + { + "comment": "Rename `CoreModifierTagSet` to `StandardModifierTagSet` and convert properties to functions" + }, + { + "comment": "Categorize the standard tags according to a `Standardization` enum, and document them" + }, + { + "comment": "Add more standard tag definitions: `@deprecated`, `@eventProperty`, `@example`, `@inheritDoc`, `@link`, `@override`, `@packageDocumentation`, `@public`, `@privateRemarks`, `@sealed`, `@virtual`" + }, + { + "comment": "Replace TSDocTagDefinition.singleton with TSDocTagDefinition.allowMultiple, since in practice most tags are single-usage" + } + ] + } + }, + { + "version": "0.1.0", + "tag": "@microsoft/api-extractor_v0.1.0", + "date": "Thu, 16 Aug 2018 18:18:02 GMT", + "comments": { + "minor": [ + { + "comment": "Initial release of the TSDoc library! :-)" + } + ] + } + } + ] +} diff --git a/node_modules/@microsoft/tsdoc/CHANGELOG.md b/node_modules/@microsoft/tsdoc/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..ced0c59233e090d31826e8aea69a6a9379f168d1 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/CHANGELOG.md @@ -0,0 +1,421 @@ +# Change Log - @microsoft/tsdoc + +This log was last generated on Tue, 11 Nov 2025 00:51:42 GMT and should not be manually modified. + +## 0.16.0 +Tue, 11 Nov 2025 00:51:42 GMT + +### Minor changes + +- Normalize builtin imports. +- Standardize TypeScript's `@jsx`, `@jsxRuntime`, `@jsxFrag`, `@jsxImportSource` tags. + +### Patches + +- Ensure TSDocEmitter does not emit a newline for the text after `@defaultValue` tags. +- Remove test files and declaration maps from the published package. + +## 0.15.1 +Sat, 23 Nov 2024 00:23:35 GMT + +### Patches + +- Include CHANGELOG.md in published releases again + +## 0.15.0 +Tue, 28 May 2024 21:34:19 GMT + +### Minor changes + +- Minor package cleanup. +- Eliminate remaining const enums. + +### Patches + +- Update an image URL in the README.md file +- Upgrade dev toolchain (Heft, Webpack, TypeScript) + +## 0.14.2 +Wed, 14 Sep 2022 02:55:06 GMT + +### Patches + +- Update an internal type import to avoid a circular reference (GitHub #327 and #328) + +## 0.14.1 +Sat, 09 Apr 2022 02:28:41 GMT + +### Patches + +- Rename the "master" branch to "main." + +## 0.14.0 +Thu, 07 Apr 2022 22:51:07 GMT + +### Minor changes + +- Add `supportedHtmlElements` and `reportUnsupportedHtmlElements` options and corresponding validation +- Convert "const enum" APIs to be regular enums to enable compatibility with isolatedModules=true (GitHub #306) + +## 0.13.2 +Tue, 20 Apr 2021 04:25:13 GMT + +### Patches + +- Fix an issue where "tsdoc-inline-tag-missing-braces" and "tsdoc-tag-should-not-have-braces" were reported incorrectly + +## 0.13.1 +Mon, 19 Apr 2021 21:22:32 GMT + +### Patches + +- Add a new TSDocMessageId definition used by @microsoft/tsdoc-config + +## 0.13.0 +Fri, 22 Jan 2021 18:07:19 GMT + +### Minor changes + +- Update tsdoc.json schema to add a new field "noStandardTags" +- Add new APIs: TSDocConfiguration.clear() and TSDocTagDefinition.validateTSDocTagName() +- Add new "supportForTags" field to tsdoc.json schema + +### Patches + +- Update doc comments to fix some syntax issues + +## 0.12.24 +Thu, 03 Dec 2020 08:07:55 GMT + +### Patches + +- Add a missing declaration file + +## 0.12.23 +Thu, 03 Dec 2020 04:31:52 GMT + +### Patches + +- Add a definition for the `@decorator` block tag (RFC 271) + +## 0.12.22 +Mon, 30 Nov 2020 06:16:21 GMT + +### Patches + +- Update documentation to reference the new website URL +- Upgrade build tools and configuration +- Fix typo + +## 0.12.21 +Fri, 04 Sep 2020 15:53:27 GMT + +### Patches + +- Fix an issue where the line extractor's trailing whitespace trimming sometimes trimmed a non-whitespace character (GitHub #258) +- Update build system + +## 0.12.20 +Wed, 20 May 2020 22:33:27 GMT + +### Patches + +- Add support for `@see` tag +- Improve documentation for `@inheritDoc` + +## 0.12.19 +Fri, 27 Mar 2020 23:14:53 GMT + +### Patches + +- Add some missing entries to TSDocConfiguration.allTsdocMessageIds() which were breaking eslint-plugin-tsdoc +- Fix an issue where "h1" was not allowed as an HTML element name + +## 0.12.18 +Sat, 22 Feb 2020 20:44:16 GMT + +### Patches + +- Fix an issue where JSDoc optional params were not parsed correctly + +## 0.12.17 +Sat, 22 Feb 2020 02:55:07 GMT + +### Patches + +- Improve the parsing of `@param` and `@typeParam` tags to recognize legacy syntaxes + +## 0.12.16 +Tue, 19 Nov 2019 22:01:56 GMT + +### Patches + +- Add some new TSDocMessageId definitions used by @microsoft/tsdoc-config + +## 0.12.15 +Sat, 09 Nov 2019 05:55:42 GMT + +### Patches + +- Add new API TSDocConfiguration.allTsdocMessageIds + +## 0.12.14 +Wed, 04 Sep 2019 03:30:10 GMT + +### Patches + +- Fix a regression where some API signatures were incompatible with TypeScript versions prior to 3.4 + +## 0.12.13 +Fri, 30 Aug 2019 18:38:59 GMT + +### Patches + +- Fix an invalid regular expression. + +## 0.12.12 +Wed, 07 Aug 2019 23:06:02 GMT + +### Patches + +- Improve DeclarationReference.parse for module sources +- Add a definition for the `@throws` block tag (RFC 171) + +## 0.12.11 +Wed, 24 Jul 2019 00:38:18 GMT + +### Patches + +- Add new meanings to DeclarationReference and fix some parsing bugs + +## 0.12.10 +Fri, 19 Jul 2019 02:47:09 GMT + +### Patches + +- Add beta implementation of new DeclarationReference API + +## 0.12.9 +Thu, 11 Apr 2019 03:58:35 GMT + +### Patches + +- Improve the wording of the error messages involving character sequences that look like TSDoc tags + +## 0.12.8 +Tue, 12 Mar 2019 23:18:11 GMT + +### Patches + +- Fix an issue where tsdoc-param-tag-with-invalid-name was sometimes incorrectly reported certain identifiers (issue #148) + +## 0.12.7 +Fri, 01 Mar 2019 06:39:52 GMT + +### Patches + +- Add new API TSDocConfiguration.isKnownMessageId() + +## 0.12.6 +Thu, 28 Feb 2019 01:29:39 GMT + +### Patches + +- Add a new API ParserMessage.messageId with a unique ID useful for filtering and searching for errors + +## 0.12.5 +Tue, 29 Jan 2019 22:49:58 GMT + +### Patches + +- Update parser to allow `$` character in `@param` names, since ECMAScript allows this in unquoted identifiers +- Allow `$` character in declaration reference member identifiers (Example: `{@link Button.$render}`) + +## 0.12.4 +Tue, 20 Nov 2018 21:23:06 GMT + +### Patches + +- Add new interface `IStringBuilder` + +## 0.12.3 +Tue, 20 Nov 2018 07:42:17 GMT + +### Patches + +- Add a new API `PlainTextEmitter.hasAnyTextContent()` + +## 0.12.2 +Fri, 09 Nov 2018 15:13:13 GMT + +### Patches + +- Improve trimming of spacing for link text in `{@link}` tags + +## 0.12.1 +Tue, 06 Nov 2018 01:37:22 GMT + +### Patches + +- Allow HTML in a `DocSection` node +- Fix a bug where `TSDocEmitter.renderHtmlTag()` and `TSDocEmitter.renderDeclarationReference()` were including comment framing +- Add `DocSection.appendNodesInParagraph()` API + +## 0.12.0 +Sat, 03 Nov 2018 02:07:10 GMT + +### Minor changes + +- (API change) `DocErrorText` is no longer allowed in `DocSection`; instead it must be part of a `DocParagraph` +- (API change) Rename `TSDocParserConfiguration` to `TSDocConfiguration` +- (API change) Require an associated `TSDocConfiguration` to be included with the parameters for every `DocNode` constructor +- Introduce `TSDocConfiguration.docNodeManager` for registering custom `DocNode` subclasses and their container relationships + +### Patches + +- Add `DocDeclarationReference.emitAsTsdoc()`, `DocHtmlStartTag.emitAsHtml()`, and `DocHtmlEndTag.emitAsHtml()` +- Child nodes can now be specified as a second constructor parameter for `DocNodeContainer` + +## 0.11.0 +Sat, 27 Oct 2018 04:52:23 GMT + +### Minor changes + +- (API change) Introduce `DocParamCollection` to enable efficient lookups of parameters by name +- (API change) Rename `DocComment.typeParamBlocks` --> `DocComment.typeParams` +- (API change) Rename `DocComment.paramBlocks` --> `DocComment.params` + +## 0.10.0 +Fri, 26 Oct 2018 08:42:51 GMT + +### Minor changes + +- Add new APIs `DocComment.emitAsTsdoc()`, `TSDocEmitter`, and `StringBuilder` + +## 0.9.3 +Thu, 25 Oct 2018 08:29:36 GMT + +### Patches + +- Fix issue where `DocErrorText.text` returned `[object Object]` instead of the text + +## 0.9.2 +Wed, 17 Oct 2018 13:41:54 GMT + +### Patches + +- Fix stack overflow in DocFencedCode.language property getter + +## 0.9.1 +Wed, 17 Oct 2018 12:49:01 GMT + +### Patches + +- Fix a regression where the paragraph splitter was sometimes skipping blocks + +## 0.9.0 +Wed, 17 Oct 2018 04:47:19 GMT + +### Minor changes + +- (API change) Change `DocBlock` to have a `DocSection` property rather than inheriting from `DocSection`; this eliminates confusion about which nodes belong to the container +- (API change) Rename `DocParticle` to `DocExcerpt`, and eliminate the `Excerpt` class +- (API change) Eliminate `DocNodeLeaf`, since now `DocExcerpt` is the only class that can represent excerpts +- (API change) Remove `DocNode.updateParameters()` because it is no longer needed +- (API change) Spacing is now represented as a normal `DocExcerpt`, rather than via a special `Excerpt.spacingAfterContent` +- (API change) Simplify `DocNodeTransforms.trimSpacesInParagraph()` to no longer merge/remap excerpts during the transformation. If we need this information, we will track it differently. + +## 0.8.1 +Sun, 07 Oct 2018 06:30:34 GMT + +### Patches + +- Improve error reporting for declaration references that are probably missing a `"#"` delimiter +- Rename `DocCodeFence` to `DocFencedCode` + +## 0.8.0 +Wed, 03 Oct 2018 02:43:47 GMT + +### Minor changes + +- Introduce a distinction between "defined" tags (i.e. recognized) versus "supported" tags (i.e. implemented by the tool) +- The parser optionally reports usage of undefined tags +- The parser optionally reports usage of unsupported tags +- The parser reports usage of inline/block syntax that is inconsistent with the tag definition +- Code spans are now allowed to be adjacent to other text, but must contain at least one character +- An `@deprecated` block must contain a deprecation message +- If `@inheritDoc` is used, then the summary section must be empty, and there must not be an `@remarks` block + +## 0.7.0 +Tue, 02 Oct 2018 02:35:35 GMT + +### Minor changes + +- Add support for `@defaultValue` tag +- Add support for `@typeParam` tag + +## 0.6.0 +Mon, 01 Oct 2018 22:11:24 GMT + +### Minor changes + +- Add support for `@link` tags using the new declaration reference syntax +- Add support for `@inheritDoc` tags +- Add new APIs: `DocDeclarationReference`, `DocInheritDocTag`, `DocLinkTag`, `DocMemberIdentifier`, `DocMemberReference`, `DocMemberSelector`, `DocMemberSymbol` +- Remove `ParserContext.verbatimNodes` +- Add `DocParticle.particleId` property + +## 0.5.0 +Tue, 25 Sep 2018 03:04:06 GMT + +### Minor changes + +- Add a new API `DocNode.updateParameters()` that allows a `DocNode` object to be updated after it was created; the tree nodes are no longer immutable +- Add `DocNodeTransforms.trimSpacesInParagraphNodes()` for collapsing whitespace inside `DocParagraph` subtrees +- Extract the `DocNode.excerpt` property into a new abstract base class `DocNodeLeaf` + +## 0.4.1 +Fri, 31 Aug 2018 03:32:18 GMT + +### Patches + +- Improve the error location reporting for DocErrorText objects +- Separate the **api-demo** sample into a "simple" scenario which parses a simple text string, and an "advanced" scenario which uses the TypeScript compiler API to extract comments and parse custom TSDoc tags + +## 0.4.0 +Tue, 28 Aug 2018 03:17:20 GMT + +### Minor changes + +- Rename `DocCodeSpan.text` to `DocCodeSpan.code` and model the delimiters using particles +- Add support for code fences (`DocCodeFence`) +- `DocSection` content is now grouped into `DocParagraph` nodes; blank lines are used to indicate paragraph boundaries +- Rename `DocComment.deprecated` to `deprecatedBlock` + +## 0.3.0 +Sat, 25 Aug 2018 05:53:56 GMT + +### Minor changes + +- Add TextRange.isEmpty() +- Improve the ModifierTagSet API +- Implement the @privateRemarks and @deprecated tags + +## 0.2.0 +Fri, 24 Aug 2018 01:19:56 GMT + +### Minor changes + +- Rename `CoreTags` to `StandardTags` so we can include non-core tags in the standard definitions +- Rename `CoreModifierTagSet` to `StandardModifierTagSet` and convert properties to functions +- Categorize the standard tags according to a `Standardization` enum, and document them +- Add more standard tag definitions: `@deprecated`, `@eventProperty`, `@example`, `@inheritDoc`, `@link`, `@override`, `@packageDocumentation`, `@public`, `@privateRemarks`, `@sealed`, `@virtual` +- Replace TSDocTagDefinition.singleton with TSDocTagDefinition.allowMultiple, since in practice most tags are single-usage + +## 0.1.0 +Thu, 16 Aug 2018 18:18:02 GMT + +### Minor changes + +- Initial release of the TSDoc library! :-) + diff --git a/node_modules/@microsoft/tsdoc/LICENSE b/node_modules/@microsoft/tsdoc/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..8e281a1419edbb177a336f2c26a7ecef2fb33edd --- /dev/null +++ b/node_modules/@microsoft/tsdoc/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@microsoft/tsdoc/README.md b/node_modules/@microsoft/tsdoc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..03ca2606005d938ced098e54cd1c25718a4c4f59 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/README.md @@ -0,0 +1,56 @@ +# @microsoft/tsdoc + +
+
+ + + +

+

+ +This library is the reference implementation of a parser for the TSDoc syntax. Using this library is an easy way to ensure that your tool is 100% compatible with the standard. + + +## What is TSDoc? + +**TSDoc** is a proposal to standardize the doc comments used in [TypeScript](http://www.typescriptlang.org/) source files. It allows different tools to extract content from comments without getting confused by each other's syntax. The **TSDoc** notation looks pretty familiar: + +```typescript +export class Statistics { + /** + * Returns the average of two numbers. + * + * @remarks + * This method is part of the {@link core-library#Statistics | Statistics subsystem}. + * + * @param x - The first input number + * @param y - The second input number + * @returns The arithmetic mean of `x` and `y` + * + * @beta + */ + public static getAverage(x: number, y: number): number { + return (x + y) / 2.0; + } +} +``` + +## Give it a try! + +Check out the [TSDoc Playground](https://tsdoc.org/play) for a cool live demo of our parser! + + +## API Usage + +The [api-demo](https://github.com/microsoft/tsdoc/tree/main/api-demo) folder on GitHub illustrates how +to invoke the TSDoc parser. + +A separate NPM package [`@microsoft/tsdoc-config`](https://www.npmjs.com/package/@microsoft/tsdoc-config) +is used for loading the **tsdoc.json** file. + + +## Get involved + +The **TSDoc** project is actively evolving. Please visit the website for the latest documentation, instructions for building/debugging the projects, and other resources: + +https://tsdoc.org/ diff --git a/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b4c31e441e5ee6919e941a40a72c20f800f2643 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts @@ -0,0 +1,200 @@ +/** + * Represents a reference to a declaration. + * @beta + */ +export declare class DeclarationReference { + private _source; + private _navigation; + private _symbol; + constructor(source?: ModuleSource | GlobalSource, navigation?: Navigation.Locals | Navigation.Exports, symbol?: SymbolReference); + get source(): ModuleSource | GlobalSource | undefined; + get navigation(): Navigation.Locals | Navigation.Exports | undefined; + get symbol(): SymbolReference | undefined; + get isEmpty(): boolean; + static parse(text: string): DeclarationReference; + static parseComponent(text: string): Component; + /** + * Determines whether the provided string is a well-formed symbol navigation component string. + */ + static isWellFormedComponentString(text: string): boolean; + /** + * Escapes a string for use as a symbol navigation component. If the string contains any of `!.#~:,"{}()@` or starts + * with `[`, it is enclosed in quotes. + */ + static escapeComponentString(text: string): string; + /** + * Unescapes a string used as a symbol navigation component. + */ + static unescapeComponentString(text: string): string; + /** + * Determines whether the provided string is a well-formed module source string. The string may not + * have a trailing `!` character. + */ + static isWellFormedModuleSourceString(text: string): boolean; + /** + * Escapes a string for use as a module source. If the string contains any of `!"` it is enclosed in quotes. + */ + static escapeModuleSourceString(text: string): string; + /** + * Unescapes a string used as a module source. The string may not have a trailing `!` character. + */ + static unescapeModuleSourceString(text: string): string; + static empty(): DeclarationReference; + static package(packageName: string, importPath?: string): DeclarationReference; + static module(path: string, userEscaped?: boolean): DeclarationReference; + static global(): DeclarationReference; + static from(base: DeclarationReference | undefined): DeclarationReference; + withSource(source: ModuleSource | GlobalSource | undefined): DeclarationReference; + withNavigation(navigation: Navigation.Locals | Navigation.Exports | undefined): DeclarationReference; + withSymbol(symbol: SymbolReference | undefined): DeclarationReference; + withComponentPath(componentPath: ComponentPath): DeclarationReference; + withMeaning(meaning: Meaning | undefined): DeclarationReference; + withOverloadIndex(overloadIndex: number | undefined): DeclarationReference; + addNavigationStep(navigation: Navigation, component: ComponentLike): DeclarationReference; + toString(): string; +} +/** + * Indicates the symbol table from which to resolve the next symbol component. + * @beta + */ +export declare enum Navigation { + Exports = ".", + Members = "#", + Locals = "~" +} +/** + * Represents a module. + * @beta + */ +export declare class ModuleSource { + readonly escapedPath: string; + private _path; + private _pathComponents; + constructor(path: string, userEscaped?: boolean); + get path(): string; + get packageName(): string; + get scopeName(): string; + get unscopedPackageName(): string; + get importPath(): string; + static fromScopedPackage(scopeName: string | undefined, unscopedPackageName: string, importPath?: string): ModuleSource; + static fromPackage(packageName: string, importPath?: string): ModuleSource; + private static _fromPackageName; + toString(): string; + private _getOrParsePathComponents; +} +/** + * Represents the global scope. + * @beta + */ +export declare class GlobalSource { + static readonly instance: GlobalSource; + private constructor(); + toString(): string; +} +/** + * @beta + */ +export type Component = ComponentString | ComponentReference; +/** + * @beta + */ +export declare namespace Component { + function from(value: ComponentLike): Component; +} +/** + * @beta + */ +export type ComponentLike = Component | DeclarationReference | string; +/** + * @beta + */ +export declare class ComponentString { + readonly text: string; + constructor(text: string, userEscaped?: boolean); + toString(): string; +} +/** + * @beta + */ +export declare class ComponentReference { + readonly reference: DeclarationReference; + constructor(reference: DeclarationReference); + static parse(text: string): ComponentReference; + withReference(reference: DeclarationReference): ComponentReference; + toString(): string; +} +/** + * @beta + */ +export type ComponentPath = ComponentRoot | ComponentNavigation; +/** + * @beta + */ +export declare abstract class ComponentPathBase { + readonly component: Component; + constructor(component: Component); + addNavigationStep(this: ComponentPath, navigation: Navigation, component: ComponentLike): ComponentPath; + abstract toString(): string; +} +/** + * @beta + */ +export declare class ComponentRoot extends ComponentPathBase { + withComponent(component: ComponentLike): ComponentRoot; + toString(): string; +} +/** + * @beta + */ +export declare class ComponentNavigation extends ComponentPathBase { + readonly parent: ComponentPath; + readonly navigation: Navigation; + constructor(parent: ComponentPath, navigation: Navigation, component: Component); + withParent(parent: ComponentPath): ComponentNavigation; + withNavigation(navigation: Navigation): ComponentNavigation; + withComponent(component: ComponentLike): ComponentNavigation; + toString(): string; +} +/** + * @beta + */ +export declare enum Meaning { + Class = "class",// SymbolFlags.Class + Interface = "interface",// SymbolFlags.Interface + TypeAlias = "type",// SymbolFlags.TypeAlias + Enum = "enum",// SymbolFlags.Enum + Namespace = "namespace",// SymbolFlags.Module + Function = "function",// SymbolFlags.Function + Variable = "var",// SymbolFlags.Variable + Constructor = "constructor",// SymbolFlags.Constructor + Member = "member",// SymbolFlags.ClassMember | SymbolFlags.EnumMember + Event = "event",// + CallSignature = "call",// SymbolFlags.Signature (for __call) + ConstructSignature = "new",// SymbolFlags.Signature (for __new) + IndexSignature = "index",// SymbolFlags.Signature (for __index) + ComplexType = "complex" +} +/** + * @beta + */ +export interface ISymbolReferenceOptions { + meaning?: Meaning; + overloadIndex?: number; +} +/** + * Represents a reference to a TypeScript symbol. + * @beta + */ +export declare class SymbolReference { + readonly componentPath: ComponentPath | undefined; + readonly meaning: Meaning | undefined; + readonly overloadIndex: number | undefined; + constructor(component: ComponentPath | undefined, { meaning, overloadIndex }?: ISymbolReferenceOptions); + static empty(): SymbolReference; + withComponentPath(componentPath: ComponentPath | undefined): SymbolReference; + withMeaning(meaning: Meaning | undefined): SymbolReference; + withOverloadIndex(overloadIndex: number | undefined): SymbolReference; + addNavigationStep(navigation: Navigation, component: ComponentLike): SymbolReference; + toString(): string; +} +//# sourceMappingURL=DeclarationReference.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts.map b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f3639564ceb8103783dbd167cc0cc68c46e5a8f7 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DeclarationReference.d.ts","sourceRoot":"","sources":["../../src/beta/DeclarationReference.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,WAAW,CAAqD;IACxE,OAAO,CAAC,OAAO,CAA8B;gBAG3C,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY,EACpC,UAAU,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,OAAO,EACnD,MAAM,CAAC,EAAE,eAAe;IAO1B,IAAW,MAAM,IAAI,YAAY,GAAG,YAAY,GAAG,SAAS,CAE3D;IAED,IAAW,UAAU,IAAI,UAAU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,EAAE,aAAa,GAAG,eAAe;IAOpF,QAAQ,IAAI,MAAM;CAW1B"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js new file mode 100644 index 0000000000000000000000000000000000000000..89190080add9c8d89c5d3af4c50eca1005ef7c10 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js @@ -0,0 +1,1281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +/* eslint-disable @typescript-eslint/no-use-before-define */ +/* eslint-disable @typescript-eslint/naming-convention */ +// NOTE: See DeclarationReference.grammarkdown for information on the underlying grammar. +import { StringChecks } from '../parser/StringChecks'; +/** + * Represents a reference to a declaration. + * @beta + */ +export class DeclarationReference { + constructor(source, navigation, symbol) { + this._source = source; + this._navigation = navigation; + this._symbol = symbol; + } + get source() { + return this._source; + } + get navigation() { + if (!this._source || !this._symbol) { + return undefined; + } + if (this._source === GlobalSource.instance) { + return Navigation.Locals; + } + if (this._navigation === undefined) { + return Navigation.Exports; + } + return this._navigation; + } + get symbol() { + return this._symbol; + } + get isEmpty() { + return this.source === undefined && this.symbol === undefined; + } + static parse(text) { + const parser = new Parser(text); + const reference = parser.parseDeclarationReference(); + if (parser.errors.length) { + throw new SyntaxError(`Invalid DeclarationReference '${text}':\n ${parser.errors.join('\n ')}`); + } + if (!parser.eof) { + throw new SyntaxError(`Invalid DeclarationReference '${text}'`); + } + return reference; + } + static parseComponent(text) { + if (text[0] === '[') { + return ComponentReference.parse(text); + } + else { + return new ComponentString(text, true); + } + } + /** + * Determines whether the provided string is a well-formed symbol navigation component string. + */ + static isWellFormedComponentString(text) { + const scanner = new Scanner(text); + return scanner.scan() === Token.String + ? scanner.scan() === Token.EofToken + : scanner.token() === Token.Text + ? scanner.scan() === Token.EofToken + : scanner.token() === Token.EofToken; + } + /** + * Escapes a string for use as a symbol navigation component. If the string contains any of `!.#~:,"{}()@` or starts + * with `[`, it is enclosed in quotes. + */ + static escapeComponentString(text) { + if (text.length === 0) { + return '""'; + } + const ch = text.charAt(0); + if (ch === '[' || ch === '"' || !this.isWellFormedComponentString(text)) { + return JSON.stringify(text); + } + return text; + } + /** + * Unescapes a string used as a symbol navigation component. + */ + static unescapeComponentString(text) { + if (text.length >= 2 && text.charAt(0) === '"' && text.charAt(text.length - 1) === '"') { + try { + return JSON.parse(text); + } + catch (_a) { + throw new SyntaxError(`Invalid Component '${text}'`); + } + } + if (!this.isWellFormedComponentString(text)) { + throw new SyntaxError(`Invalid Component '${text}'`); + } + return text; + } + /** + * Determines whether the provided string is a well-formed module source string. The string may not + * have a trailing `!` character. + */ + static isWellFormedModuleSourceString(text) { + const scanner = new Scanner(text + '!'); + return (scanner.rescanModuleSource() === Token.ModuleSource && + !scanner.stringIsUnterminated && + scanner.scan() === Token.ExclamationToken && + scanner.scan() === Token.EofToken); + } + /** + * Escapes a string for use as a module source. If the string contains any of `!"` it is enclosed in quotes. + */ + static escapeModuleSourceString(text) { + if (text.length === 0) { + return '""'; + } + const ch = text.charAt(0); + if (ch === '"' || !this.isWellFormedModuleSourceString(text)) { + return JSON.stringify(text); + } + return text; + } + /** + * Unescapes a string used as a module source. The string may not have a trailing `!` character. + */ + static unescapeModuleSourceString(text) { + if (text.length >= 2 && text.charAt(0) === '"' && text.charAt(text.length - 1) === '"') { + try { + return JSON.parse(text); + } + catch (_a) { + throw new SyntaxError(`Invalid Module source '${text}'`); + } + } + if (!this.isWellFormedModuleSourceString(text)) { + throw new SyntaxError(`Invalid Module source '${text}'`); + } + return text; + } + static empty() { + return new DeclarationReference(); + } + static package(packageName, importPath) { + return new DeclarationReference(ModuleSource.fromPackage(packageName, importPath)); + } + static module(path, userEscaped) { + return new DeclarationReference(new ModuleSource(path, userEscaped)); + } + static global() { + return new DeclarationReference(GlobalSource.instance); + } + static from(base) { + return base || this.empty(); + } + withSource(source) { + return this._source === source ? this : new DeclarationReference(source, this._navigation, this._symbol); + } + withNavigation(navigation) { + return this._navigation === navigation + ? this + : new DeclarationReference(this._source, navigation, this._symbol); + } + withSymbol(symbol) { + return this._symbol === symbol ? this : new DeclarationReference(this._source, this._navigation, symbol); + } + withComponentPath(componentPath) { + return this.withSymbol(this.symbol ? this.symbol.withComponentPath(componentPath) : new SymbolReference(componentPath)); + } + withMeaning(meaning) { + if (!this.symbol) { + if (meaning === undefined) { + return this; + } + return this.withSymbol(SymbolReference.empty().withMeaning(meaning)); + } + return this.withSymbol(this.symbol.withMeaning(meaning)); + } + withOverloadIndex(overloadIndex) { + if (!this.symbol) { + if (overloadIndex === undefined) { + return this; + } + return this.withSymbol(SymbolReference.empty().withOverloadIndex(overloadIndex)); + } + return this.withSymbol(this.symbol.withOverloadIndex(overloadIndex)); + } + addNavigationStep(navigation, component) { + if (this.symbol) { + return this.withSymbol(this.symbol.addNavigationStep(navigation, component)); + } + if (navigation === Navigation.Members) { + navigation = Navigation.Exports; + } + const symbol = new SymbolReference(new ComponentRoot(Component.from(component))); + return new DeclarationReference(this.source, navigation, symbol); + } + toString() { + const navigation = this._source instanceof ModuleSource && this._symbol && this.navigation === Navigation.Locals + ? '~' + : ''; + return `${this.source || ''}${navigation}${this.symbol || ''}`; + } +} +/** + * Indicates the symbol table from which to resolve the next symbol component. + * @beta + */ +export var Navigation; +(function (Navigation) { + Navigation["Exports"] = "."; + Navigation["Members"] = "#"; + Navigation["Locals"] = "~"; +})(Navigation || (Navigation = {})); +/** + * Represents a module. + * @beta + */ +export class ModuleSource { + constructor(path, userEscaped = true) { + this.escapedPath = + this instanceof ParsedModuleSource ? path : escapeModuleSourceIfNeeded(path, userEscaped); + } + get path() { + return this._path || (this._path = DeclarationReference.unescapeModuleSourceString(this.escapedPath)); + } + get packageName() { + return this._getOrParsePathComponents().packageName; + } + get scopeName() { + const scopeName = this._getOrParsePathComponents().scopeName; + return scopeName ? '@' + scopeName : ''; + } + get unscopedPackageName() { + return this._getOrParsePathComponents().unscopedPackageName; + } + get importPath() { + return this._getOrParsePathComponents().importPath || ''; + } + static fromScopedPackage(scopeName, unscopedPackageName, importPath) { + let packageName = unscopedPackageName; + if (scopeName) { + if (scopeName.charAt(0) === '@') { + scopeName = scopeName.slice(1); + } + packageName = `@${scopeName}/${unscopedPackageName}`; + } + const parsed = { packageName, scopeName: scopeName || '', unscopedPackageName }; + return this._fromPackageName(parsed, packageName, importPath); + } + static fromPackage(packageName, importPath) { + return this._fromPackageName(parsePackageName(packageName), packageName, importPath); + } + static _fromPackageName(parsed, packageName, importPath) { + if (!parsed) { + throw new Error('Parsed package must be provided.'); + } + const packageNameError = StringChecks.explainIfInvalidPackageName(packageName); + if (packageNameError) { + throw new SyntaxError(`Invalid NPM package name: ${packageNameError}`); + } + let path = packageName; + if (importPath) { + if (invalidImportPathRegExp.test(importPath)) { + throw new SyntaxError(`Invalid import path '${importPath}`); + } + path += '/' + importPath; + parsed.importPath = importPath; + } + const source = new ModuleSource(path); + source._pathComponents = parsed; + return source; + } + toString() { + return `${this.escapedPath}!`; + } + _getOrParsePathComponents() { + if (!this._pathComponents) { + const path = this.path; + const parsed = parsePackageName(path); + if (parsed && !StringChecks.explainIfInvalidPackageName(parsed.packageName)) { + this._pathComponents = parsed; + } + else { + this._pathComponents = { + packageName: '', + scopeName: '', + unscopedPackageName: '', + importPath: path + }; + } + } + return this._pathComponents; + } +} +class ParsedModuleSource extends ModuleSource { +} +// matches the following: +// 'foo' -> ["foo", "foo", undefined, "foo", undefined] +// 'foo/bar' -> ["foo/bar", "foo", undefined, "foo", "bar"] +// '@scope/foo' -> ["@scope/foo", "@scope/foo", "scope", "foo", undefined] +// '@scope/foo/bar' -> ["@scope/foo/bar", "@scope/foo", "scope", "foo", "bar"] +// does not match: +// '/' +// '@/' +// '@scope/' +// capture groups: +// 1. The package name (including scope) +// 2. The scope name (excluding the leading '@') +// 3. The unscoped package name +// 4. The package-relative import path +const packageNameRegExp = /^((?:@([^/]+?)\/)?([^/]+?))(?:\/(.+))?$/; +// no leading './' or '.\' +// no leading '../' or '..\' +// no leading '/' or '\' +// not '.' or '..' +const invalidImportPathRegExp = /^(\.\.?([\\/]|$)|[\\/])/; +// eslint-disable-next-line @rushstack/no-new-null +function parsePackageName(text) { + const match = packageNameRegExp.exec(text); + if (!match) { + return match; + } + const [, packageName = '', scopeName = '', unscopedPackageName = '', importPath] = match; + return { packageName, scopeName, unscopedPackageName, importPath }; +} +/** + * Represents the global scope. + * @beta + */ +export class GlobalSource { + constructor() { } + toString() { + return '!'; + } +} +GlobalSource.instance = new GlobalSource(); +/** + * @beta + */ +// eslint-disable-next-line @typescript-eslint/no-namespace,@typescript-eslint/no-redeclare +export var Component; +(function (Component) { + function from(value) { + if (typeof value === 'string') { + return new ComponentString(value); + } + if (value instanceof DeclarationReference) { + return new ComponentReference(value); + } + return value; + } + Component.from = from; +})(Component || (Component = {})); +/** + * @beta + */ +export class ComponentString { + constructor(text, userEscaped) { + this.text = this instanceof ParsedComponentString ? text : escapeComponentIfNeeded(text, userEscaped); + } + toString() { + return this.text; + } +} +class ParsedComponentString extends ComponentString { +} +/** + * @beta + */ +export class ComponentReference { + constructor(reference) { + this.reference = reference; + } + static parse(text) { + if (text.length > 2 && text.charAt(0) === '[' && text.charAt(text.length - 1) === ']') { + return new ComponentReference(DeclarationReference.parse(text.slice(1, -1))); + } + throw new SyntaxError(`Invalid component reference: '${text}'`); + } + withReference(reference) { + return this.reference === reference ? this : new ComponentReference(reference); + } + toString() { + return `[${this.reference}]`; + } +} +/** + * @beta + */ +export class ComponentPathBase { + constructor(component) { + this.component = component; + } + addNavigationStep(navigation, component) { + // tslint:disable-next-line:no-use-before-declare + return new ComponentNavigation(this, navigation, Component.from(component)); + } +} +/** + * @beta + */ +export class ComponentRoot extends ComponentPathBase { + withComponent(component) { + return this.component === component ? this : new ComponentRoot(Component.from(component)); + } + toString() { + return this.component.toString(); + } +} +/** + * @beta + */ +export class ComponentNavigation extends ComponentPathBase { + constructor(parent, navigation, component) { + super(component); + this.parent = parent; + this.navigation = navigation; + } + withParent(parent) { + return this.parent === parent ? this : new ComponentNavigation(parent, this.navigation, this.component); + } + withNavigation(navigation) { + return this.navigation === navigation + ? this + : new ComponentNavigation(this.parent, navigation, this.component); + } + withComponent(component) { + return this.component === component + ? this + : new ComponentNavigation(this.parent, this.navigation, Component.from(component)); + } + toString() { + return `${this.parent}${formatNavigation(this.navigation)}${this.component}`; + } +} +/** + * @beta + */ +export var Meaning; +(function (Meaning) { + Meaning["Class"] = "class"; + Meaning["Interface"] = "interface"; + Meaning["TypeAlias"] = "type"; + Meaning["Enum"] = "enum"; + Meaning["Namespace"] = "namespace"; + Meaning["Function"] = "function"; + Meaning["Variable"] = "var"; + Meaning["Constructor"] = "constructor"; + Meaning["Member"] = "member"; + Meaning["Event"] = "event"; + Meaning["CallSignature"] = "call"; + Meaning["ConstructSignature"] = "new"; + Meaning["IndexSignature"] = "index"; + Meaning["ComplexType"] = "complex"; // Any complex type +})(Meaning || (Meaning = {})); +/** + * Represents a reference to a TypeScript symbol. + * @beta + */ +export class SymbolReference { + constructor(component, { meaning, overloadIndex } = {}) { + this.componentPath = component; + this.overloadIndex = overloadIndex; + this.meaning = meaning; + } + static empty() { + return new SymbolReference(/*component*/ undefined); + } + withComponentPath(componentPath) { + return this.componentPath === componentPath + ? this + : new SymbolReference(componentPath, { + meaning: this.meaning, + overloadIndex: this.overloadIndex + }); + } + withMeaning(meaning) { + return this.meaning === meaning + ? this + : new SymbolReference(this.componentPath, { + meaning, + overloadIndex: this.overloadIndex + }); + } + withOverloadIndex(overloadIndex) { + return this.overloadIndex === overloadIndex + ? this + : new SymbolReference(this.componentPath, { + meaning: this.meaning, + overloadIndex + }); + } + addNavigationStep(navigation, component) { + if (!this.componentPath) { + throw new Error('Cannot add a navigation step to an empty symbol reference.'); + } + return new SymbolReference(this.componentPath.addNavigationStep(navigation, component)); + } + toString() { + let result = `${this.componentPath || ''}`; + if (this.meaning && this.overloadIndex !== undefined) { + result += `:${this.meaning}(${this.overloadIndex})`; + } + else if (this.meaning) { + result += `:${this.meaning}`; + } + else if (this.overloadIndex !== undefined) { + result += `:${this.overloadIndex}`; + } + return result; + } +} +var Token; +(function (Token) { + Token[Token["None"] = 0] = "None"; + Token[Token["EofToken"] = 1] = "EofToken"; + // Punctuator + Token[Token["OpenBraceToken"] = 2] = "OpenBraceToken"; + Token[Token["CloseBraceToken"] = 3] = "CloseBraceToken"; + Token[Token["OpenParenToken"] = 4] = "OpenParenToken"; + Token[Token["CloseParenToken"] = 5] = "CloseParenToken"; + Token[Token["OpenBracketToken"] = 6] = "OpenBracketToken"; + Token[Token["CloseBracketToken"] = 7] = "CloseBracketToken"; + Token[Token["ExclamationToken"] = 8] = "ExclamationToken"; + Token[Token["DotToken"] = 9] = "DotToken"; + Token[Token["HashToken"] = 10] = "HashToken"; + Token[Token["TildeToken"] = 11] = "TildeToken"; + Token[Token["ColonToken"] = 12] = "ColonToken"; + Token[Token["CommaToken"] = 13] = "CommaToken"; + Token[Token["AtToken"] = 14] = "AtToken"; + Token[Token["DecimalDigits"] = 15] = "DecimalDigits"; + Token[Token["String"] = 16] = "String"; + Token[Token["Text"] = 17] = "Text"; + // eslint-disable-next-line @typescript-eslint/no-shadow + Token[Token["ModuleSource"] = 18] = "ModuleSource"; + // Keywords + Token[Token["ClassKeyword"] = 19] = "ClassKeyword"; + Token[Token["InterfaceKeyword"] = 20] = "InterfaceKeyword"; + Token[Token["TypeKeyword"] = 21] = "TypeKeyword"; + Token[Token["EnumKeyword"] = 22] = "EnumKeyword"; + Token[Token["NamespaceKeyword"] = 23] = "NamespaceKeyword"; + Token[Token["FunctionKeyword"] = 24] = "FunctionKeyword"; + Token[Token["VarKeyword"] = 25] = "VarKeyword"; + Token[Token["ConstructorKeyword"] = 26] = "ConstructorKeyword"; + Token[Token["MemberKeyword"] = 27] = "MemberKeyword"; + Token[Token["EventKeyword"] = 28] = "EventKeyword"; + Token[Token["CallKeyword"] = 29] = "CallKeyword"; + Token[Token["NewKeyword"] = 30] = "NewKeyword"; + Token[Token["IndexKeyword"] = 31] = "IndexKeyword"; + Token[Token["ComplexKeyword"] = 32] = "ComplexKeyword"; // 'complex' +})(Token || (Token = {})); +function tokenToString(token) { + switch (token) { + case Token.OpenBraceToken: + return '{'; + case Token.CloseBraceToken: + return '}'; + case Token.OpenParenToken: + return '('; + case Token.CloseParenToken: + return ')'; + case Token.OpenBracketToken: + return '['; + case Token.CloseBracketToken: + return ']'; + case Token.ExclamationToken: + return '!'; + case Token.DotToken: + return '.'; + case Token.HashToken: + return '#'; + case Token.TildeToken: + return '~'; + case Token.ColonToken: + return ':'; + case Token.CommaToken: + return ','; + case Token.AtToken: + return '@'; + case Token.ClassKeyword: + return 'class'; + case Token.InterfaceKeyword: + return 'interface'; + case Token.TypeKeyword: + return 'type'; + case Token.EnumKeyword: + return 'enum'; + case Token.NamespaceKeyword: + return 'namespace'; + case Token.FunctionKeyword: + return 'function'; + case Token.VarKeyword: + return 'var'; + case Token.ConstructorKeyword: + return 'constructor'; + case Token.MemberKeyword: + return 'member'; + case Token.EventKeyword: + return 'event'; + case Token.CallKeyword: + return 'call'; + case Token.NewKeyword: + return 'new'; + case Token.IndexKeyword: + return 'index'; + case Token.ComplexKeyword: + return 'complex'; + case Token.None: + return ''; + case Token.EofToken: + return ''; + case Token.DecimalDigits: + return ''; + case Token.String: + return ''; + case Token.Text: + return ''; + case Token.ModuleSource: + return ''; + } +} +class Scanner { + constructor(text) { + this._pos = 0; + this._tokenPos = 0; + this._stringIsUnterminated = false; + this._token = Token.None; + this._text = text; + } + get stringIsUnterminated() { + return this._stringIsUnterminated; + } + get text() { + return this._text; + } + get tokenText() { + return this._text.slice(this._tokenPos, this._pos); + } + get eof() { + return this._pos >= this._text.length; + } + token() { + return this._token; + } + speculate(cb) { + const tokenPos = this._tokenPos; + const pos = this._pos; + const text = this._text; + const token = this._token; + const stringIsUnterminated = this._stringIsUnterminated; + let accepted = false; + try { + const accept = () => { + accepted = true; + }; + return cb(accept); + } + finally { + if (!accepted) { + this._tokenPos = tokenPos; + this._pos = pos; + this._text = text; + this._token = token; + this._stringIsUnterminated = stringIsUnterminated; + } + } + } + scan() { + if (!this.eof) { + this._tokenPos = this._pos; + this._stringIsUnterminated = false; + while (!this.eof) { + const ch = this._text.charAt(this._pos++); + switch (ch) { + case '{': + return (this._token = Token.OpenBraceToken); + case '}': + return (this._token = Token.CloseBraceToken); + case '(': + return (this._token = Token.OpenParenToken); + case ')': + return (this._token = Token.CloseParenToken); + case '[': + return (this._token = Token.OpenBracketToken); + case ']': + return (this._token = Token.CloseBracketToken); + case '!': + return (this._token = Token.ExclamationToken); + case '.': + return (this._token = Token.DotToken); + case '#': + return (this._token = Token.HashToken); + case '~': + return (this._token = Token.TildeToken); + case ':': + return (this._token = Token.ColonToken); + case ',': + return (this._token = Token.CommaToken); + case '@': + return (this._token = Token.AtToken); + case '"': + this.scanString(); + return (this._token = Token.String); + default: + this.scanText(); + return (this._token = Token.Text); + } + } + } + return (this._token = Token.EofToken); + } + rescanModuleSource() { + switch (this._token) { + case Token.ModuleSource: + case Token.ExclamationToken: + case Token.EofToken: + return this._token; + } + return this.speculate((accept) => { + if (!this.eof) { + this._pos = this._tokenPos; + this._stringIsUnterminated = false; + let scanned = 'none'; + while (!this.eof) { + const ch = this._text[this._pos]; + if (ch === '!') { + if (scanned === 'none') { + return this._token; + } + accept(); + return (this._token = Token.ModuleSource); + } + this._pos++; + if (ch === '"') { + if (scanned === 'other') { + // strings not allowed after scanning any other characters + return this._token; + } + scanned = 'string'; + this.scanString(); + } + else { + if (scanned === 'string') { + // no other tokens allowed after string + return this._token; + } + scanned = 'other'; + if (!isPunctuator(ch)) { + this.scanText(); + } + } + } + } + return this._token; + }); + } + rescanMeaning() { + if (this._token === Token.Text) { + const tokenText = this.tokenText; + switch (tokenText) { + case 'class': + return (this._token = Token.ClassKeyword); + case 'interface': + return (this._token = Token.InterfaceKeyword); + case 'type': + return (this._token = Token.TypeKeyword); + case 'enum': + return (this._token = Token.EnumKeyword); + case 'namespace': + return (this._token = Token.NamespaceKeyword); + case 'function': + return (this._token = Token.FunctionKeyword); + case 'var': + return (this._token = Token.VarKeyword); + case 'constructor': + return (this._token = Token.ConstructorKeyword); + case 'member': + return (this._token = Token.MemberKeyword); + case 'event': + return (this._token = Token.EventKeyword); + case 'call': + return (this._token = Token.CallKeyword); + case 'new': + return (this._token = Token.NewKeyword); + case 'index': + return (this._token = Token.IndexKeyword); + case 'complex': + return (this._token = Token.ComplexKeyword); + } + } + return this._token; + } + rescanDecimalDigits() { + if (this._token === Token.Text) { + const tokenText = this.tokenText; + if (/^\d+$/.test(tokenText)) { + return (this._token = Token.DecimalDigits); + } + } + return this._token; + } + scanString() { + while (!this.eof) { + const ch = this._text.charAt(this._pos++); + switch (ch) { + case '"': + return; + case '\\': + this.scanEscapeSequence(); + break; + default: + if (isLineTerminator(ch)) { + this._stringIsUnterminated = true; + return; + } + } + } + this._stringIsUnterminated = true; + } + scanEscapeSequence() { + if (this.eof) { + this._stringIsUnterminated = true; + return; + } + const ch = this._text.charAt(this._pos); + // EscapeSequence:: CharacterEscapeSequence + if (isCharacterEscapeSequence(ch)) { + this._pos++; + return; + } + // EscapeSequence:: `0` [lookahead != DecimalDigit] + if (ch === '0' && + (this._pos + 1 === this._text.length || !isDecimalDigit(this._text.charAt(this._pos + 1)))) { + this._pos++; + return; + } + // EscapeSequence:: HexEscapeSequence + if (ch === 'x' && + this._pos + 3 <= this._text.length && + isHexDigit(this._text.charAt(this._pos + 1)) && + isHexDigit(this._text.charAt(this._pos + 2))) { + this._pos += 3; + return; + } + // EscapeSequence:: UnicodeEscapeSequence + // UnicodeEscapeSequence:: `u` Hex4Digits + if (ch === 'u' && + this._pos + 5 <= this._text.length && + isHexDigit(this._text.charAt(this._pos + 1)) && + isHexDigit(this._text.charAt(this._pos + 2)) && + isHexDigit(this._text.charAt(this._pos + 3)) && + isHexDigit(this._text.charAt(this._pos + 4))) { + this._pos += 5; + return; + } + // EscapeSequence:: UnicodeEscapeSequence + // UnicodeEscapeSequence:: `u` `{` CodePoint `}` + if (ch === 'u' && this._pos + 4 <= this._text.length && this._text.charAt(this._pos + 1) === '{') { + let hexDigits = this._text.charAt(this._pos + 2); + if (isHexDigit(hexDigits)) { + for (let i = this._pos + 3; i < this._text.length; i++) { + const ch2 = this._text.charAt(i); + if (ch2 === '}') { + const mv = parseInt(hexDigits, 16); + if (mv <= 0x10ffff) { + this._pos = i + 1; + return; + } + break; + } + if (!isHexDigit(ch2)) { + hexDigits += ch2; + break; + } + } + } + } + this._stringIsUnterminated = true; + } + scanText() { + while (this._pos < this._text.length) { + const ch = this._text.charAt(this._pos); + if (isPunctuator(ch) || ch === '"') { + return; + } + this._pos++; + } + } +} +class Parser { + constructor(text) { + this._errors = []; + this._scanner = new Scanner(text); + this._scanner.scan(); + } + get eof() { + return this.token() === Token.EofToken; + } + get errors() { + return this._errors; + } + parseDeclarationReference() { + let source; + let navigation; + let symbol; + if (this.optionalToken(Token.ExclamationToken)) { + // Reference to global symbol + source = GlobalSource.instance; + } + else if (this._scanner.rescanModuleSource() === Token.ModuleSource) { + source = this.parseModuleSource(); + // Check for optional `~` navigation token. + if (this.optionalToken(Token.TildeToken)) { + navigation = Navigation.Locals; + } + } + if (this.isStartOfComponent()) { + symbol = this.parseSymbol(); + } + else if (this.token() === Token.ColonToken) { + symbol = this.parseSymbolRest(new ComponentRoot(new ComponentString('', /*userEscaped*/ true))); + } + return new DeclarationReference(source, navigation, symbol); + } + parseModuleSourceString() { + this._scanner.rescanModuleSource(); + return this.parseTokenString(Token.ModuleSource, 'Module source'); + } + parseComponentString() { + switch (this._scanner.token()) { + case Token.String: + return this.parseString(); + default: + return this.parseComponentCharacters(); + } + } + token() { + return this._scanner.token(); + } + parseModuleSource() { + const source = this.parseModuleSourceString(); + this.expectToken(Token.ExclamationToken); + return new ParsedModuleSource(source, /*userEscaped*/ true); + } + parseSymbol() { + const component = this.parseComponentRest(this.parseRootComponent()); + return this.parseSymbolRest(component); + } + parseSymbolRest(component) { + let meaning; + let overloadIndex; + if (this.optionalToken(Token.ColonToken)) { + meaning = this.tryParseMeaning(); + overloadIndex = this.tryParseOverloadIndex(!!meaning); + } + return new SymbolReference(component, { meaning, overloadIndex }); + } + parseRootComponent() { + if (!this.isStartOfComponent()) { + return this.fail('Component expected', new ComponentRoot(new ComponentString('', /*userEscaped*/ true))); + } + const component = this.parseComponent(); + return new ComponentRoot(component); + } + parseComponentRest(component) { + for (;;) { + switch (this.token()) { + case Token.DotToken: + case Token.HashToken: + case Token.TildeToken: + const navigation = this.parseNavigation(); + const right = this.parseComponent(); + component = new ComponentNavigation(component, navigation, right); + break; + default: + return component; + } + } + } + parseNavigation() { + switch (this._scanner.token()) { + case Token.DotToken: { + this._scanner.scan(); + return Navigation.Exports; + } + case Token.HashToken: { + this._scanner.scan(); + return Navigation.Members; + } + case Token.TildeToken: { + this._scanner.scan(); + return Navigation.Locals; + } + default: { + return this.fail("Expected '.', '#', or '~'", Navigation.Exports); + } + } + } + tryParseMeaning() { + switch (this._scanner.rescanMeaning()) { + case Token.ClassKeyword: { + this._scanner.scan(); + return Meaning.Class; + } + case Token.InterfaceKeyword: { + this._scanner.scan(); + return Meaning.Interface; + } + case Token.TypeKeyword: { + this._scanner.scan(); + return Meaning.TypeAlias; + } + case Token.EnumKeyword: { + this._scanner.scan(); + return Meaning.Enum; + } + case Token.NamespaceKeyword: { + this._scanner.scan(); + return Meaning.Namespace; + } + case Token.FunctionKeyword: { + this._scanner.scan(); + return Meaning.Function; + } + case Token.VarKeyword: { + this._scanner.scan(); + return Meaning.Variable; + } + case Token.ConstructorKeyword: { + this._scanner.scan(); + return Meaning.Constructor; + } + case Token.MemberKeyword: { + this._scanner.scan(); + return Meaning.Member; + } + case Token.EventKeyword: { + this._scanner.scan(); + return Meaning.Event; + } + case Token.CallKeyword: { + this._scanner.scan(); + return Meaning.CallSignature; + } + case Token.NewKeyword: { + this._scanner.scan(); + return Meaning.ConstructSignature; + } + case Token.IndexKeyword: { + this._scanner.scan(); + return Meaning.IndexSignature; + } + case Token.ComplexKeyword: { + this._scanner.scan(); + return Meaning.ComplexType; + } + } + } + tryParseOverloadIndex(hasMeaning) { + if (this.optionalToken(Token.OpenParenToken)) { + const overloadIndex = this.parseDecimalDigits(); + this.expectToken(Token.CloseParenToken); + return overloadIndex; + } + else if (!hasMeaning) { + return this.parseDecimalDigits(); + } + return undefined; + } + parseDecimalDigits() { + switch (this._scanner.rescanDecimalDigits()) { + case Token.DecimalDigits: + const value = +this._scanner.tokenText; + this._scanner.scan(); + return value; + default: + return this.fail('Decimal digit expected', 0); + } + } + isStartOfComponent() { + switch (this.token()) { + case Token.Text: + case Token.String: + case Token.OpenBracketToken: + return true; + default: + return false; + } + } + parseComponentCharacters() { + let text = ''; + for (;;) { + switch (this._scanner.token()) { + case Token.Text: + text += this.parseText(); + break; + default: + return text; + } + } + } + parseTokenString(token, tokenString) { + if (this._scanner.token() === token) { + const text = this._scanner.tokenText; + const stringIsUnterminated = this._scanner.stringIsUnterminated; + this._scanner.scan(); + if (stringIsUnterminated) { + return this.fail(`${tokenString || tokenToString(token)} is unterminated`, text); + } + return text; + } + return this.fail(`${tokenString || tokenToString(token)} expected`, ''); + } + parseText() { + return this.parseTokenString(Token.Text, 'Text'); + } + parseString() { + return this.parseTokenString(Token.String, 'String'); + } + parseComponent() { + switch (this._scanner.token()) { + case Token.OpenBracketToken: + return this.parseBracketedComponent(); + default: + return new ParsedComponentString(this.parseComponentString(), /*userEscaped*/ true); + } + } + parseBracketedComponent() { + this.expectToken(Token.OpenBracketToken); + const reference = this.parseDeclarationReference(); + this.expectToken(Token.CloseBracketToken); + return new ComponentReference(reference); + } + optionalToken(token) { + if (this._scanner.token() === token) { + this._scanner.scan(); + return true; + } + return false; + } + expectToken(token, message) { + if (this._scanner.token() !== token) { + const expected = tokenToString(token); + const actual = tokenToString(this._scanner.token()); + return this.fail(message || `Expected token '${expected}', received '${actual}' instead.`, undefined); + } + this._scanner.scan(); + } + fail(message, fallback) { + this._errors.push(message); + return fallback; + } +} +function formatNavigation(navigation) { + switch (navigation) { + case Navigation.Exports: + return '.'; + case Navigation.Members: + return '#'; + case Navigation.Locals: + return '~'; + default: + return ''; + } +} +function isCharacterEscapeSequence(ch) { + return isSingleEscapeCharacter(ch) || isNonEscapeCharacter(ch); +} +function isSingleEscapeCharacter(ch) { + switch (ch) { + case "'": + case '"': + case '\\': + case 'b': + case 'f': + case 'n': + case 'r': + case 't': + case 'v': + return true; + default: + return false; + } +} +function isNonEscapeCharacter(ch) { + return !isEscapeCharacter(ch) && !isLineTerminator(ch); +} +function isEscapeCharacter(ch) { + switch (ch) { + case 'x': + case 'u': + return true; + default: + return isSingleEscapeCharacter(ch) || isDecimalDigit(ch); + } +} +function isLineTerminator(ch) { + switch (ch) { + case '\r': + case '\n': + // TODO: , + return true; + default: + return false; + } +} +function isDecimalDigit(ch) { + switch (ch) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return true; + default: + return false; + } +} +function isHexDigit(ch) { + switch (ch) { + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + return true; + default: + return isDecimalDigit(ch); + } +} +function isPunctuator(ch) { + switch (ch) { + case '{': + case '}': + case '(': + case ')': + case '[': + case ']': + case '!': + case '.': + case '#': + case '~': + case ':': + case ',': + case '@': + return true; + default: + return false; + } +} +function escapeComponentIfNeeded(text, userEscaped) { + if (userEscaped) { + if (!DeclarationReference.isWellFormedComponentString(text)) { + throw new SyntaxError(`Invalid Component '${text}'`); + } + return text; + } + return DeclarationReference.escapeComponentString(text); +} +function escapeModuleSourceIfNeeded(text, userEscaped) { + if (userEscaped) { + if (!DeclarationReference.isWellFormedModuleSourceString(text)) { + throw new SyntaxError(`Invalid Module source '${text}'`); + } + return text; + } + return DeclarationReference.escapeModuleSourceString(text); +} +//# sourceMappingURL=DeclarationReference.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js.map b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js.map new file mode 100644 index 0000000000000000000000000000000000000000..1bcaf9554c80ba2e328df1ac2e494125c91c54d8 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DeclarationReference.js","sourceRoot":"","sources":["../../src/beta/DeclarationReference.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,4DAA4D;AAC5D,yDAAyD;AAEzD,yFAAyF;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAK/B,YACE,MAAoC,EACpC,UAAmD,EACnD,MAAwB;QAExB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAW,UAAU;QACnB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,KAAK,YAAY,CAAC,QAAQ,EAAE,CAAC;YAC3C,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,OAAO,UAAU,CAAC,OAAO,CAAC;QAC5B,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAW,OAAO;QA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IT license.\r\n// See LICENSE in the project root for license information.\r\n\r\n/* eslint-disable @typescript-eslint/no-use-before-define */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n// NOTE: See DeclarationReference.grammarkdown for information on the underlying grammar.\r\n\r\nimport { StringChecks } from '../parser/StringChecks';\r\n\r\n/**\r\n * Represents a reference to a declaration.\r\n * @beta\r\n */\r\nexport class DeclarationReference {\r\n private _source: ModuleSource | GlobalSource | undefined;\r\n private _navigation: Navigation.Locals | Navigation.Exports | undefined;\r\n private _symbol: SymbolReference | undefined;\r\n\r\n public constructor(\r\n source?: ModuleSource | GlobalSource,\r\n navigation?: Navigation.Locals | Navigation.Exports,\r\n symbol?: SymbolReference\r\n ) {\r\n this._source = source;\r\n this._navigation = navigation;\r\n this._symbol = symbol;\r\n }\r\n\r\n public get source(): ModuleSource | GlobalSource | undefined {\r\n return this._source;\r\n }\r\n\r\n public get navigation(): Navigation.Locals | Navigation.Exports | undefined {\r\n if (!this._source || !this._symbol) {\r\n return undefined;\r\n }\r\n if (this._source === GlobalSource.instance) {\r\n return Navigation.Locals;\r\n }\r\n if (this._navigation === undefined) {\r\n return Navigation.Exports;\r\n }\r\n return this._navigation;\r\n }\r\n\r\n public get symbol(): SymbolReference | undefined {\r\n return this._symbol;\r\n }\r\n\r\n public get isEmpty(): boolean {\r\n return this.source === undefined && this.symbol === undefined;\r\n }\r\n\r\n public static parse(text: string): DeclarationReference {\r\n const parser: Parser = new Parser(text);\r\n const reference: DeclarationReference = parser.parseDeclarationReference();\r\n if (parser.errors.length) {\r\n throw new SyntaxError(`Invalid DeclarationReference '${text}':\\n ${parser.errors.join('\\n ')}`);\r\n }\r\n if (!parser.eof) {\r\n throw new SyntaxError(`Invalid DeclarationReference '${text}'`);\r\n }\r\n return reference;\r\n }\r\n\r\n public static parseComponent(text: string): Component {\r\n if (text[0] === '[') {\r\n return ComponentReference.parse(text);\r\n } else {\r\n return new ComponentString(text, true);\r\n }\r\n }\r\n\r\n /**\r\n * Determines whether the provided string is a well-formed symbol navigation component string.\r\n */\r\n public static isWellFormedComponentString(text: string): boolean {\r\n const scanner: Scanner = new Scanner(text);\r\n return scanner.scan() === Token.String\r\n ? scanner.scan() === Token.EofToken\r\n : scanner.token() === Token.Text\r\n ? scanner.scan() === Token.EofToken\r\n : scanner.token() === Token.EofToken;\r\n }\r\n\r\n /**\r\n * Escapes a string for use as a symbol navigation component. If the string contains any of `!.#~:,\"{}()@` or starts\r\n * with `[`, it is enclosed in quotes.\r\n */\r\n public static escapeComponentString(text: string): string {\r\n if (text.length === 0) {\r\n return '\"\"';\r\n }\r\n const ch: string = text.charAt(0);\r\n if (ch === '[' || ch === '\"' || !this.isWellFormedComponentString(text)) {\r\n return JSON.stringify(text);\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Unescapes a string used as a symbol navigation component.\r\n */\r\n public static unescapeComponentString(text: string): string {\r\n if (text.length >= 2 && text.charAt(0) === '\"' && text.charAt(text.length - 1) === '\"') {\r\n try {\r\n return JSON.parse(text);\r\n } catch {\r\n throw new SyntaxError(`Invalid Component '${text}'`);\r\n }\r\n }\r\n if (!this.isWellFormedComponentString(text)) {\r\n throw new SyntaxError(`Invalid Component '${text}'`);\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Determines whether the provided string is a well-formed module source string. The string may not\r\n * have a trailing `!` character.\r\n */\r\n public static isWellFormedModuleSourceString(text: string): boolean {\r\n const scanner: Scanner = new Scanner(text + '!');\r\n return (\r\n scanner.rescanModuleSource() === Token.ModuleSource &&\r\n !scanner.stringIsUnterminated &&\r\n scanner.scan() === Token.ExclamationToken &&\r\n scanner.scan() === Token.EofToken\r\n );\r\n }\r\n\r\n /**\r\n * Escapes a string for use as a module source. If the string contains any of `!\"` it is enclosed in quotes.\r\n */\r\n public static escapeModuleSourceString(text: string): string {\r\n if (text.length === 0) {\r\n return '\"\"';\r\n }\r\n const ch: string = text.charAt(0);\r\n if (ch === '\"' || !this.isWellFormedModuleSourceString(text)) {\r\n return JSON.stringify(text);\r\n }\r\n return text;\r\n }\r\n\r\n /**\r\n * Unescapes a string used as a module source. The string may not have a trailing `!` character.\r\n */\r\n public static unescapeModuleSourceString(text: string): string {\r\n if (text.length >= 2 && text.charAt(0) === '\"' && text.charAt(text.length - 1) === '\"') {\r\n try {\r\n return JSON.parse(text);\r\n } catch {\r\n throw new SyntaxError(`Invalid Module source '${text}'`);\r\n }\r\n }\r\n if (!this.isWellFormedModuleSourceString(text)) {\r\n throw new SyntaxError(`Invalid Module source '${text}'`);\r\n }\r\n return text;\r\n }\r\n\r\n public static empty(): DeclarationReference {\r\n return new DeclarationReference();\r\n }\r\n\r\n public static package(packageName: string, importPath?: string): DeclarationReference {\r\n return new DeclarationReference(ModuleSource.fromPackage(packageName, importPath));\r\n }\r\n\r\n public static module(path: string, userEscaped?: boolean): DeclarationReference {\r\n return new DeclarationReference(new ModuleSource(path, userEscaped));\r\n }\r\n\r\n public static global(): DeclarationReference {\r\n return new DeclarationReference(GlobalSource.instance);\r\n }\r\n\r\n public static from(base: DeclarationReference | undefined): DeclarationReference {\r\n return base || this.empty();\r\n }\r\n\r\n public withSource(source: ModuleSource | GlobalSource | undefined): DeclarationReference {\r\n return this._source === source ? this : new DeclarationReference(source, this._navigation, this._symbol);\r\n }\r\n\r\n public withNavigation(\r\n navigation: Navigation.Locals | Navigation.Exports | undefined\r\n ): DeclarationReference {\r\n return this._navigation === navigation\r\n ? this\r\n : new DeclarationReference(this._source, navigation, this._symbol);\r\n }\r\n\r\n public withSymbol(symbol: SymbolReference | undefined): DeclarationReference {\r\n return this._symbol === symbol ? this : new DeclarationReference(this._source, this._navigation, symbol);\r\n }\r\n\r\n public withComponentPath(componentPath: ComponentPath): DeclarationReference {\r\n return this.withSymbol(\r\n this.symbol ? this.symbol.withComponentPath(componentPath) : new SymbolReference(componentPath)\r\n );\r\n }\r\n\r\n public withMeaning(meaning: Meaning | undefined): DeclarationReference {\r\n if (!this.symbol) {\r\n if (meaning === undefined) {\r\n return this;\r\n }\r\n return this.withSymbol(SymbolReference.empty().withMeaning(meaning));\r\n }\r\n return this.withSymbol(this.symbol.withMeaning(meaning));\r\n }\r\n\r\n public withOverloadIndex(overloadIndex: number | undefined): DeclarationReference {\r\n if (!this.symbol) {\r\n if (overloadIndex === undefined) {\r\n return this;\r\n }\r\n return this.withSymbol(SymbolReference.empty().withOverloadIndex(overloadIndex));\r\n }\r\n return this.withSymbol(this.symbol.withOverloadIndex(overloadIndex));\r\n }\r\n\r\n public addNavigationStep(navigation: Navigation, component: ComponentLike): DeclarationReference {\r\n if (this.symbol) {\r\n return this.withSymbol(this.symbol.addNavigationStep(navigation, component));\r\n }\r\n if (navigation === Navigation.Members) {\r\n navigation = Navigation.Exports;\r\n }\r\n const symbol: SymbolReference = new SymbolReference(new ComponentRoot(Component.from(component)));\r\n return new DeclarationReference(this.source, navigation, symbol);\r\n }\r\n\r\n public toString(): string {\r\n const navigation: string =\r\n this._source instanceof ModuleSource && this._symbol && this.navigation === Navigation.Locals\r\n ? '~'\r\n : '';\r\n return `${this.source || ''}${navigation}${this.symbol || ''}`;\r\n }\r\n}\r\n\r\n/**\r\n * Indicates the symbol table from which to resolve the next symbol component.\r\n * @beta\r\n */\r\nexport enum Navigation {\r\n Exports = '.',\r\n Members = '#',\r\n Locals = '~'\r\n}\r\n\r\n/**\r\n * Represents a module.\r\n * @beta\r\n */\r\nexport class ModuleSource {\r\n public readonly escapedPath: string;\r\n private _path: string | undefined;\r\n\r\n private _pathComponents: IParsedPackage | undefined;\r\n\r\n public constructor(path: string, userEscaped: boolean = true) {\r\n this.escapedPath =\r\n this instanceof ParsedModuleSource ? path : escapeModuleSourceIfNeeded(path, userEscaped);\r\n }\r\n\r\n public get path(): string {\r\n return this._path || (this._path = DeclarationReference.unescapeModuleSourceString(this.escapedPath));\r\n }\r\n\r\n public get packageName(): string {\r\n return this._getOrParsePathComponents().packageName;\r\n }\r\n\r\n public get scopeName(): string {\r\n const scopeName: string = this._getOrParsePathComponents().scopeName;\r\n return scopeName ? '@' + scopeName : '';\r\n }\r\n\r\n public get unscopedPackageName(): string {\r\n return this._getOrParsePathComponents().unscopedPackageName;\r\n }\r\n\r\n public get importPath(): string {\r\n return this._getOrParsePathComponents().importPath || '';\r\n }\r\n\r\n public static fromScopedPackage(\r\n scopeName: string | undefined,\r\n unscopedPackageName: string,\r\n importPath?: string\r\n ): ModuleSource {\r\n let packageName: string = unscopedPackageName;\r\n if (scopeName) {\r\n if (scopeName.charAt(0) === '@') {\r\n scopeName = scopeName.slice(1);\r\n }\r\n packageName = `@${scopeName}/${unscopedPackageName}`;\r\n }\r\n\r\n const parsed: IParsedPackage = { packageName, scopeName: scopeName || '', unscopedPackageName };\r\n return this._fromPackageName(parsed, packageName, importPath);\r\n }\r\n\r\n public static fromPackage(packageName: string, importPath?: string): ModuleSource {\r\n return this._fromPackageName(parsePackageName(packageName), packageName, importPath);\r\n }\r\n\r\n private static _fromPackageName(\r\n parsed: IParsedPackage | null,\r\n packageName: string,\r\n importPath?: string\r\n ): ModuleSource {\r\n if (!parsed) {\r\n throw new Error('Parsed package must be provided.');\r\n }\r\n\r\n const packageNameError: string | undefined = StringChecks.explainIfInvalidPackageName(packageName);\r\n if (packageNameError) {\r\n throw new SyntaxError(`Invalid NPM package name: ${packageNameError}`);\r\n }\r\n\r\n let path: string = packageName;\r\n if (importPath) {\r\n if (invalidImportPathRegExp.test(importPath)) {\r\n throw new SyntaxError(`Invalid import path '${importPath}`);\r\n }\r\n path += '/' + importPath;\r\n parsed.importPath = importPath;\r\n }\r\n\r\n const source: ModuleSource = new ModuleSource(path);\r\n source._pathComponents = parsed;\r\n return source;\r\n }\r\n\r\n public toString(): string {\r\n return `${this.escapedPath}!`;\r\n }\r\n\r\n private _getOrParsePathComponents(): IParsedPackage {\r\n if (!this._pathComponents) {\r\n const path: string = this.path;\r\n const parsed: IParsedPackage | null = parsePackageName(path);\r\n if (parsed && !StringChecks.explainIfInvalidPackageName(parsed.packageName)) {\r\n this._pathComponents = parsed;\r\n } else {\r\n this._pathComponents = {\r\n packageName: '',\r\n scopeName: '',\r\n unscopedPackageName: '',\r\n importPath: path\r\n };\r\n }\r\n }\r\n return this._pathComponents;\r\n }\r\n}\r\n\r\nclass ParsedModuleSource extends ModuleSource {}\r\n\r\n// matches the following:\r\n// 'foo' -> [\"foo\", \"foo\", undefined, \"foo\", undefined]\r\n// 'foo/bar' -> [\"foo/bar\", \"foo\", undefined, \"foo\", \"bar\"]\r\n// '@scope/foo' -> [\"@scope/foo\", \"@scope/foo\", \"scope\", \"foo\", undefined]\r\n// '@scope/foo/bar' -> [\"@scope/foo/bar\", \"@scope/foo\", \"scope\", \"foo\", \"bar\"]\r\n// does not match:\r\n// '/'\r\n// '@/'\r\n// '@scope/'\r\n// capture groups:\r\n// 1. The package name (including scope)\r\n// 2. The scope name (excluding the leading '@')\r\n// 3. The unscoped package name\r\n// 4. The package-relative import path\r\nconst packageNameRegExp: RegExp = /^((?:@([^/]+?)\\/)?([^/]+?))(?:\\/(.+))?$/;\r\n\r\n// no leading './' or '.\\'\r\n// no leading '../' or '..\\'\r\n// no leading '/' or '\\'\r\n// not '.' or '..'\r\nconst invalidImportPathRegExp: RegExp = /^(\\.\\.?([\\\\/]|$)|[\\\\/])/;\r\n\r\ninterface IParsedPackage {\r\n packageName: string;\r\n scopeName: string;\r\n unscopedPackageName: string;\r\n importPath?: string;\r\n}\r\n\r\n// eslint-disable-next-line @rushstack/no-new-null\r\nfunction parsePackageName(text: string): IParsedPackage | null {\r\n const match: RegExpExecArray | null = packageNameRegExp.exec(text);\r\n if (!match) {\r\n return match;\r\n }\r\n const [, packageName = '', scopeName = '', unscopedPackageName = '', importPath]: RegExpExecArray = match;\r\n return { packageName, scopeName, unscopedPackageName, importPath };\r\n}\r\n\r\n/**\r\n * Represents the global scope.\r\n * @beta\r\n */\r\nexport class GlobalSource {\r\n public static readonly instance: GlobalSource = new GlobalSource();\r\n\r\n private constructor() {}\r\n\r\n public toString(): string {\r\n return '!';\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport type Component = ComponentString | ComponentReference;\r\n\r\n/**\r\n * @beta\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-namespace,@typescript-eslint/no-redeclare\r\nexport namespace Component {\r\n export function from(value: ComponentLike): Component {\r\n if (typeof value === 'string') {\r\n return new ComponentString(value);\r\n }\r\n if (value instanceof DeclarationReference) {\r\n return new ComponentReference(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport type ComponentLike = Component | DeclarationReference | string;\r\n\r\n/**\r\n * @beta\r\n */\r\nexport class ComponentString {\r\n public readonly text: string;\r\n\r\n public constructor(text: string, userEscaped?: boolean) {\r\n this.text = this instanceof ParsedComponentString ? text : escapeComponentIfNeeded(text, userEscaped);\r\n }\r\n\r\n public toString(): string {\r\n return this.text;\r\n }\r\n}\r\n\r\nclass ParsedComponentString extends ComponentString {}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport class ComponentReference {\r\n public readonly reference: DeclarationReference;\r\n\r\n public constructor(reference: DeclarationReference) {\r\n this.reference = reference;\r\n }\r\n\r\n public static parse(text: string): ComponentReference {\r\n if (text.length > 2 && text.charAt(0) === '[' && text.charAt(text.length - 1) === ']') {\r\n return new ComponentReference(DeclarationReference.parse(text.slice(1, -1)));\r\n }\r\n throw new SyntaxError(`Invalid component reference: '${text}'`);\r\n }\r\n\r\n public withReference(reference: DeclarationReference): ComponentReference {\r\n return this.reference === reference ? this : new ComponentReference(reference);\r\n }\r\n\r\n public toString(): string {\r\n return `[${this.reference}]`;\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport type ComponentPath = ComponentRoot | ComponentNavigation;\r\n\r\n/**\r\n * @beta\r\n */\r\nexport abstract class ComponentPathBase {\r\n public readonly component: Component;\r\n\r\n public constructor(component: Component) {\r\n this.component = component;\r\n }\r\n\r\n public addNavigationStep(\r\n this: ComponentPath,\r\n navigation: Navigation,\r\n component: ComponentLike\r\n ): ComponentPath {\r\n // tslint:disable-next-line:no-use-before-declare\r\n return new ComponentNavigation(this, navigation, Component.from(component));\r\n }\r\n\r\n public abstract toString(): string;\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport class ComponentRoot extends ComponentPathBase {\r\n public withComponent(component: ComponentLike): ComponentRoot {\r\n return this.component === component ? this : new ComponentRoot(Component.from(component));\r\n }\r\n\r\n public toString(): string {\r\n return this.component.toString();\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport class ComponentNavigation extends ComponentPathBase {\r\n public readonly parent: ComponentPath;\r\n public readonly navigation: Navigation;\r\n\r\n public constructor(parent: ComponentPath, navigation: Navigation, component: Component) {\r\n super(component);\r\n this.parent = parent;\r\n this.navigation = navigation;\r\n }\r\n\r\n public withParent(parent: ComponentPath): ComponentNavigation {\r\n return this.parent === parent ? this : new ComponentNavigation(parent, this.navigation, this.component);\r\n }\r\n\r\n public withNavigation(navigation: Navigation): ComponentNavigation {\r\n return this.navigation === navigation\r\n ? this\r\n : new ComponentNavigation(this.parent, navigation, this.component);\r\n }\r\n\r\n public withComponent(component: ComponentLike): ComponentNavigation {\r\n return this.component === component\r\n ? this\r\n : new ComponentNavigation(this.parent, this.navigation, Component.from(component));\r\n }\r\n\r\n public toString(): string {\r\n return `${this.parent}${formatNavigation(this.navigation)}${this.component}`;\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport enum Meaning {\r\n Class = 'class', // SymbolFlags.Class\r\n Interface = 'interface', // SymbolFlags.Interface\r\n TypeAlias = 'type', // SymbolFlags.TypeAlias\r\n Enum = 'enum', // SymbolFlags.Enum\r\n Namespace = 'namespace', // SymbolFlags.Module\r\n Function = 'function', // SymbolFlags.Function\r\n Variable = 'var', // SymbolFlags.Variable\r\n Constructor = 'constructor', // SymbolFlags.Constructor\r\n Member = 'member', // SymbolFlags.ClassMember | SymbolFlags.EnumMember\r\n Event = 'event', //\r\n CallSignature = 'call', // SymbolFlags.Signature (for __call)\r\n ConstructSignature = 'new', // SymbolFlags.Signature (for __new)\r\n IndexSignature = 'index', // SymbolFlags.Signature (for __index)\r\n ComplexType = 'complex' // Any complex type\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport interface ISymbolReferenceOptions {\r\n meaning?: Meaning;\r\n overloadIndex?: number;\r\n}\r\n\r\n/**\r\n * Represents a reference to a TypeScript symbol.\r\n * @beta\r\n */\r\nexport class SymbolReference {\r\n public readonly componentPath: ComponentPath | undefined;\r\n public readonly meaning: Meaning | undefined;\r\n public readonly overloadIndex: number | undefined;\r\n\r\n public constructor(\r\n component: ComponentPath | undefined,\r\n { meaning, overloadIndex }: ISymbolReferenceOptions = {}\r\n ) {\r\n this.componentPath = component;\r\n this.overloadIndex = overloadIndex;\r\n this.meaning = meaning;\r\n }\r\n\r\n public static empty(): SymbolReference {\r\n return new SymbolReference(/*component*/ undefined);\r\n }\r\n\r\n public withComponentPath(componentPath: ComponentPath | undefined): SymbolReference {\r\n return this.componentPath === componentPath\r\n ? this\r\n : new SymbolReference(componentPath, {\r\n meaning: this.meaning,\r\n overloadIndex: this.overloadIndex\r\n });\r\n }\r\n\r\n public withMeaning(meaning: Meaning | undefined): SymbolReference {\r\n return this.meaning === meaning\r\n ? this\r\n : new SymbolReference(this.componentPath, {\r\n meaning,\r\n overloadIndex: this.overloadIndex\r\n });\r\n }\r\n\r\n public withOverloadIndex(overloadIndex: number | undefined): SymbolReference {\r\n return this.overloadIndex === overloadIndex\r\n ? this\r\n : new SymbolReference(this.componentPath, {\r\n meaning: this.meaning,\r\n overloadIndex\r\n });\r\n }\r\n\r\n public addNavigationStep(navigation: Navigation, component: ComponentLike): SymbolReference {\r\n if (!this.componentPath) {\r\n throw new Error('Cannot add a navigation step to an empty symbol reference.');\r\n }\r\n return new SymbolReference(this.componentPath.addNavigationStep(navigation, component));\r\n }\r\n\r\n public toString(): string {\r\n let result: string = `${this.componentPath || ''}`;\r\n if (this.meaning && this.overloadIndex !== undefined) {\r\n result += `:${this.meaning}(${this.overloadIndex})`;\r\n } else if (this.meaning) {\r\n result += `:${this.meaning}`;\r\n } else if (this.overloadIndex !== undefined) {\r\n result += `:${this.overloadIndex}`;\r\n }\r\n return result;\r\n }\r\n}\r\n\r\nconst enum Token {\r\n None,\r\n EofToken,\r\n // Punctuator\r\n OpenBraceToken, // '{'\r\n CloseBraceToken, // '}'\r\n OpenParenToken, // '('\r\n CloseParenToken, // ')'\r\n OpenBracketToken, // '['\r\n CloseBracketToken, // ']'\r\n ExclamationToken, // '!'\r\n DotToken, // '.'\r\n HashToken, // '#'\r\n TildeToken, // '~'\r\n ColonToken, // ':'\r\n CommaToken, // ','\r\n AtToken, // '@'\r\n DecimalDigits, // '12345'\r\n String, // '\"abc\"'\r\n Text, // 'abc'\r\n // eslint-disable-next-line @typescript-eslint/no-shadow\r\n ModuleSource, // 'abc/def!' (excludes '!')\r\n // Keywords\r\n ClassKeyword, // 'class'\r\n InterfaceKeyword, // 'interface'\r\n TypeKeyword, // 'type'\r\n EnumKeyword, // 'enum'\r\n NamespaceKeyword, // 'namespace'\r\n FunctionKeyword, // 'function'\r\n VarKeyword, // 'var'\r\n ConstructorKeyword, // 'constructor'\r\n MemberKeyword, // 'member'\r\n EventKeyword, // 'event'\r\n CallKeyword, // 'call'\r\n NewKeyword, // 'new'\r\n IndexKeyword, // 'index'\r\n ComplexKeyword // 'complex'\r\n}\r\n\r\nfunction tokenToString(token: Token): string {\r\n switch (token) {\r\n case Token.OpenBraceToken:\r\n return '{';\r\n case Token.CloseBraceToken:\r\n return '}';\r\n case Token.OpenParenToken:\r\n return '(';\r\n case Token.CloseParenToken:\r\n return ')';\r\n case Token.OpenBracketToken:\r\n return '[';\r\n case Token.CloseBracketToken:\r\n return ']';\r\n case Token.ExclamationToken:\r\n return '!';\r\n case Token.DotToken:\r\n return '.';\r\n case Token.HashToken:\r\n return '#';\r\n case Token.TildeToken:\r\n return '~';\r\n case Token.ColonToken:\r\n return ':';\r\n case Token.CommaToken:\r\n return ',';\r\n case Token.AtToken:\r\n return '@';\r\n case Token.ClassKeyword:\r\n return 'class';\r\n case Token.InterfaceKeyword:\r\n return 'interface';\r\n case Token.TypeKeyword:\r\n return 'type';\r\n case Token.EnumKeyword:\r\n return 'enum';\r\n case Token.NamespaceKeyword:\r\n return 'namespace';\r\n case Token.FunctionKeyword:\r\n return 'function';\r\n case Token.VarKeyword:\r\n return 'var';\r\n case Token.ConstructorKeyword:\r\n return 'constructor';\r\n case Token.MemberKeyword:\r\n return 'member';\r\n case Token.EventKeyword:\r\n return 'event';\r\n case Token.CallKeyword:\r\n return 'call';\r\n case Token.NewKeyword:\r\n return 'new';\r\n case Token.IndexKeyword:\r\n return 'index';\r\n case Token.ComplexKeyword:\r\n return 'complex';\r\n case Token.None:\r\n return '';\r\n case Token.EofToken:\r\n return '';\r\n case Token.DecimalDigits:\r\n return '';\r\n case Token.String:\r\n return '';\r\n case Token.Text:\r\n return '';\r\n case Token.ModuleSource:\r\n return '';\r\n }\r\n}\r\n\r\nclass Scanner {\r\n private _tokenPos: number;\r\n private _pos: number;\r\n private _text: string;\r\n private _token: Token;\r\n private _stringIsUnterminated: boolean;\r\n\r\n public constructor(text: string) {\r\n this._pos = 0;\r\n this._tokenPos = 0;\r\n this._stringIsUnterminated = false;\r\n this._token = Token.None;\r\n this._text = text;\r\n }\r\n\r\n public get stringIsUnterminated(): boolean {\r\n return this._stringIsUnterminated;\r\n }\r\n\r\n public get text(): string {\r\n return this._text;\r\n }\r\n\r\n public get tokenText(): string {\r\n return this._text.slice(this._tokenPos, this._pos);\r\n }\r\n\r\n public get eof(): boolean {\r\n return this._pos >= this._text.length;\r\n }\r\n\r\n public token(): Token {\r\n return this._token;\r\n }\r\n\r\n public speculate(cb: (accept: () => void) => T): T {\r\n const tokenPos: number = this._tokenPos;\r\n const pos: number = this._pos;\r\n const text: string = this._text;\r\n const token: Token = this._token;\r\n const stringIsUnterminated: boolean = this._stringIsUnterminated;\r\n let accepted: boolean = false;\r\n try {\r\n const accept: () => void = () => {\r\n accepted = true;\r\n };\r\n return cb(accept);\r\n } finally {\r\n if (!accepted) {\r\n this._tokenPos = tokenPos;\r\n this._pos = pos;\r\n this._text = text;\r\n this._token = token;\r\n this._stringIsUnterminated = stringIsUnterminated;\r\n }\r\n }\r\n }\r\n\r\n public scan(): Token {\r\n if (!this.eof) {\r\n this._tokenPos = this._pos;\r\n this._stringIsUnterminated = false;\r\n while (!this.eof) {\r\n const ch: string = this._text.charAt(this._pos++);\r\n switch (ch) {\r\n case '{':\r\n return (this._token = Token.OpenBraceToken);\r\n case '}':\r\n return (this._token = Token.CloseBraceToken);\r\n case '(':\r\n return (this._token = Token.OpenParenToken);\r\n case ')':\r\n return (this._token = Token.CloseParenToken);\r\n case '[':\r\n return (this._token = Token.OpenBracketToken);\r\n case ']':\r\n return (this._token = Token.CloseBracketToken);\r\n case '!':\r\n return (this._token = Token.ExclamationToken);\r\n case '.':\r\n return (this._token = Token.DotToken);\r\n case '#':\r\n return (this._token = Token.HashToken);\r\n case '~':\r\n return (this._token = Token.TildeToken);\r\n case ':':\r\n return (this._token = Token.ColonToken);\r\n case ',':\r\n return (this._token = Token.CommaToken);\r\n case '@':\r\n return (this._token = Token.AtToken);\r\n case '\"':\r\n this.scanString();\r\n return (this._token = Token.String);\r\n default:\r\n this.scanText();\r\n return (this._token = Token.Text);\r\n }\r\n }\r\n }\r\n return (this._token = Token.EofToken);\r\n }\r\n\r\n public rescanModuleSource(): Token {\r\n switch (this._token) {\r\n case Token.ModuleSource:\r\n case Token.ExclamationToken:\r\n case Token.EofToken:\r\n return this._token;\r\n }\r\n return this.speculate((accept) => {\r\n if (!this.eof) {\r\n this._pos = this._tokenPos;\r\n this._stringIsUnterminated = false;\r\n let scanned: 'string' | 'other' | 'none' = 'none';\r\n while (!this.eof) {\r\n const ch: string = this._text[this._pos];\r\n if (ch === '!') {\r\n if (scanned === 'none') {\r\n return this._token;\r\n }\r\n accept();\r\n return (this._token = Token.ModuleSource);\r\n }\r\n this._pos++;\r\n if (ch === '\"') {\r\n if (scanned === 'other') {\r\n // strings not allowed after scanning any other characters\r\n return this._token;\r\n }\r\n scanned = 'string';\r\n this.scanString();\r\n } else {\r\n if (scanned === 'string') {\r\n // no other tokens allowed after string\r\n return this._token;\r\n }\r\n scanned = 'other';\r\n if (!isPunctuator(ch)) {\r\n this.scanText();\r\n }\r\n }\r\n }\r\n }\r\n return this._token;\r\n });\r\n }\r\n\r\n public rescanMeaning(): Token {\r\n if (this._token === Token.Text) {\r\n const tokenText: string = this.tokenText;\r\n switch (tokenText) {\r\n case 'class':\r\n return (this._token = Token.ClassKeyword);\r\n case 'interface':\r\n return (this._token = Token.InterfaceKeyword);\r\n case 'type':\r\n return (this._token = Token.TypeKeyword);\r\n case 'enum':\r\n return (this._token = Token.EnumKeyword);\r\n case 'namespace':\r\n return (this._token = Token.NamespaceKeyword);\r\n case 'function':\r\n return (this._token = Token.FunctionKeyword);\r\n case 'var':\r\n return (this._token = Token.VarKeyword);\r\n case 'constructor':\r\n return (this._token = Token.ConstructorKeyword);\r\n case 'member':\r\n return (this._token = Token.MemberKeyword);\r\n case 'event':\r\n return (this._token = Token.EventKeyword);\r\n case 'call':\r\n return (this._token = Token.CallKeyword);\r\n case 'new':\r\n return (this._token = Token.NewKeyword);\r\n case 'index':\r\n return (this._token = Token.IndexKeyword);\r\n case 'complex':\r\n return (this._token = Token.ComplexKeyword);\r\n }\r\n }\r\n return this._token;\r\n }\r\n\r\n public rescanDecimalDigits(): Token {\r\n if (this._token === Token.Text) {\r\n const tokenText: string = this.tokenText;\r\n if (/^\\d+$/.test(tokenText)) {\r\n return (this._token = Token.DecimalDigits);\r\n }\r\n }\r\n return this._token;\r\n }\r\n\r\n private scanString(): void {\r\n while (!this.eof) {\r\n const ch: string = this._text.charAt(this._pos++);\r\n switch (ch) {\r\n case '\"':\r\n return;\r\n case '\\\\':\r\n this.scanEscapeSequence();\r\n break;\r\n default:\r\n if (isLineTerminator(ch)) {\r\n this._stringIsUnterminated = true;\r\n return;\r\n }\r\n }\r\n }\r\n this._stringIsUnterminated = true;\r\n }\r\n\r\n private scanEscapeSequence(): void {\r\n if (this.eof) {\r\n this._stringIsUnterminated = true;\r\n return;\r\n }\r\n\r\n const ch: string = this._text.charAt(this._pos);\r\n\r\n // EscapeSequence:: CharacterEscapeSequence\r\n if (isCharacterEscapeSequence(ch)) {\r\n this._pos++;\r\n return;\r\n }\r\n\r\n // EscapeSequence:: `0` [lookahead != DecimalDigit]\r\n if (\r\n ch === '0' &&\r\n (this._pos + 1 === this._text.length || !isDecimalDigit(this._text.charAt(this._pos + 1)))\r\n ) {\r\n this._pos++;\r\n return;\r\n }\r\n\r\n // EscapeSequence:: HexEscapeSequence\r\n if (\r\n ch === 'x' &&\r\n this._pos + 3 <= this._text.length &&\r\n isHexDigit(this._text.charAt(this._pos + 1)) &&\r\n isHexDigit(this._text.charAt(this._pos + 2))\r\n ) {\r\n this._pos += 3;\r\n return;\r\n }\r\n\r\n // EscapeSequence:: UnicodeEscapeSequence\r\n // UnicodeEscapeSequence:: `u` Hex4Digits\r\n if (\r\n ch === 'u' &&\r\n this._pos + 5 <= this._text.length &&\r\n isHexDigit(this._text.charAt(this._pos + 1)) &&\r\n isHexDigit(this._text.charAt(this._pos + 2)) &&\r\n isHexDigit(this._text.charAt(this._pos + 3)) &&\r\n isHexDigit(this._text.charAt(this._pos + 4))\r\n ) {\r\n this._pos += 5;\r\n return;\r\n }\r\n\r\n // EscapeSequence:: UnicodeEscapeSequence\r\n // UnicodeEscapeSequence:: `u` `{` CodePoint `}`\r\n if (ch === 'u' && this._pos + 4 <= this._text.length && this._text.charAt(this._pos + 1) === '{') {\r\n let hexDigits: string = this._text.charAt(this._pos + 2);\r\n if (isHexDigit(hexDigits)) {\r\n for (let i: number = this._pos + 3; i < this._text.length; i++) {\r\n const ch2: string = this._text.charAt(i);\r\n if (ch2 === '}') {\r\n const mv: number = parseInt(hexDigits, 16);\r\n if (mv <= 0x10ffff) {\r\n this._pos = i + 1;\r\n return;\r\n }\r\n break;\r\n }\r\n if (!isHexDigit(ch2)) {\r\n hexDigits += ch2;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n this._stringIsUnterminated = true;\r\n }\r\n\r\n private scanText(): void {\r\n while (this._pos < this._text.length) {\r\n const ch: string = this._text.charAt(this._pos);\r\n if (isPunctuator(ch) || ch === '\"') {\r\n return;\r\n }\r\n this._pos++;\r\n }\r\n }\r\n}\r\n\r\nclass Parser {\r\n private _errors: string[];\r\n private _scanner: Scanner;\r\n\r\n public constructor(text: string) {\r\n this._errors = [];\r\n this._scanner = new Scanner(text);\r\n this._scanner.scan();\r\n }\r\n\r\n public get eof(): boolean {\r\n return this.token() === Token.EofToken;\r\n }\r\n\r\n public get errors(): readonly string[] {\r\n return this._errors;\r\n }\r\n\r\n public parseDeclarationReference(): DeclarationReference {\r\n let source: ModuleSource | GlobalSource | undefined;\r\n let navigation: Navigation.Locals | undefined;\r\n let symbol: SymbolReference | undefined;\r\n if (this.optionalToken(Token.ExclamationToken)) {\r\n // Reference to global symbol\r\n source = GlobalSource.instance;\r\n } else if (this._scanner.rescanModuleSource() === Token.ModuleSource) {\r\n source = this.parseModuleSource();\r\n // Check for optional `~` navigation token.\r\n if (this.optionalToken(Token.TildeToken)) {\r\n navigation = Navigation.Locals;\r\n }\r\n }\r\n if (this.isStartOfComponent()) {\r\n symbol = this.parseSymbol();\r\n } else if (this.token() === Token.ColonToken) {\r\n symbol = this.parseSymbolRest(new ComponentRoot(new ComponentString('', /*userEscaped*/ true)));\r\n }\r\n return new DeclarationReference(source, navigation, symbol);\r\n }\r\n\r\n public parseModuleSourceString(): string {\r\n this._scanner.rescanModuleSource();\r\n return this.parseTokenString(Token.ModuleSource, 'Module source');\r\n }\r\n\r\n public parseComponentString(): string {\r\n switch (this._scanner.token()) {\r\n case Token.String:\r\n return this.parseString();\r\n default:\r\n return this.parseComponentCharacters();\r\n }\r\n }\r\n\r\n private token(): Token {\r\n return this._scanner.token();\r\n }\r\n\r\n private parseModuleSource(): ModuleSource | undefined {\r\n const source: string = this.parseModuleSourceString();\r\n this.expectToken(Token.ExclamationToken);\r\n return new ParsedModuleSource(source, /*userEscaped*/ true);\r\n }\r\n\r\n private parseSymbol(): SymbolReference {\r\n const component: ComponentPath = this.parseComponentRest(this.parseRootComponent());\r\n return this.parseSymbolRest(component);\r\n }\r\n\r\n private parseSymbolRest(component: ComponentPath): SymbolReference {\r\n let meaning: Meaning | undefined;\r\n let overloadIndex: number | undefined;\r\n if (this.optionalToken(Token.ColonToken)) {\r\n meaning = this.tryParseMeaning();\r\n overloadIndex = this.tryParseOverloadIndex(!!meaning);\r\n }\r\n\r\n return new SymbolReference(component, { meaning, overloadIndex });\r\n }\r\n\r\n private parseRootComponent(): ComponentPath {\r\n if (!this.isStartOfComponent()) {\r\n return this.fail(\r\n 'Component expected',\r\n new ComponentRoot(new ComponentString('', /*userEscaped*/ true))\r\n );\r\n }\r\n\r\n const component: Component = this.parseComponent();\r\n return new ComponentRoot(component);\r\n }\r\n\r\n private parseComponentRest(component: ComponentPath): ComponentPath {\r\n for (;;) {\r\n switch (this.token()) {\r\n case Token.DotToken:\r\n case Token.HashToken:\r\n case Token.TildeToken:\r\n const navigation: Navigation = this.parseNavigation();\r\n const right: Component = this.parseComponent();\r\n component = new ComponentNavigation(component, navigation, right);\r\n break;\r\n default:\r\n return component;\r\n }\r\n }\r\n }\r\n\r\n private parseNavigation(): Navigation {\r\n switch (this._scanner.token()) {\r\n case Token.DotToken: {\r\n this._scanner.scan();\r\n return Navigation.Exports;\r\n }\r\n\r\n case Token.HashToken: {\r\n this._scanner.scan();\r\n return Navigation.Members;\r\n }\r\n\r\n case Token.TildeToken: {\r\n this._scanner.scan();\r\n return Navigation.Locals;\r\n }\r\n\r\n default: {\r\n return this.fail(\"Expected '.', '#', or '~'\", Navigation.Exports);\r\n }\r\n }\r\n }\r\n\r\n private tryParseMeaning(): Meaning | undefined {\r\n switch (this._scanner.rescanMeaning()) {\r\n case Token.ClassKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Class;\r\n }\r\n\r\n case Token.InterfaceKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Interface;\r\n }\r\n\r\n case Token.TypeKeyword: {\r\n this._scanner.scan();\r\n return Meaning.TypeAlias;\r\n }\r\n\r\n case Token.EnumKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Enum;\r\n }\r\n\r\n case Token.NamespaceKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Namespace;\r\n }\r\n\r\n case Token.FunctionKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Function;\r\n }\r\n\r\n case Token.VarKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Variable;\r\n }\r\n\r\n case Token.ConstructorKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Constructor;\r\n }\r\n\r\n case Token.MemberKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Member;\r\n }\r\n\r\n case Token.EventKeyword: {\r\n this._scanner.scan();\r\n return Meaning.Event;\r\n }\r\n\r\n case Token.CallKeyword: {\r\n this._scanner.scan();\r\n return Meaning.CallSignature;\r\n }\r\n\r\n case Token.NewKeyword: {\r\n this._scanner.scan();\r\n return Meaning.ConstructSignature;\r\n }\r\n\r\n case Token.IndexKeyword: {\r\n this._scanner.scan();\r\n return Meaning.IndexSignature;\r\n }\r\n\r\n case Token.ComplexKeyword: {\r\n this._scanner.scan();\r\n return Meaning.ComplexType;\r\n }\r\n }\r\n }\r\n\r\n private tryParseOverloadIndex(hasMeaning: boolean): number | undefined {\r\n if (this.optionalToken(Token.OpenParenToken)) {\r\n const overloadIndex: number = this.parseDecimalDigits();\r\n this.expectToken(Token.CloseParenToken);\r\n return overloadIndex;\r\n } else if (!hasMeaning) {\r\n return this.parseDecimalDigits();\r\n }\r\n return undefined;\r\n }\r\n\r\n private parseDecimalDigits(): number {\r\n switch (this._scanner.rescanDecimalDigits()) {\r\n case Token.DecimalDigits:\r\n const value: number = +this._scanner.tokenText;\r\n this._scanner.scan();\r\n return value;\r\n default:\r\n return this.fail('Decimal digit expected', 0);\r\n }\r\n }\r\n\r\n private isStartOfComponent(): boolean {\r\n switch (this.token()) {\r\n case Token.Text:\r\n case Token.String:\r\n case Token.OpenBracketToken:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private parseComponentCharacters(): string {\r\n let text: string = '';\r\n for (;;) {\r\n switch (this._scanner.token()) {\r\n case Token.Text:\r\n text += this.parseText();\r\n break;\r\n default:\r\n return text;\r\n }\r\n }\r\n }\r\n\r\n private parseTokenString(token: Token, tokenString?: string): string {\r\n if (this._scanner.token() === token) {\r\n const text: string = this._scanner.tokenText;\r\n const stringIsUnterminated: boolean = this._scanner.stringIsUnterminated;\r\n this._scanner.scan();\r\n if (stringIsUnterminated) {\r\n return this.fail(`${tokenString || tokenToString(token)} is unterminated`, text);\r\n }\r\n return text;\r\n }\r\n return this.fail(`${tokenString || tokenToString(token)} expected`, '');\r\n }\r\n\r\n private parseText(): string {\r\n return this.parseTokenString(Token.Text, 'Text');\r\n }\r\n\r\n private parseString(): string {\r\n return this.parseTokenString(Token.String, 'String');\r\n }\r\n\r\n private parseComponent(): Component {\r\n switch (this._scanner.token()) {\r\n case Token.OpenBracketToken:\r\n return this.parseBracketedComponent();\r\n default:\r\n return new ParsedComponentString(this.parseComponentString(), /*userEscaped*/ true);\r\n }\r\n }\r\n\r\n private parseBracketedComponent(): ComponentReference {\r\n this.expectToken(Token.OpenBracketToken);\r\n const reference: DeclarationReference = this.parseDeclarationReference();\r\n this.expectToken(Token.CloseBracketToken);\r\n return new ComponentReference(reference);\r\n }\r\n\r\n private optionalToken(token: Token): boolean {\r\n if (this._scanner.token() === token) {\r\n this._scanner.scan();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n private expectToken(token: Token, message?: string): void {\r\n if (this._scanner.token() !== token) {\r\n const expected: string = tokenToString(token);\r\n const actual: string = tokenToString(this._scanner.token());\r\n return this.fail(message || `Expected token '${expected}', received '${actual}' instead.`, undefined);\r\n }\r\n this._scanner.scan();\r\n }\r\n\r\n private fail(message: string, fallback: T): T {\r\n this._errors.push(message);\r\n return fallback;\r\n }\r\n}\r\n\r\nfunction formatNavigation(navigation: Navigation | undefined): string {\r\n switch (navigation) {\r\n case Navigation.Exports:\r\n return '.';\r\n case Navigation.Members:\r\n return '#';\r\n case Navigation.Locals:\r\n return '~';\r\n default:\r\n return '';\r\n }\r\n}\r\n\r\nfunction isCharacterEscapeSequence(ch: string): boolean {\r\n return isSingleEscapeCharacter(ch) || isNonEscapeCharacter(ch);\r\n}\r\n\r\nfunction isSingleEscapeCharacter(ch: string): boolean {\r\n switch (ch) {\r\n case \"'\":\r\n case '\"':\r\n case '\\\\':\r\n case 'b':\r\n case 'f':\r\n case 'n':\r\n case 'r':\r\n case 't':\r\n case 'v':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isNonEscapeCharacter(ch: string): boolean {\r\n return !isEscapeCharacter(ch) && !isLineTerminator(ch);\r\n}\r\n\r\nfunction isEscapeCharacter(ch: string): boolean {\r\n switch (ch) {\r\n case 'x':\r\n case 'u':\r\n return true;\r\n default:\r\n return isSingleEscapeCharacter(ch) || isDecimalDigit(ch);\r\n }\r\n}\r\n\r\nfunction isLineTerminator(ch: string): boolean {\r\n switch (ch) {\r\n case '\\r':\r\n case '\\n':\r\n // TODO: , \r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isDecimalDigit(ch: string): boolean {\r\n switch (ch) {\r\n case '0':\r\n case '1':\r\n case '2':\r\n case '3':\r\n case '4':\r\n case '5':\r\n case '6':\r\n case '7':\r\n case '8':\r\n case '9':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction isHexDigit(ch: string): boolean {\r\n switch (ch) {\r\n case 'a':\r\n case 'b':\r\n case 'c':\r\n case 'd':\r\n case 'e':\r\n case 'f':\r\n case 'A':\r\n case 'B':\r\n case 'C':\r\n case 'D':\r\n case 'E':\r\n case 'F':\r\n return true;\r\n default:\r\n return isDecimalDigit(ch);\r\n }\r\n}\r\n\r\nfunction isPunctuator(ch: string): boolean {\r\n switch (ch) {\r\n case '{':\r\n case '}':\r\n case '(':\r\n case ')':\r\n case '[':\r\n case ']':\r\n case '!':\r\n case '.':\r\n case '#':\r\n case '~':\r\n case ':':\r\n case ',':\r\n case '@':\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nfunction escapeComponentIfNeeded(text: string, userEscaped?: boolean): string {\r\n if (userEscaped) {\r\n if (!DeclarationReference.isWellFormedComponentString(text)) {\r\n throw new SyntaxError(`Invalid Component '${text}'`);\r\n }\r\n return text;\r\n }\r\n return DeclarationReference.escapeComponentString(text);\r\n}\r\n\r\nfunction escapeModuleSourceIfNeeded(text: string, userEscaped?: boolean): string {\r\n if (userEscaped) {\r\n if (!DeclarationReference.isWellFormedModuleSourceString(text)) {\r\n throw new SyntaxError(`Invalid Module source '${text}'`);\r\n }\r\n return text;\r\n }\r\n return DeclarationReference.escapeModuleSourceString(text);\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fc13b93fe2934c475bb9b3da325d629c11d7e433 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts @@ -0,0 +1,44 @@ +import type { DocNode } from '../nodes/DocNode'; +export type DocNodeConstructor = new (...args: any[]) => DocNode; +export interface IDocNodeDefinition { + docNodeKind: string; + constructor: DocNodeConstructor; +} +/** + * Part of the {@link TSDocConfiguration} object. + * + * @remarks + * If you define your own custom subclasses of `DocNode`, they must be registered with the `DocNodeManager`. + * Use {@link DocNodeManager.registerAllowableChildren} to specify which {@link DocNodeContainer} subclasses + * are allowed to contain your nodes. + */ +export declare class DocNodeManager { + private static readonly _nodeKindRegExp; + private readonly _docNodeDefinitionsByKind; + private readonly _docNodeDefinitionsByConstructor; + /** + * Registers a list of {@link IDocNodeDefinition} objects to be used with the associated + * {@link TSDocConfiguration} object. + */ + registerDocNodes(packageName: string, definitions: ReadonlyArray): void; + /** + * Reports an error if the specified DocNode kind has not been registered. + */ + throwIfNotRegisteredKind(docNodeKind: string): void; + /** + * For the given parent DocNode kind, registers the specified DocNode kinds as being allowable children of + * the parent. + * + * @remarks + * To prevent mistakes, `DocNodeContainer` will report an error if you try to add node that was not registered + * as an allowable child of the container. + */ + registerAllowableChildren(parentKind: string, childKinds: ReadonlyArray): void; + /** + * Returns true if the specified DocNode kind has been registered as an allowable child of the specified + * parent DocNode kind. + */ + isAllowedChild(parentKind: string, childKind: string): boolean; + private _getDefinition; +} +//# sourceMappingURL=DocNodeManager.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts.map b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a263ab048611ce93784d571c045cc6cc9137c5bc --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocNodeManager.d.ts","sourceRoot":"","sources":["../../src/configuration/DocNodeManager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIhD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;AAEjE,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,kBAAkB,CAAC;CACjC;AASD;;;;;;;GAOG;AACH,qBAAa,cAAc;IAIzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAiC;IAExE,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAGtC;IACJ,OAAO,CAAC,QAAQ,CAAC,gCAAgC,CACa;IAE9D;;;OAGG;IACI,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI;IA6ClG;;OAEG;IACI,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAM1D;;;;;;;OAOG;IACI,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI;IAS7F;;;OAGG;IACI,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAKrE,OAAO,CAAC,cAAc;CAQvB"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js new file mode 100644 index 0000000000000000000000000000000000000000..905c8faabdcb056c361b52f065c683632bf64054 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { StringChecks } from '../parser/StringChecks'; +/** + * Part of the {@link TSDocConfiguration} object. + * + * @remarks + * If you define your own custom subclasses of `DocNode`, they must be registered with the `DocNodeManager`. + * Use {@link DocNodeManager.registerAllowableChildren} to specify which {@link DocNodeContainer} subclasses + * are allowed to contain your nodes. + */ +export class DocNodeManager { + constructor() { + this._docNodeDefinitionsByKind = new Map(); + this._docNodeDefinitionsByConstructor = new Map(); + } + /** + * Registers a list of {@link IDocNodeDefinition} objects to be used with the associated + * {@link TSDocConfiguration} object. + */ + registerDocNodes(packageName, definitions) { + const packageNameError = StringChecks.explainIfInvalidPackageName(packageName); + if (packageNameError) { + throw new Error('Invalid NPM package name: ' + packageNameError); + } + for (const definition of definitions) { + if (!DocNodeManager._nodeKindRegExp.test(definition.docNodeKind)) { + throw new Error(`The DocNode kind ${JSON.stringify(definition.docNodeKind)} is not a valid identifier.` + + ` It must start with an underscore or letter, and be comprised of letters, numbers, and underscores`); + } + let existingDefinition = this._docNodeDefinitionsByKind.get(definition.docNodeKind); + if (existingDefinition !== undefined) { + throw new Error(`The DocNode kind "${definition.docNodeKind}" was already registered` + + ` by ${existingDefinition.packageName}`); + } + existingDefinition = this._docNodeDefinitionsByConstructor.get(definition.constructor); + if (existingDefinition !== undefined) { + throw new Error(`This DocNode constructor was already registered by ${existingDefinition.packageName}` + + ` as ${existingDefinition.docNodeKind}`); + } + const newDefinition = { + docNodeKind: definition.docNodeKind, + constructor: definition.constructor, + packageName, + allowedChildKinds: new Set() + }; + this._docNodeDefinitionsByKind.set(definition.docNodeKind, newDefinition); + this._docNodeDefinitionsByConstructor.set(definition.constructor, newDefinition); + } + } + /** + * Reports an error if the specified DocNode kind has not been registered. + */ + throwIfNotRegisteredKind(docNodeKind) { + if (!this._docNodeDefinitionsByKind.has(docNodeKind)) { + throw new Error(`The DocNode kind "${docNodeKind}" was not registered with this TSDocConfiguration`); + } + } + /** + * For the given parent DocNode kind, registers the specified DocNode kinds as being allowable children of + * the parent. + * + * @remarks + * To prevent mistakes, `DocNodeContainer` will report an error if you try to add node that was not registered + * as an allowable child of the container. + */ + registerAllowableChildren(parentKind, childKinds) { + const parentDefinition = this._getDefinition(parentKind); + for (const childKind of childKinds) { + this._getDefinition(childKind); + parentDefinition.allowedChildKinds.add(childKind); + } + } + /** + * Returns true if the specified DocNode kind has been registered as an allowable child of the specified + * parent DocNode kind. + */ + isAllowedChild(parentKind, childKind) { + const parentDefinition = this._getDefinition(parentKind); + return parentDefinition.allowedChildKinds.has(childKind); + } + _getDefinition(docNodeKind) { + const definition = this._docNodeDefinitionsByKind.get(docNodeKind); + if (definition === undefined) { + throw new Error(`The DocNode kind "${docNodeKind}" was not registered with this TSDocConfiguration`); + } + return definition; + } +} +// Matches an ASCII TypeScript-style identifier. +// +// Example: "_myIdentifier99" +DocNodeManager._nodeKindRegExp = /^[_a-z][_a-z0-9]*$/i; +//# sourceMappingURL=DocNodeManager.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js.map b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js.map new file mode 100644 index 0000000000000000000000000000000000000000..afe2414acca2c9b0be01866d95481b827ba38ad1 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocNodeManager.js","sourceRoot":"","sources":["../../src/configuration/DocNodeManager.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAiBtD;;;;;;;GAOG;AACH,MAAM,OAAO,cAAc;IAA3B;QAMmB,8BAAyB,GAA8C,IAAI,GAAG,EAG5F,CAAC;QACa,qCAAgC,GAC/C,IAAI,GAAG,EAAoD,CAAC;IA8FhE,CAAC;IA5FC;;;OAGG;IACI,gBAAgB,CAAC,WAAmB,EAAE,WAA8C;QACzF,MAAM,gBAAgB,GAAuB,YAAY,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAC;QACnG,IAAI,gBAAgB,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,gBAAgB,CAAC,CAAC;QACnE,CAAC;QAED,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;gBACjE,MAAM,IAAI,KAAK,CACb,oBAAoB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,6BAA6B;oBACrF,oGAAoG,CACvG,CAAC;YACJ,CAAC;YAED,IAAI,kBAAkB,GAA6C,IAAI,CAAC,yBAAyB,CAAC,GAAG,CACnG,UAAU,CAA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AAS,CAAC,CAAC;YAC/B,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,UAAkB,EAAE,SAAiB;QACzD,MAAM,gBAAgB,GAAiC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACvF,OAAO,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;IAEO,cAAc,CAAC,WAAmB;QACxC,MAAM,UAAU,GACd,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,qBAAqB,WAAW,mDAAmD,CAAC,CAAC;QACvG,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;;AAvGD,gDAAgD;AAChD,EAAE;AACF,6BAA6B;AACL,8BAAe,GAAW,qBAAqB,AAAhC,CAAiC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport type { DocNode } from '../nodes/DocNode';\r\nimport { StringChecks } from '../parser/StringChecks';\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nexport type DocNodeConstructor = new (...args: any[]) => DocNode;\r\n\r\nexport interface IDocNodeDefinition {\r\n docNodeKind: string;\r\n constructor: DocNodeConstructor;\r\n}\r\n\r\ninterface IRegisteredDocNodeDefinition {\r\n docNodeKind: string;\r\n constructor: DocNodeConstructor;\r\n packageName: string;\r\n allowedChildKinds: Set;\r\n}\r\n\r\n/**\r\n * Part of the {@link TSDocConfiguration} object.\r\n *\r\n * @remarks\r\n * If you define your own custom subclasses of `DocNode`, they must be registered with the `DocNodeManager`.\r\n * Use {@link DocNodeManager.registerAllowableChildren} to specify which {@link DocNodeContainer} subclasses\r\n * are allowed to contain your nodes.\r\n */\r\nexport class DocNodeManager {\r\n // Matches an ASCII TypeScript-style identifier.\r\n //\r\n // Example: \"_myIdentifier99\"\r\n private static readonly _nodeKindRegExp: RegExp = /^[_a-z][_a-z0-9]*$/i;\r\n\r\n private readonly _docNodeDefinitionsByKind: Map = new Map<\r\n string,\r\n IRegisteredDocNodeDefinition\r\n >();\r\n private readonly _docNodeDefinitionsByConstructor: Map =\r\n new Map();\r\n\r\n /**\r\n * Registers a list of {@link IDocNodeDefinition} objects to be used with the associated\r\n * {@link TSDocConfiguration} object.\r\n */\r\n public registerDocNodes(packageName: string, definitions: ReadonlyArray): void {\r\n const packageNameError: string | undefined = StringChecks.explainIfInvalidPackageName(packageName);\r\n if (packageNameError) {\r\n throw new Error('Invalid NPM package name: ' + packageNameError);\r\n }\r\n\r\n for (const definition of definitions) {\r\n if (!DocNodeManager._nodeKindRegExp.test(definition.docNodeKind)) {\r\n throw new Error(\r\n `The DocNode kind ${JSON.stringify(definition.docNodeKind)} is not a valid identifier.` +\r\n ` It must start with an underscore or letter, and be comprised of letters, numbers, and underscores`\r\n );\r\n }\r\n\r\n let existingDefinition: IRegisteredDocNodeDefinition | undefined = this._docNodeDefinitionsByKind.get(\r\n definition.docNodeKind\r\n );\r\n\r\n if (existingDefinition !== undefined) {\r\n throw new Error(\r\n `The DocNode kind \"${definition.docNodeKind}\" was already registered` +\r\n ` by ${existingDefinition.packageName}`\r\n );\r\n }\r\n\r\n existingDefinition = this._docNodeDefinitionsByConstructor.get(definition.constructor);\r\n if (existingDefinition !== undefined) {\r\n throw new Error(\r\n `This DocNode constructor was already registered by ${existingDefinition.packageName}` +\r\n ` as ${existingDefinition.docNodeKind}`\r\n );\r\n }\r\n\r\n const newDefinition: IRegisteredDocNodeDefinition = {\r\n docNodeKind: definition.docNodeKind,\r\n constructor: definition.constructor,\r\n packageName,\r\n allowedChildKinds: new Set()\r\n };\r\n\r\n this._docNodeDefinitionsByKind.set(definition.docNodeKind, newDefinition);\r\n this._docNodeDefinitionsByConstructor.set(definition.constructor, newDefinition);\r\n }\r\n }\r\n\r\n /**\r\n * Reports an error if the specified DocNode kind has not been registered.\r\n */\r\n public throwIfNotRegisteredKind(docNodeKind: string): void {\r\n if (!this._docNodeDefinitionsByKind.has(docNodeKind)) {\r\n throw new Error(`The DocNode kind \"${docNodeKind}\" was not registered with this TSDocConfiguration`);\r\n }\r\n }\r\n\r\n /**\r\n * For the given parent DocNode kind, registers the specified DocNode kinds as being allowable children of\r\n * the parent.\r\n *\r\n * @remarks\r\n * To prevent mistakes, `DocNodeContainer` will report an error if you try to add node that was not registered\r\n * as an allowable child of the container.\r\n */\r\n public registerAllowableChildren(parentKind: string, childKinds: ReadonlyArray): void {\r\n const parentDefinition: IRegisteredDocNodeDefinition = this._getDefinition(parentKind);\r\n\r\n for (const childKind of childKinds) {\r\n this._getDefinition(childKind);\r\n parentDefinition.allowedChildKinds.add(childKind);\r\n }\r\n }\r\n\r\n /**\r\n * Returns true if the specified DocNode kind has been registered as an allowable child of the specified\r\n * parent DocNode kind.\r\n */\r\n public isAllowedChild(parentKind: string, childKind: string): boolean {\r\n const parentDefinition: IRegisteredDocNodeDefinition = this._getDefinition(parentKind);\r\n return parentDefinition.allowedChildKinds.has(childKind);\r\n }\r\n\r\n private _getDefinition(docNodeKind: string): IRegisteredDocNodeDefinition {\r\n const definition: IRegisteredDocNodeDefinition | undefined =\r\n this._docNodeDefinitionsByKind.get(docNodeKind);\r\n if (definition === undefined) {\r\n throw new Error(`The DocNode kind \"${docNodeKind}\" was not registered with this TSDocConfiguration`);\r\n }\r\n return definition;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..56bd6d919d33491ab87aa17acb804acf1a7b0e56 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts @@ -0,0 +1,133 @@ +import type { TSDocTagDefinition } from './TSDocTagDefinition'; +import { TSDocValidationConfiguration } from './TSDocValidationConfiguration'; +import { DocNodeManager } from './DocNodeManager'; +import { type TSDocMessageId } from '../parser/TSDocMessageId'; +/** + * Configuration for the TSDocParser. + */ +export declare class TSDocConfiguration { + private readonly _tagDefinitions; + private readonly _tagDefinitionsByName; + private readonly _supportedTagDefinitions; + private readonly _validation; + private readonly _docNodeManager; + private readonly _supportedHtmlElements; + constructor(); + /** + * Resets the `TSDocConfiguration` object to its initial empty state. + * @param noStandardTags - The `TSDocConfiguration` constructor normally adds definitions for the + * standard TSDoc tags. Set `noStandardTags` to true for a completely empty `tagDefinitions` collection. + */ + clear(noStandardTags?: boolean): void; + /** + * The TSDoc tags that are defined in this configuration. + * + * @remarks + * The subset of "supported" tags is tracked by {@link TSDocConfiguration.supportedTagDefinitions}. + */ + get tagDefinitions(): ReadonlyArray; + /** + * Returns the subset of {@link TSDocConfiguration.tagDefinitions} + * that are supported in this configuration. + * + * @remarks + * This property is only used when + * {@link TSDocValidationConfiguration.reportUnsupportedTags} is enabled. + */ + get supportedTagDefinitions(): ReadonlyArray; + /** + * Enable/disable validation checks performed by the parser. + */ + get validation(): TSDocValidationConfiguration; + /** + * The HTML element names that are supported in this configuration. Used in conjunction with the `reportUnsupportedHtmlElements` setting. + */ + get supportedHtmlElements(): string[]; + /** + * Register custom DocNode subclasses. + */ + get docNodeManager(): DocNodeManager; + /** + * Return the tag that was defined with the specified name, or undefined + * if not found. + */ + tryGetTagDefinition(tagName: string): TSDocTagDefinition | undefined; + /** + * Return the tag that was defined with the specified name, or undefined + * if not found. + */ + tryGetTagDefinitionWithUpperCase(alreadyUpperCaseTagName: string): TSDocTagDefinition | undefined; + /** + * Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported. + * Use {@link TSDocConfiguration.setSupportForTag} to mark it as supported. + * + * @remarks + * If a tag is "defined" this means that the parser recognizes it and understands its syntax. + * Whereas if a tag is "supported", this means it is defined AND the application implements the tag. + */ + addTagDefinition(tagDefinition: TSDocTagDefinition): void; + /** + * Calls {@link TSDocConfiguration.addTagDefinition} for a list of definitions, + * and optionally marks them as supported. + * @param tagDefinitions - the definitions to be added + * @param supported - if specified, calls the {@link TSDocConfiguration.setSupportForTag} + * method to mark the definitions as supported or unsupported + */ + addTagDefinitions(tagDefinitions: ReadonlyArray, supported?: boolean | undefined): void; + /** + * Returns true if the tag is supported in this configuration. + */ + isTagSupported(tagDefinition: TSDocTagDefinition): boolean; + /** + * Specifies whether the tag definition is supported in this configuration. + * The parser may issue warnings for unsupported tags. + * + * @remarks + * If a tag is "defined" this means that the parser recognizes it and understands its syntax. + * Whereas if a tag is "supported", this means it is defined AND the application implements the tag. + * + * This function automatically sets {@link TSDocValidationConfiguration.reportUnsupportedTags} + * to true. + */ + setSupportForTag(tagDefinition: TSDocTagDefinition, supported: boolean): void; + /** + * Specifies whether the tag definition is supported in this configuration. + * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedTags} to `true`. + * + * @remarks + * The parser may issue warnings for unsupported tags. + * If a tag is "defined" this means that the parser recognizes it and understands its syntax. + * Whereas if a tag is "supported", this means it is defined AND the application implements the tag. + */ + setSupportForTags(tagDefinitions: ReadonlyArray, supported: boolean): void; + /** + * Assigns the `supportedHtmlElements` property, replacing any previous elements. + * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedHtmlElements} to `true`. + */ + setSupportedHtmlElements(htmlTags: string[]): void; + /** + * Returns true if the html element is supported in this configuration. + */ + isHtmlElementSupported(htmlTag: string): boolean; + /** + * Returns true if the specified {@link TSDocMessageId} string is implemented by this release of the TSDoc parser. + * This can be used to detect misspelled identifiers. + * + * @privateRemarks + * + * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions + * of the TSDoc parser, we may provide a way to register custom message identifiers. + */ + isKnownMessageId(messageId: TSDocMessageId | string): boolean; + /** + * Returns the list of {@link TSDocMessageId} strings that are implemented by this release of the TSDoc parser. + * + * @privateRemarks + * + * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions + * of the TSDoc parser, we may provide a way to register custom message identifiers. + */ + get allTsdocMessageIds(): ReadonlyArray; + private _requireTagToBeDefined; +} +//# sourceMappingURL=TSDocConfiguration.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts.map b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b0a357efb700175f002b367c0f67afc7dc839875 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocConfiguration.d.ts","sourceRoot":"","sources":["../../src/configuration/TSDocConfiguration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,cAAc,EAA6C,MAAM,0BAA0B,CAAC;AAE1G;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAkC;IACxE,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAA0B;IACnE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA+B;IAC3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAiB;IACjD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAc;;IAgBrD;;;;OAIG;IACI,KAAK,CAAC,cAAc,GAAE,OAAe,GAAG,IAAI;IAenD;;;;;OAKG;IACH,IAAW,cAAc,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAE7D;IAED;;;;;;;OAOG;IACH,IAAW,uBAAuB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_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js new file mode 100644 index 0000000000000000000000000000000000000000..eb08e6610503e3508c3f88e34f03dd945ee66b59 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { StandardTags } from '../details/StandardTags'; +import { TSDocValidationConfiguration } from './TSDocValidationConfiguration'; +import { DocNodeManager } from './DocNodeManager'; +import { BuiltInDocNodes } from '../nodes/BuiltInDocNodes'; +import { allTsdocMessageIds, allTsdocMessageIdsSet } from '../parser/TSDocMessageId'; +/** + * Configuration for the TSDocParser. + */ +export class TSDocConfiguration { + constructor() { + this._tagDefinitions = []; + this._tagDefinitionsByName = new Map(); + this._supportedTagDefinitions = new Set(); + this._validation = new TSDocValidationConfiguration(); + this._docNodeManager = new DocNodeManager(); + this._supportedHtmlElements = new Set(); + this.clear(false); + // Register the built-in node kinds + BuiltInDocNodes.register(this); + } + /** + * Resets the `TSDocConfiguration` object to its initial empty state. + * @param noStandardTags - The `TSDocConfiguration` constructor normally adds definitions for the + * standard TSDoc tags. Set `noStandardTags` to true for a completely empty `tagDefinitions` collection. + */ + clear(noStandardTags = false) { + this._tagDefinitions.length = 0; + this._tagDefinitionsByName.clear(); + this._supportedTagDefinitions.clear(); + this._validation.ignoreUndefinedTags = false; + this._validation.reportUnsupportedTags = false; + this._validation.reportUnsupportedHtmlElements = false; + this._supportedHtmlElements.clear(); + if (!noStandardTags) { + // Define all the standard tags + this.addTagDefinitions(StandardTags.allDefinitions); + } + } + /** + * The TSDoc tags that are defined in this configuration. + * + * @remarks + * The subset of "supported" tags is tracked by {@link TSDocConfiguration.supportedTagDefinitions}. + */ + get tagDefinitions() { + return this._tagDefinitions; + } + /** + * Returns the subset of {@link TSDocConfiguration.tagDefinitions} + * that are supported in this configuration. + * + * @remarks + * This property is only used when + * {@link TSDocValidationConfiguration.reportUnsupportedTags} is enabled. + */ + get supportedTagDefinitions() { + return this.tagDefinitions.filter((x) => this.isTagSupported(x)); + } + /** + * Enable/disable validation checks performed by the parser. + */ + get validation() { + return this._validation; + } + /** + * The HTML element names that are supported in this configuration. Used in conjunction with the `reportUnsupportedHtmlElements` setting. + */ + get supportedHtmlElements() { + return Array.from(this._supportedHtmlElements.values()); + } + /** + * Register custom DocNode subclasses. + */ + get docNodeManager() { + return this._docNodeManager; + } + /** + * Return the tag that was defined with the specified name, or undefined + * if not found. + */ + tryGetTagDefinition(tagName) { + return this._tagDefinitionsByName.get(tagName.toUpperCase()); + } + /** + * Return the tag that was defined with the specified name, or undefined + * if not found. + */ + tryGetTagDefinitionWithUpperCase(alreadyUpperCaseTagName) { + return this._tagDefinitionsByName.get(alreadyUpperCaseTagName); + } + /** + * Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported. + * Use {@link TSDocConfiguration.setSupportForTag} to mark it as supported. + * + * @remarks + * If a tag is "defined" this means that the parser recognizes it and understands its syntax. + * Whereas if a tag is "supported", this means it is defined AND the application implements the tag. + */ + addTagDefinition(tagDefinition) { + const existingDefinition = this._tagDefinitionsByName.get(tagDefinition.tagNameWithUpperCase); + if (existingDefinition === tagDefinition) { + return; + } + if (existingDefinition) { + throw new Error(`A tag is already defined using the name ${existingDefinition.tagName}`); + } + this._tagDefinitions.push(tagDefinition); + this._tagDefinitionsByName.set(tagDefinition.tagNameWithUpperCase, tagDefinition); + } + /** + * Calls {@link TSDocConfiguration.addTagDefinition} for a list of definitions, + * and optionally marks them as supported. + * @param tagDefinitions - the definitions to be added + * @param supported - if specified, calls the {@link TSDocConfiguration.setSupportForTag} + * method to mark the definitions as supported or unsupported + */ + addTagDefinitions(tagDefinitions, supported) { + for (const tagDefinition of tagDefinitions) { + this.addTagDefinition(tagDefinition); + if (supported !== undefined) { + this.setSupportForTag(tagDefinition, supported); + } + } + } + /** + * Returns true if the tag is supported in this configuration. + */ + isTagSupported(tagDefinition) { + this._requireTagToBeDefined(tagDefinition); + return this._supportedTagDefinitions.has(tagDefinition); + } + /** + * Specifies whether the tag definition is supported in this configuration. + * The parser may issue warnings for unsupported tags. + * + * @remarks + * If a tag is "defined" this means that the parser recognizes it and understands its syntax. + * Whereas if a tag is "supported", this means it is defined AND the application implements the tag. + * + * This function automatically sets {@link TSDocValidationConfiguration.reportUnsupportedTags} + * to true. + */ + setSupportForTag(tagDefinition, supported) { + this._requireTagToBeDefined(tagDefinition); + if (supported) { + this._supportedTagDefinitions.add(tagDefinition); + } + else { + this._supportedTagDefinitions.delete(tagDefinition); + } + this.validation.reportUnsupportedTags = true; + } + /** + * Specifies whether the tag definition is supported in this configuration. + * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedTags} to `true`. + * + * @remarks + * The parser may issue warnings for unsupported tags. + * If a tag is "defined" this means that the parser recognizes it and understands its syntax. + * Whereas if a tag is "supported", this means it is defined AND the application implements the tag. + */ + setSupportForTags(tagDefinitions, supported) { + for (const tagDefinition of tagDefinitions) { + this.setSupportForTag(tagDefinition, supported); + } + } + /** + * Assigns the `supportedHtmlElements` property, replacing any previous elements. + * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedHtmlElements} to `true`. + */ + setSupportedHtmlElements(htmlTags) { + this._supportedHtmlElements.clear(); + this._validation.reportUnsupportedHtmlElements = true; + for (const htmlTag of htmlTags) { + this._supportedHtmlElements.add(htmlTag); + } + } + /** + * Returns true if the html element is supported in this configuration. + */ + isHtmlElementSupported(htmlTag) { + return this._supportedHtmlElements.has(htmlTag); + } + /** + * Returns true if the specified {@link TSDocMessageId} string is implemented by this release of the TSDoc parser. + * This can be used to detect misspelled identifiers. + * + * @privateRemarks + * + * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions + * of the TSDoc parser, we may provide a way to register custom message identifiers. + */ + isKnownMessageId(messageId) { + return allTsdocMessageIdsSet.has(messageId); + } + /** + * Returns the list of {@link TSDocMessageId} strings that are implemented by this release of the TSDoc parser. + * + * @privateRemarks + * + * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions + * of the TSDoc parser, we may provide a way to register custom message identifiers. + */ + get allTsdocMessageIds() { + return allTsdocMessageIds; + } + _requireTagToBeDefined(tagDefinition) { + const matching = this._tagDefinitionsByName.get(tagDefinition.tagNameWithUpperCase); + if (matching) { + if (matching === tagDefinition) { + return; + } + } + throw new Error('The specified TSDocTagDefinition is not defined for this TSDocConfiguration'); + } +} +//# sourceMappingURL=TSDocConfiguration.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js.map b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ea9c394436c948b0893997d9a14e340a18c92177 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocConfiguration.js","sourceRoot":"","sources":["../../src/configuration/TSDocConfiguration.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAuB,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAE1G;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAQ7B;QACE,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,qBAAqB,GAAG,IAAI,GAAG,EAA8B,CAAC;QACnE,IAAI,CAAC,wBAAwB,GAAG,IAAI,GAAG,EAAsB,CAAC;QAC9D,IAAI,CAAC,WAAW,GAAG,IAAI,4BAA4B,EAAE,CAAC;QACtD,IAAI,CAAC,eA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;IAC7D,CAAC;IAEO,sBAAsB,CAAC,aAAiC;QAC9D,MAAM,QAAQ,GAAmC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAC7E,aAAa,CAAC,oBAAoB,CACnC,CAAC;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,QAAQ,KAAK,aAAa,EAAE,CAAC;gBAC/B,OAAO;YACT,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;IACjG,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { StandardTags } from '../details/StandardTags';\r\nimport type { TSDocTagDefinition } from './TSDocTagDefinition';\r\nimport { TSDocValidationConfiguration } from './TSDocValidationConfiguration';\r\nimport { DocNodeManager } from './DocNodeManager';\r\nimport { BuiltInDocNodes } from '../nodes/BuiltInDocNodes';\r\nimport { type TSDocMessageId, allTsdocMessageIds, allTsdocMessageIdsSet } from '../parser/TSDocMessageId';\r\n\r\n/**\r\n * Configuration for the TSDocParser.\r\n */\r\nexport class TSDocConfiguration {\r\n private readonly _tagDefinitions: TSDocTagDefinition[];\r\n private readonly _tagDefinitionsByName: Map;\r\n private readonly _supportedTagDefinitions: Set;\r\n private readonly _validation: TSDocValidationConfiguration;\r\n private readonly _docNodeManager: DocNodeManager;\r\n private readonly _supportedHtmlElements: Set;\r\n\r\n public constructor() {\r\n this._tagDefinitions = [];\r\n this._tagDefinitionsByName = new Map();\r\n this._supportedTagDefinitions = new Set();\r\n this._validation = new TSDocValidationConfiguration();\r\n this._docNodeManager = new DocNodeManager();\r\n this._supportedHtmlElements = new Set();\r\n\r\n this.clear(false);\r\n\r\n // Register the built-in node kinds\r\n BuiltInDocNodes.register(this);\r\n }\r\n\r\n /**\r\n * Resets the `TSDocConfiguration` object to its initial empty state.\r\n * @param noStandardTags - The `TSDocConfiguration` constructor normally adds definitions for the\r\n * standard TSDoc tags. Set `noStandardTags` to true for a completely empty `tagDefinitions` collection.\r\n */\r\n public clear(noStandardTags: boolean = false): void {\r\n this._tagDefinitions.length = 0;\r\n this._tagDefinitionsByName.clear();\r\n this._supportedTagDefinitions.clear();\r\n this._validation.ignoreUndefinedTags = false;\r\n this._validation.reportUnsupportedTags = false;\r\n this._validation.reportUnsupportedHtmlElements = false;\r\n this._supportedHtmlElements.clear();\r\n\r\n if (!noStandardTags) {\r\n // Define all the standard tags\r\n this.addTagDefinitions(StandardTags.allDefinitions);\r\n }\r\n }\r\n\r\n /**\r\n * The TSDoc tags that are defined in this configuration.\r\n *\r\n * @remarks\r\n * The subset of \"supported\" tags is tracked by {@link TSDocConfiguration.supportedTagDefinitions}.\r\n */\r\n public get tagDefinitions(): ReadonlyArray {\r\n return this._tagDefinitions;\r\n }\r\n\r\n /**\r\n * Returns the subset of {@link TSDocConfiguration.tagDefinitions}\r\n * that are supported in this configuration.\r\n *\r\n * @remarks\r\n * This property is only used when\r\n * {@link TSDocValidationConfiguration.reportUnsupportedTags} is enabled.\r\n */\r\n public get supportedTagDefinitions(): ReadonlyArray {\r\n return this.tagDefinitions.filter((x) => this.isTagSupported(x));\r\n }\r\n\r\n /**\r\n * Enable/disable validation checks performed by the parser.\r\n */\r\n public get validation(): TSDocValidationConfiguration {\r\n return this._validation;\r\n }\r\n\r\n /**\r\n * The HTML element names that are supported in this configuration. Used in conjunction with the `reportUnsupportedHtmlElements` setting.\r\n */\r\n public get supportedHtmlElements(): string[] {\r\n return Array.from(this._supportedHtmlElements.values());\r\n }\r\n\r\n /**\r\n * Register custom DocNode subclasses.\r\n */\r\n public get docNodeManager(): DocNodeManager {\r\n return this._docNodeManager;\r\n }\r\n\r\n /**\r\n * Return the tag that was defined with the specified name, or undefined\r\n * if not found.\r\n */\r\n public tryGetTagDefinition(tagName: string): TSDocTagDefinition | undefined {\r\n return this._tagDefinitionsByName.get(tagName.toUpperCase());\r\n }\r\n\r\n /**\r\n * Return the tag that was defined with the specified name, or undefined\r\n * if not found.\r\n */\r\n public tryGetTagDefinitionWithUpperCase(alreadyUpperCaseTagName: string): TSDocTagDefinition | undefined {\r\n return this._tagDefinitionsByName.get(alreadyUpperCaseTagName);\r\n }\r\n\r\n /**\r\n * Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported.\r\n * Use {@link TSDocConfiguration.setSupportForTag} to mark it as supported.\r\n *\r\n * @remarks\r\n * If a tag is \"defined\" this means that the parser recognizes it and understands its syntax.\r\n * Whereas if a tag is \"supported\", this means it is defined AND the application implements the tag.\r\n */\r\n public addTagDefinition(tagDefinition: TSDocTagDefinition): void {\r\n const existingDefinition: TSDocTagDefinition | undefined = this._tagDefinitionsByName.get(\r\n tagDefinition.tagNameWithUpperCase\r\n );\r\n\r\n if (existingDefinition === tagDefinition) {\r\n return;\r\n }\r\n\r\n if (existingDefinition) {\r\n throw new Error(`A tag is already defined using the name ${existingDefinition.tagName}`);\r\n }\r\n\r\n this._tagDefinitions.push(tagDefinition);\r\n this._tagDefinitionsByName.set(tagDefinition.tagNameWithUpperCase, tagDefinition);\r\n }\r\n\r\n /**\r\n * Calls {@link TSDocConfiguration.addTagDefinition} for a list of definitions,\r\n * and optionally marks them as supported.\r\n * @param tagDefinitions - the definitions to be added\r\n * @param supported - if specified, calls the {@link TSDocConfiguration.setSupportForTag}\r\n * method to mark the definitions as supported or unsupported\r\n */\r\n public addTagDefinitions(\r\n tagDefinitions: ReadonlyArray,\r\n supported?: boolean | undefined\r\n ): void {\r\n for (const tagDefinition of tagDefinitions) {\r\n this.addTagDefinition(tagDefinition);\r\n\r\n if (supported !== undefined) {\r\n this.setSupportForTag(tagDefinition, supported);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns true if the tag is supported in this configuration.\r\n */\r\n public isTagSupported(tagDefinition: TSDocTagDefinition): boolean {\r\n this._requireTagToBeDefined(tagDefinition);\r\n return this._supportedTagDefinitions.has(tagDefinition);\r\n }\r\n\r\n /**\r\n * Specifies whether the tag definition is supported in this configuration.\r\n * The parser may issue warnings for unsupported tags.\r\n *\r\n * @remarks\r\n * If a tag is \"defined\" this means that the parser recognizes it and understands its syntax.\r\n * Whereas if a tag is \"supported\", this means it is defined AND the application implements the tag.\r\n *\r\n * This function automatically sets {@link TSDocValidationConfiguration.reportUnsupportedTags}\r\n * to true.\r\n */\r\n public setSupportForTag(tagDefinition: TSDocTagDefinition, supported: boolean): void {\r\n this._requireTagToBeDefined(tagDefinition);\r\n if (supported) {\r\n this._supportedTagDefinitions.add(tagDefinition);\r\n } else {\r\n this._supportedTagDefinitions.delete(tagDefinition);\r\n }\r\n\r\n this.validation.reportUnsupportedTags = true;\r\n }\r\n\r\n /**\r\n * Specifies whether the tag definition is supported in this configuration.\r\n * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedTags} to `true`.\r\n *\r\n * @remarks\r\n * The parser may issue warnings for unsupported tags.\r\n * If a tag is \"defined\" this means that the parser recognizes it and understands its syntax.\r\n * Whereas if a tag is \"supported\", this means it is defined AND the application implements the tag.\r\n */\r\n public setSupportForTags(tagDefinitions: ReadonlyArray, supported: boolean): void {\r\n for (const tagDefinition of tagDefinitions) {\r\n this.setSupportForTag(tagDefinition, supported);\r\n }\r\n }\r\n\r\n /**\r\n * Assigns the `supportedHtmlElements` property, replacing any previous elements.\r\n * This operation sets {@link TSDocValidationConfiguration.reportUnsupportedHtmlElements} to `true`.\r\n */\r\n public setSupportedHtmlElements(htmlTags: string[]): void {\r\n this._supportedHtmlElements.clear();\r\n this._validation.reportUnsupportedHtmlElements = true;\r\n for (const htmlTag of htmlTags) {\r\n this._supportedHtmlElements.add(htmlTag);\r\n }\r\n }\r\n\r\n /**\r\n * Returns true if the html element is supported in this configuration.\r\n */\r\n public isHtmlElementSupported(htmlTag: string): boolean {\r\n return this._supportedHtmlElements.has(htmlTag);\r\n }\r\n\r\n /**\r\n * Returns true if the specified {@link TSDocMessageId} string is implemented by this release of the TSDoc parser.\r\n * This can be used to detect misspelled identifiers.\r\n *\r\n * @privateRemarks\r\n *\r\n * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions\r\n * of the TSDoc parser, we may provide a way to register custom message identifiers.\r\n */\r\n public isKnownMessageId(messageId: TSDocMessageId | string): boolean {\r\n return allTsdocMessageIdsSet.has(messageId);\r\n }\r\n\r\n /**\r\n * Returns the list of {@link TSDocMessageId} strings that are implemented by this release of the TSDoc parser.\r\n *\r\n * @privateRemarks\r\n *\r\n * Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions\r\n * of the TSDoc parser, we may provide a way to register custom message identifiers.\r\n */\r\n public get allTsdocMessageIds(): ReadonlyArray {\r\n return allTsdocMessageIds as ReadonlyArray;\r\n }\r\n\r\n private _requireTagToBeDefined(tagDefinition: TSDocTagDefinition): void {\r\n const matching: TSDocTagDefinition | undefined = this._tagDefinitionsByName.get(\r\n tagDefinition.tagNameWithUpperCase\r\n );\r\n if (matching) {\r\n if (matching === tagDefinition) {\r\n return;\r\n }\r\n }\r\n throw new Error('The specified TSDocTagDefinition is not defined for this TSDocConfiguration');\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1fc94a6aec89c4f44075f23ed633985d116ac565 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts @@ -0,0 +1,69 @@ +import { Standardization } from '../details/Standardization'; +/** + * Determines the type of syntax for a TSDocTagDefinition + */ +export declare enum TSDocTagSyntaxKind { + /** + * The tag is intended to be an inline tag. For example: `{@link}`. + */ + InlineTag = 0, + /** + * The tag is intended to be a block tag that starts a new documentation + * section. For example: `@remarks` + */ + BlockTag = 1, + /** + * The tag is intended to be a modifier tag whose presence indicates + * an aspect of the associated API item. For example: `@internal` + */ + ModifierTag = 2 +} +/** + * Constructor parameters for {@link TSDocTagDefinition} + */ +export interface ITSDocTagDefinitionParameters { + tagName: string; + syntaxKind: TSDocTagSyntaxKind; + allowMultiple?: boolean; +} +/** + * @internal + */ +export interface ITSDocTagDefinitionInternalParameters extends ITSDocTagDefinitionParameters { + standardization: Standardization; +} +/** + * Defines a TSDoc tag that will be understood by the TSDocParser. + */ +export declare class TSDocTagDefinition { + /** + * The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed + * by ASCII letters using "camelCase" capitalization. + */ + readonly tagName: string; + /** + * The TSDoc tag name in all capitals, which is used for performing + * case-insensitive comparisons or lookups. + */ + readonly tagNameWithUpperCase: string; + /** + * Specifies the expected syntax for this tag. + */ + readonly syntaxKind: TSDocTagSyntaxKind; + /** + * Indicates the level of support expected from documentation tools that implement + * the standard. + */ + readonly standardization: Standardization; + /** + * If true, then this TSDoc tag may appear multiple times in a doc comment. + * By default, a tag may only appear once. + */ + readonly allowMultiple: boolean; + constructor(parameters: ITSDocTagDefinitionParameters); + /** + * Throws an exception if `tagName` is not a valid TSDoc tag name. + */ + static validateTSDocTagName(tagName: string): void; +} +//# sourceMappingURL=TSDocTagDefinition.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts.map b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..b43b8a38c14c9164d65ac42b9703f4ae96c88432 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocTagDefinition.d.ts","sourceRoot":"","sources":["../../src/configuration/TSDocTagDefinition.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;GAEG;AACH,oBAAY,kBAAkB;IAC5B;;OAEG;IACH,SAAS,IAAA;IAET;;;OAGG;IACH,QAAQ,IAAA;IAER;;;OAGG;IACH,WAAW,IAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qCAAsC,SAAQ,6BAA6B;IAC1F,eAAe,EAAE,eAAe,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,kBAAkB;IAC7B;;;OAGG;IACH,SAAgB,OAAO,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,SAAgB,oBAAoB,EAAE,MAAM,CAAC;IAE7C;;OAEG;IACH,SAAgB,UAAU,EAAE,kBAAkB,CAAC;IAE/C;;;OAGG;IACH,SAAgB,eAAe,EAAE,eAAe,CAAC;IAEjD;;;OAGG;IACH,SAAgB,aAAa,EAAE,OAAO,CAAC;gBAEpB,UAAU,EAAE,6BAA6B;IAU5D;;OAEG;WACW,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAG1D"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js new file mode 100644 index 0000000000000000000000000000000000000000..ee5c1a753609d5dc8ce16d79075fa4e2bc9c3322 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { StringChecks } from '../parser/StringChecks'; +import { Standardization } from '../details/Standardization'; +/** + * Determines the type of syntax for a TSDocTagDefinition + */ +export var TSDocTagSyntaxKind; +(function (TSDocTagSyntaxKind) { + /** + * The tag is intended to be an inline tag. For example: `{@link}`. + */ + TSDocTagSyntaxKind[TSDocTagSyntaxKind["InlineTag"] = 0] = "InlineTag"; + /** + * The tag is intended to be a block tag that starts a new documentation + * section. For example: `@remarks` + */ + TSDocTagSyntaxKind[TSDocTagSyntaxKind["BlockTag"] = 1] = "BlockTag"; + /** + * The tag is intended to be a modifier tag whose presence indicates + * an aspect of the associated API item. For example: `@internal` + */ + TSDocTagSyntaxKind[TSDocTagSyntaxKind["ModifierTag"] = 2] = "ModifierTag"; +})(TSDocTagSyntaxKind || (TSDocTagSyntaxKind = {})); +/** + * Defines a TSDoc tag that will be understood by the TSDocParser. + */ +export class TSDocTagDefinition { + constructor(parameters) { + StringChecks.validateTSDocTagName(parameters.tagName); + this.tagName = parameters.tagName; + this.tagNameWithUpperCase = parameters.tagName.toUpperCase(); + this.syntaxKind = parameters.syntaxKind; + this.standardization = + parameters.standardization || Standardization.None; + this.allowMultiple = !!parameters.allowMultiple; + } + /** + * Throws an exception if `tagName` is not a valid TSDoc tag name. + */ + static validateTSDocTagName(tagName) { + StringChecks.validateTSDocTagName(tagName); + } +} +//# sourceMappingURL=TSDocTagDefinition.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js.map b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5f2ec5ea2a34cf0ea0e74da06c3532e55b85ca27 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocTagDefinition.js","sourceRoot":"","sources":["../../src/configuration/TSDocTagDefinition.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAN,IAAY,kBAiBX;AAjBD,WAAY,kBAAkB;IAC5B;;OAEG;IACH,qEAAS,CAAA;IAET;;;OAGG;IACH,mEAAQ,CAAA;IAER;;;OAGG;IACH,yEAAW,CAAA;AACb,CAAC,EAjBW,kBAAkB,KAAlB,kBAAkB,QAiB7B;AAkBD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IA8B7B,YAAmB,UAAyC;QAC1D,YAAY,CAAC,oBAAoB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;QAClC,IAAI,CAAC,oBAAoB,GAAG,UAAU,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,eAAe;YACjB,UAAoD,CAAC,eAAe,IAAI,eAAe,CAAC,IAAI,CAAC;QAChG,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC;IAClD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,oBAAoB,CAAC,OAAe;QAChD,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { StringChecks } from '../parser/StringChecks';\r\nimport { Standardization } from '../details/Standardization';\r\n\r\n/**\r\n * Determines the type of syntax for a TSDocTagDefinition\r\n */\r\nexport enum TSDocTagSyntaxKind {\r\n /**\r\n * The tag is intended to be an inline tag. For example: `{@link}`.\r\n */\r\n InlineTag,\r\n\r\n /**\r\n * The tag is intended to be a block tag that starts a new documentation\r\n * section. For example: `@remarks`\r\n */\r\n BlockTag,\r\n\r\n /**\r\n * The tag is intended to be a modifier tag whose presence indicates\r\n * an aspect of the associated API item. For example: `@internal`\r\n */\r\n ModifierTag\r\n}\r\n\r\n/**\r\n * Constructor parameters for {@link TSDocTagDefinition}\r\n */\r\nexport interface ITSDocTagDefinitionParameters {\r\n tagName: string;\r\n syntaxKind: TSDocTagSyntaxKind;\r\n allowMultiple?: boolean;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport interface ITSDocTagDefinitionInternalParameters extends ITSDocTagDefinitionParameters {\r\n standardization: Standardization;\r\n}\r\n\r\n/**\r\n * Defines a TSDoc tag that will be understood by the TSDocParser.\r\n */\r\nexport class TSDocTagDefinition {\r\n /**\r\n * The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed\r\n * by ASCII letters using \"camelCase\" capitalization.\r\n */\r\n public readonly tagName: string;\r\n\r\n /**\r\n * The TSDoc tag name in all capitals, which is used for performing\r\n * case-insensitive comparisons or lookups.\r\n */\r\n public readonly tagNameWithUpperCase: string;\r\n\r\n /**\r\n * Specifies the expected syntax for this tag.\r\n */\r\n public readonly syntaxKind: TSDocTagSyntaxKind;\r\n\r\n /**\r\n * Indicates the level of support expected from documentation tools that implement\r\n * the standard.\r\n */\r\n public readonly standardization: Standardization;\r\n\r\n /**\r\n * If true, then this TSDoc tag may appear multiple times in a doc comment.\r\n * By default, a tag may only appear once.\r\n */\r\n public readonly allowMultiple: boolean;\r\n\r\n public constructor(parameters: ITSDocTagDefinitionParameters) {\r\n StringChecks.validateTSDocTagName(parameters.tagName);\r\n this.tagName = parameters.tagName;\r\n this.tagNameWithUpperCase = parameters.tagName.toUpperCase();\r\n this.syntaxKind = parameters.syntaxKind;\r\n this.standardization =\r\n (parameters as ITSDocTagDefinitionInternalParameters).standardization || Standardization.None;\r\n this.allowMultiple = !!parameters.allowMultiple;\r\n }\r\n\r\n /**\r\n * Throws an exception if `tagName` is not a valid TSDoc tag name.\r\n */\r\n public static validateTSDocTagName(tagName: string): void {\r\n StringChecks.validateTSDocTagName(tagName);\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6b3ad980474b93b7e19f033fc914bfebdba6670d --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts @@ -0,0 +1,43 @@ +/** + * Part of the {@link TSDocConfiguration} object. + */ +export declare class TSDocValidationConfiguration { + /** + * Set `ignoreUndefinedTags` to true to silently ignore unrecognized tags, + * instead of reporting a warning. + * + * @remarks + * Normally the parser will issue errors when it encounters tag names that do not + * have a corresponding definition in {@link TSDocConfiguration.tagDefinitions}. + * This helps to catch common mistakes such as a misspelled tag. + * + * @defaultValue `false` + */ + ignoreUndefinedTags: boolean; + /** + * Set `reportUnsupportedTags` to true to issue a warning for tags that are not + * supported by your tool. + * + * @remarks + * The TSDoc standard defines may tags. By default it assumes that if your tool does + * not implement one of these tags, then it will simply ignore it. But sometimes this + * may be misleading for developers. (For example, they might write an `@example` block + * and then be surprised if it doesn't appear in the documentation output.). + * + * For a better experience, you can tell the parser which tags you support, and then it + * will issue warnings wherever unsupported tags are used. This is done using + * {@link TSDocConfiguration.setSupportForTag}. Note that calling that function + * automatically sets `reportUnsupportedTags` to true. + * + * @defaultValue `false` + */ + reportUnsupportedTags: boolean; + /** + * Set `reportUnsupportedHtmlElements` to true to issue a warning for HTML elements which + * are not defined in your TSDoc configuration's `supportedHtmlElements` field. + * + * @defaultValue `false` + */ + reportUnsupportedHtmlElements: boolean; +} +//# sourceMappingURL=TSDocValidationConfiguration.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts.map b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3f1bd96a4d92c9a7c57e3681296c767c1ad7d331 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocValidationConfiguration.d.ts","sourceRoot":"","sources":["../../src/configuration/TSDocValidationConfiguration.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,4BAA4B;IACvC;;;;;;;;;;OAUG;IACI,mBAAmB,EAAE,OAAO,CAAS;IAE5C;;;;;;;;;;;;;;;;OAgBG;IACI,qBAAqB,EAAE,OAAO,CAAS;IAE9C;;;;;OAKG;IACI,6BAA6B,EAAE,OAAO,CAAS;CACvD"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js new file mode 100644 index 0000000000000000000000000000000000000000..92c8b0e75885801424014c5960086028f44cf32c --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +/** + * Part of the {@link TSDocConfiguration} object. + */ +export class TSDocValidationConfiguration { + constructor() { + /** + * Set `ignoreUndefinedTags` to true to silently ignore unrecognized tags, + * instead of reporting a warning. + * + * @remarks + * Normally the parser will issue errors when it encounters tag names that do not + * have a corresponding definition in {@link TSDocConfiguration.tagDefinitions}. + * This helps to catch common mistakes such as a misspelled tag. + * + * @defaultValue `false` + */ + this.ignoreUndefinedTags = false; + /** + * Set `reportUnsupportedTags` to true to issue a warning for tags that are not + * supported by your tool. + * + * @remarks + * The TSDoc standard defines may tags. By default it assumes that if your tool does + * not implement one of these tags, then it will simply ignore it. But sometimes this + * may be misleading for developers. (For example, they might write an `@example` block + * and then be surprised if it doesn't appear in the documentation output.). + * + * For a better experience, you can tell the parser which tags you support, and then it + * will issue warnings wherever unsupported tags are used. This is done using + * {@link TSDocConfiguration.setSupportForTag}. Note that calling that function + * automatically sets `reportUnsupportedTags` to true. + * + * @defaultValue `false` + */ + this.reportUnsupportedTags = false; + /** + * Set `reportUnsupportedHtmlElements` to true to issue a warning for HTML elements which + * are not defined in your TSDoc configuration's `supportedHtmlElements` field. + * + * @defaultValue `false` + */ + this.reportUnsupportedHtmlElements = false; + } +} +//# sourceMappingURL=TSDocValidationConfiguration.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js.map b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js.map new file mode 100644 index 0000000000000000000000000000000000000000..2410c06dd42f8d60d8e418a471f742a896c7ccda --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocValidationConfiguration.js","sourceRoot":"","sources":["../../src/configuration/TSDocValidationConfiguration.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D;;GAEG;AACH,MAAM,OAAO,4BAA4B;IAAzC;QACE;;;;;;;;;;WAUG;QACI,wBAAmB,GAAY,KAAK,CAAC;QAE5C;;;;;;;;;;;;;;;;WAgBG;QACI,0BAAqB,GAAY,KAAK,CAAC;QAE9C;;;;;WAKG;QACI,kCAA6B,GAAY,KAAK,CAAC;IACxD,CAAC;CAAA","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\n/**\r\n * Part of the {@link TSDocConfiguration} object.\r\n */\r\nexport class TSDocValidationConfiguration {\r\n /**\r\n * Set `ignoreUndefinedTags` to true to silently ignore unrecognized tags,\r\n * instead of reporting a warning.\r\n *\r\n * @remarks\r\n * Normally the parser will issue errors when it encounters tag names that do not\r\n * have a corresponding definition in {@link TSDocConfiguration.tagDefinitions}.\r\n * This helps to catch common mistakes such as a misspelled tag.\r\n *\r\n * @defaultValue `false`\r\n */\r\n public ignoreUndefinedTags: boolean = false;\r\n\r\n /**\r\n * Set `reportUnsupportedTags` to true to issue a warning for tags that are not\r\n * supported by your tool.\r\n *\r\n * @remarks\r\n * The TSDoc standard defines may tags. By default it assumes that if your tool does\r\n * not implement one of these tags, then it will simply ignore it. But sometimes this\r\n * may be misleading for developers. (For example, they might write an `@example` block\r\n * and then be surprised if it doesn't appear in the documentation output.).\r\n *\r\n * For a better experience, you can tell the parser which tags you support, and then it\r\n * will issue warnings wherever unsupported tags are used. This is done using\r\n * {@link TSDocConfiguration.setSupportForTag}. Note that calling that function\r\n * automatically sets `reportUnsupportedTags` to true.\r\n *\r\n * @defaultValue `false`\r\n */\r\n public reportUnsupportedTags: boolean = false;\r\n\r\n /**\r\n * Set `reportUnsupportedHtmlElements` to true to issue a warning for HTML elements which\r\n * are not defined in your TSDoc configuration's `supportedHtmlElements` field.\r\n *\r\n * @defaultValue `false`\r\n */\r\n public reportUnsupportedHtmlElements: boolean = false;\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6500584e8e162da68c97a3ef2ab2d54a1c889c3d --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts @@ -0,0 +1,44 @@ +import type { DocBlockTag } from '../nodes/DocBlockTag'; +import { type TSDocTagDefinition } from '../configuration/TSDocTagDefinition'; +/** + * Represents a set of modifier tags that were extracted from a doc comment. + * + * @remarks + * TSDoc modifier tags are block tags that do not have any associated rich text content. + * Instead, their presence or absence acts as an on/off switch, indicating some aspect + * of the underlying API item. For example, the `@internal` modifier indicates that a + * signature is internal (i.e. not part of the public API contract). + */ +export declare class ModifierTagSet { + private readonly _nodes; + private readonly _nodesByName; + /** + * The original block tag nodes that defined the modifiers in this set, excluding duplicates. + */ + get nodes(): ReadonlyArray; + /** + * Returns true if the set contains a DocBlockTag with the specified tag name. + * Note that synonyms are not considered. The comparison is case-insensitive. + * @param modifierTagName - The name of the tag, including the `@` prefix For example, `@internal` + */ + hasTagName(modifierTagName: string): boolean; + /** + * Returns true if the set contains a DocBlockTag matching the specified tag definition. + * Note that synonyms are not considered. The comparison is case-insensitive. + * The TSDocTagDefinition must be a modifier tag. + * @param tagName - The name of the tag, including the `@` prefix For example, `@internal` + */ + hasTag(modifierTagDefinition: TSDocTagDefinition): boolean; + /** + * Returns a DocBlockTag matching the specified tag definition, or undefined if no such + * tag was added to the set. If there were multiple instances, returned object will be + * the first one to be added. + */ + tryGetTag(modifierTagDefinition: TSDocTagDefinition): DocBlockTag | undefined; + /** + * Adds a new modifier tag to the set. If a tag already exists with the same name, + * then no change is made, and the return value is false. + */ + addTag(blockTag: DocBlockTag): boolean; +} +//# sourceMappingURL=ModifierTagSet.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts.map b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..d0545b7da647f0386dade4dc41070e7c3c52e71e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ModifierTagSet.d.ts","sourceRoot":"","sources":["../../src/details/ModifierTagSet.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,qCAAqC,CAAC;AAElG;;;;;;;;GAQG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAK5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4D;IAEzF;;OAEG;IACH,IAAW,KAAK,IAAI,aAAa,CAAC,WAAW,CAAC,CAE7C;IAED;;;;OAIG;IACI,UAAU,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO;IAInD;;;;;OAKG;IACI,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,GAAG,OAAO;IAIjE;;;;OAIG;IACI,SAAS,CAAC,qBAAqB,EAAE,kBAAkB,GAAG,WAAW,GAAG,SAAS;IAOpF;;;OAGG;IACI,MAAM,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO;CAU9C"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js new file mode 100644 index 0000000000000000000000000000000000000000..d94b238bddb116ae206311e71d1c751988613c39 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { TSDocTagSyntaxKind } from '../configuration/TSDocTagDefinition'; +/** + * Represents a set of modifier tags that were extracted from a doc comment. + * + * @remarks + * TSDoc modifier tags are block tags that do not have any associated rich text content. + * Instead, their presence or absence acts as an on/off switch, indicating some aspect + * of the underlying API item. For example, the `@internal` modifier indicates that a + * signature is internal (i.e. not part of the public API contract). + */ +export class ModifierTagSet { + constructor() { + this._nodes = []; + // NOTE: To implement case insensitivity, the keys in this set are always upper-case. + // This convention makes the normalization more obvious (and as a general practice handles + // the Turkish "i" character correctly). + this._nodesByName = new Map(); + } + /** + * The original block tag nodes that defined the modifiers in this set, excluding duplicates. + */ + get nodes() { + return this._nodes; + } + /** + * Returns true if the set contains a DocBlockTag with the specified tag name. + * Note that synonyms are not considered. The comparison is case-insensitive. + * @param modifierTagName - The name of the tag, including the `@` prefix For example, `@internal` + */ + hasTagName(modifierTagName) { + return this._nodesByName.has(modifierTagName.toUpperCase()); + } + /** + * Returns true if the set contains a DocBlockTag matching the specified tag definition. + * Note that synonyms are not considered. The comparison is case-insensitive. + * The TSDocTagDefinition must be a modifier tag. + * @param tagName - The name of the tag, including the `@` prefix For example, `@internal` + */ + hasTag(modifierTagDefinition) { + return !!this.tryGetTag(modifierTagDefinition); + } + /** + * Returns a DocBlockTag matching the specified tag definition, or undefined if no such + * tag was added to the set. If there were multiple instances, returned object will be + * the first one to be added. + */ + tryGetTag(modifierTagDefinition) { + if (modifierTagDefinition.syntaxKind !== TSDocTagSyntaxKind.ModifierTag) { + throw new Error('The tag definition is not a modifier tag'); + } + return this._nodesByName.get(modifierTagDefinition.tagNameWithUpperCase); + } + /** + * Adds a new modifier tag to the set. If a tag already exists with the same name, + * then no change is made, and the return value is false. + */ + addTag(blockTag) { + if (this._nodesByName.has(blockTag.tagNameWithUpperCase)) { + return false; + } + this._nodesByName.set(blockTag.tagNameWithUpperCase, blockTag); + this._nodes.push(blockTag); + return true; + } +} +//# sourceMappingURL=ModifierTagSet.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js.map b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..918affa584982d7716cc1831ce439b8413fa5c3e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ModifierTagSet.js","sourceRoot":"","sources":["../../src/details/ModifierTagSet.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAG3D,OAAO,EAA2B,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAElG;;;;;;;;GAQG;AACH,MAAM,OAAO,cAAc;IAA3B;QACmB,WAAM,GAAkB,EAAE,CAAC;QAE5C,qFAAqF;QACrF,0FAA0F;QAC1F,wCAAwC;QACvB,iBAAY,GAA6B,IAAI,GAAG,EAAuB,CAAC;IAsD3F,CAAC;IApDC;;OAEG;IACH,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,eAAuB;QACvC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,qBAAyC;QACrD,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,qBAAyC;QACxD,IAAI,qBAAqB,CAAC,UAAU,KAAK,kBAAkB,CAAC,WAAW,EAAE,CAAC;YACxE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAqB;QACjC,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACzD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE3B,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport type { DocBlockTag } from '../nodes/DocBlockTag';\r\nimport { type TSDocTagDefinition, TSDocTagSyntaxKind } from '../configuration/TSDocTagDefinition';\r\n\r\n/**\r\n * Represents a set of modifier tags that were extracted from a doc comment.\r\n *\r\n * @remarks\r\n * TSDoc modifier tags are block tags that do not have any associated rich text content.\r\n * Instead, their presence or absence acts as an on/off switch, indicating some aspect\r\n * of the underlying API item. For example, the `@internal` modifier indicates that a\r\n * signature is internal (i.e. not part of the public API contract).\r\n */\r\nexport class ModifierTagSet {\r\n private readonly _nodes: DocBlockTag[] = [];\r\n\r\n // NOTE: To implement case insensitivity, the keys in this set are always upper-case.\r\n // This convention makes the normalization more obvious (and as a general practice handles\r\n // the Turkish \"i\" character correctly).\r\n private readonly _nodesByName: Map = new Map();\r\n\r\n /**\r\n * The original block tag nodes that defined the modifiers in this set, excluding duplicates.\r\n */\r\n public get nodes(): ReadonlyArray {\r\n return this._nodes;\r\n }\r\n\r\n /**\r\n * Returns true if the set contains a DocBlockTag with the specified tag name.\r\n * Note that synonyms are not considered. The comparison is case-insensitive.\r\n * @param modifierTagName - The name of the tag, including the `@` prefix For example, `@internal`\r\n */\r\n public hasTagName(modifierTagName: string): boolean {\r\n return this._nodesByName.has(modifierTagName.toUpperCase());\r\n }\r\n\r\n /**\r\n * Returns true if the set contains a DocBlockTag matching the specified tag definition.\r\n * Note that synonyms are not considered. The comparison is case-insensitive.\r\n * The TSDocTagDefinition must be a modifier tag.\r\n * @param tagName - The name of the tag, including the `@` prefix For example, `@internal`\r\n */\r\n public hasTag(modifierTagDefinition: TSDocTagDefinition): boolean {\r\n return !!this.tryGetTag(modifierTagDefinition);\r\n }\r\n\r\n /**\r\n * Returns a DocBlockTag matching the specified tag definition, or undefined if no such\r\n * tag was added to the set. If there were multiple instances, returned object will be\r\n * the first one to be added.\r\n */\r\n public tryGetTag(modifierTagDefinition: TSDocTagDefinition): DocBlockTag | undefined {\r\n if (modifierTagDefinition.syntaxKind !== TSDocTagSyntaxKind.ModifierTag) {\r\n throw new Error('The tag definition is not a modifier tag');\r\n }\r\n return this._nodesByName.get(modifierTagDefinition.tagNameWithUpperCase);\r\n }\r\n\r\n /**\r\n * Adds a new modifier tag to the set. If a tag already exists with the same name,\r\n * then no change is made, and the return value is false.\r\n */\r\n public addTag(blockTag: DocBlockTag): boolean {\r\n if (this._nodesByName.has(blockTag.tagNameWithUpperCase)) {\r\n return false;\r\n }\r\n\r\n this._nodesByName.set(blockTag.tagNameWithUpperCase, blockTag);\r\n this._nodes.push(blockTag);\r\n\r\n return true;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f4de3baa593f8308abcb0bc7eff7fda95f26a428 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts @@ -0,0 +1,52 @@ +import { ModifierTagSet } from './ModifierTagSet'; +/** + * Extends the ModifierTagSet base class with getters for modifiers that + * are part of the standardized core tags for TSDoc. + */ +export declare class StandardModifierTagSet extends ModifierTagSet { + /** + * Returns true if the `@alpha` modifier tag was specified. + */ + isAlpha(): boolean; + /** + * Returns true if the `@beta` modifier tag was specified. + */ + isBeta(): boolean; + /** + * Returns true if the `@eventProperty` modifier tag was specified. + */ + isEventProperty(): boolean; + /** + * Returns true if the `@experimental` modifier tag was specified. + */ + isExperimental(): boolean; + /** + * Returns true if the `@internal` modifier tag was specified. + */ + isInternal(): boolean; + /** + * Returns true if the `@override` modifier tag was specified. + */ + isOverride(): boolean; + /** + * Returns true if the `@packageDocumentation` modifier tag was specified. + */ + isPackageDocumentation(): boolean; + /** + * Returns true if the `@public` modifier tag was specified. + */ + isPublic(): boolean; + /** + * Returns true if the `@readonly` modifier tag was specified. + */ + isReadonly(): boolean; + /** + * Returns true if the `@sealed` modifier tag was specified. + */ + isSealed(): boolean; + /** + * Returns true if the `@virtual` modifier tag was specified. + */ + isVirtual(): boolean; +} +//# sourceMappingURL=StandardModifierTagSet.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts.map b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..8b4e4818215c8328fd8bbd2765dce7087759313b --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StandardModifierTagSet.d.ts","sourceRoot":"","sources":["../../src/details/StandardModifierTagSet.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;IACxD;;OAEG;IACI,OAAO,IAAI,OAAO;IAIzB;;OAEG;IACI,MAAM,IAAI,OAAO;IAIxB;;OAEG;IACI,eAAe,IAAI,OAAO;IAIjC;;OAEG;IACI,cAAc,IAAI,OAAO;IAIhC;;OAEG;IACI,UAAU,IAAI,OAAO;IAI5B;;OAEG;IACI,UAAU,IAAI,OAAO;IAI5B;;OAEG;IACI,sBAAsB,IAAI,OAAO;IAIxC;;OAEG;IACI,QAAQ,IAAI,OAAO;IAI1B;;OAEG;IACI,UAAU,IAAI,OAAO;IAI5B;;OAEG;IACI,QAAQ,IAAI,OAAO;IAI1B;;OAEG;IACI,SAAS,IAAI,OAAO;CAG5B"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js new file mode 100644 index 0000000000000000000000000000000000000000..0f379b8bbd6c69556fc235247bb290f0cb97a581 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { ModifierTagSet } from './ModifierTagSet'; +import { StandardTags } from './StandardTags'; +/** + * Extends the ModifierTagSet base class with getters for modifiers that + * are part of the standardized core tags for TSDoc. + */ +export class StandardModifierTagSet extends ModifierTagSet { + /** + * Returns true if the `@alpha` modifier tag was specified. + */ + isAlpha() { + return this.hasTag(StandardTags.alpha); + } + /** + * Returns true if the `@beta` modifier tag was specified. + */ + isBeta() { + return this.hasTag(StandardTags.beta); + } + /** + * Returns true if the `@eventProperty` modifier tag was specified. + */ + isEventProperty() { + return this.hasTag(StandardTags.eventProperty); + } + /** + * Returns true if the `@experimental` modifier tag was specified. + */ + isExperimental() { + return this.hasTag(StandardTags.experimental); + } + /** + * Returns true if the `@internal` modifier tag was specified. + */ + isInternal() { + return this.hasTag(StandardTags.internal); + } + /** + * Returns true if the `@override` modifier tag was specified. + */ + isOverride() { + return this.hasTag(StandardTags.override); + } + /** + * Returns true if the `@packageDocumentation` modifier tag was specified. + */ + isPackageDocumentation() { + return this.hasTag(StandardTags.packageDocumentation); + } + /** + * Returns true if the `@public` modifier tag was specified. + */ + isPublic() { + return this.hasTag(StandardTags.public); + } + /** + * Returns true if the `@readonly` modifier tag was specified. + */ + isReadonly() { + return this.hasTag(StandardTags.readonly); + } + /** + * Returns true if the `@sealed` modifier tag was specified. + */ + isSealed() { + return this.hasTag(StandardTags.sealed); + } + /** + * Returns true if the `@virtual` modifier tag was specified. + */ + isVirtual() { + return this.hasTag(StandardTags.virtual); + } +} +//# sourceMappingURL=StandardModifierTagSet.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js.map b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js.map new file mode 100644 index 0000000000000000000000000000000000000000..32cf9b5d809b25ba82425c091a77571474fbd7ef --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StandardModifierTagSet.js","sourceRoot":"","sources":["../../src/details/StandardModifierTagSet.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,cAAc;IACxD;;OAEG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACI,eAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACI,UAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACI,UAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACI,sBAAsB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,UAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { ModifierTagSet } from './ModifierTagSet';\r\nimport { StandardTags } from './StandardTags';\r\n\r\n/**\r\n * Extends the ModifierTagSet base class with getters for modifiers that\r\n * are part of the standardized core tags for TSDoc.\r\n */\r\nexport class StandardModifierTagSet extends ModifierTagSet {\r\n /**\r\n * Returns true if the `@alpha` modifier tag was specified.\r\n */\r\n public isAlpha(): boolean {\r\n return this.hasTag(StandardTags.alpha);\r\n }\r\n\r\n /**\r\n * Returns true if the `@beta` modifier tag was specified.\r\n */\r\n public isBeta(): boolean {\r\n return this.hasTag(StandardTags.beta);\r\n }\r\n\r\n /**\r\n * Returns true if the `@eventProperty` modifier tag was specified.\r\n */\r\n public isEventProperty(): boolean {\r\n return this.hasTag(StandardTags.eventProperty);\r\n }\r\n\r\n /**\r\n * Returns true if the `@experimental` modifier tag was specified.\r\n */\r\n public isExperimental(): boolean {\r\n return this.hasTag(StandardTags.experimental);\r\n }\r\n\r\n /**\r\n * Returns true if the `@internal` modifier tag was specified.\r\n */\r\n public isInternal(): boolean {\r\n return this.hasTag(StandardTags.internal);\r\n }\r\n\r\n /**\r\n * Returns true if the `@override` modifier tag was specified.\r\n */\r\n public isOverride(): boolean {\r\n return this.hasTag(StandardTags.override);\r\n }\r\n\r\n /**\r\n * Returns true if the `@packageDocumentation` modifier tag was specified.\r\n */\r\n public isPackageDocumentation(): boolean {\r\n return this.hasTag(StandardTags.packageDocumentation);\r\n }\r\n\r\n /**\r\n * Returns true if the `@public` modifier tag was specified.\r\n */\r\n public isPublic(): boolean {\r\n return this.hasTag(StandardTags.public);\r\n }\r\n\r\n /**\r\n * Returns true if the `@readonly` modifier tag was specified.\r\n */\r\n public isReadonly(): boolean {\r\n return this.hasTag(StandardTags.readonly);\r\n }\r\n\r\n /**\r\n * Returns true if the `@sealed` modifier tag was specified.\r\n */\r\n public isSealed(): boolean {\r\n return this.hasTag(StandardTags.sealed);\r\n }\r\n\r\n /**\r\n * Returns true if the `@virtual` modifier tag was specified.\r\n */\r\n public isVirtual(): boolean {\r\n return this.hasTag(StandardTags.virtual);\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..9a7193ead4ee43682282e786a69a38f09cada5f1 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts @@ -0,0 +1,400 @@ +import { TSDocTagDefinition } from '../configuration/TSDocTagDefinition'; +/** + * Tags whose meaning is defined by the TSDoc standard. + */ +export declare class StandardTags { + /** + * (Discretionary) + * + * Suggested meaning: Designates that an API item's release stage is "alpha". + * It is intended to be used by third-party developers eventually, but has not + * yet been released. The tooling may trim the declaration from a public release. + * + * @remarks + * Example implementations: API Extractor + */ + static readonly alpha: TSDocTagDefinition; + /** + * (Discretionary) + * + * Suggested meaning: Designates that an API item's release stage is "beta". + * It has been released to third-party developers experimentally for the purpose of + * collecting feedback. The API should not be used in production, because its contract may + * change without notice. The tooling may trim the declaration from a public release, + * but may include it in a developer preview release. + * + * @remarks + * Example implementations: API Extractor + * + * Synonyms: `@experimental` + */ + static readonly beta: TSDocTagDefinition; + /** + * (Extended) + * + * ECMAScript decorators are sometimes an important part of an API contract. + * However, today the TypeScript compiler does not represent decorators in the + * .d.ts output files used by API consumers. The `@decorator` tag provides a workaround, + * enabling a decorator expressions to be quoted in a doc comment. + * + * @example + * ```ts + * class Book { + * /** + * * The title of the book. + * * @decorator `@jsonSerialized` + * * @decorator `@jsonFormat(JsonFormats.Url)` + * * + *+/ + * @jsonSerialized + * @jsonFormat(JsonFormats.Url) + * public website: string; + * } + * ``` + */ + static readonly decorator: TSDocTagDefinition; + /** + * (Extended) + * + * This block tag is used to document the default value for a field or property, + * if a value is not assigned explicitly. + * + * @remarks + * This tag should only be used with fields or properties that are members of a class or interface. + */ + static readonly defaultValue: TSDocTagDefinition; + /** + * (Core) + * + * This block tag communicates that an API item is no longer supported and may be removed + * in a future release. The `@deprecated` tag is followed by a sentence describing + * the recommended alternative. It recursively applies to members of the container. + * For example, if a class is deprecated, then so are all of its members. + */ + static readonly deprecated: TSDocTagDefinition; + /** + * (Extended) + * + * When applied to a class or interface property, this indicates that the property + * returns an event object that event handlers can be attached to. The event-handling + * API is implementation-defined, but typically the property return type would be a class + * with members such as `addHandler()` and `removeHandler()`. A documentation tool can + * display such properties under an "Events" heading instead of the usual "Properties" heading. + */ + static readonly eventProperty: TSDocTagDefinition; + /** + * (Extended) + * + * Indicates a documentation section that should be presented as an example + * illustrating how to use the API. It may include a code sample. + */ + static readonly example: TSDocTagDefinition; + /** + * (Discretionary) + * + * Suggested meaning: Same semantics as `@beta`, but used by tools that don't support + * an `@alpha` release stage. + * + * @remarks + * Example implementations: Angular API documenter + * + * Synonyms: `@beta` + */ + static readonly experimental: TSDocTagDefinition; + /** + * (Extended) + * + * This inline tag is used to automatically generate an API item's documentation by + * copying it from another API item. The inline tag parameter contains a reference + * to the other item, which may be an unrelated class, or even an import from a + * separate NPM package. + * + * @remarks + * What gets copied + * + * The `@inheritDoc` tag does not copy the entire comment body. Only the following + * components are copied: + * - summary section + * - `@remarks` block + * - `@params` blocks + * - `@typeParam` blocks + * - `@returns` block + * Other tags such as `@defaultValue` or `@example` are not copied, and need to be + * explicitly included after the `@inheritDoc` tag. + * + * TODO: The notation for API item references is still being standardized. See this issue: + * https://github.com/microsoft/tsdoc/issues/9 + */ + static readonly inheritDoc: TSDocTagDefinition; + /** + * (Discretionary) + * + * Suggested meaning: Designates that an API item is not planned to be used by + * third-party developers. The tooling may trim the declaration from a public release. + * In some implementations, certain designated packages may be allowed to consume + * internal API items, e.g. because the packages are components of the same product. + * + * @remarks + * Example implementations: API Extractor + */ + static readonly internal: TSDocTagDefinition; + /** + * (Core) + * + * The `{@label}` inline tag is used to label a declaration, so that it can be referenced + * using a selector in the TSDoc declaration reference notation. + * + * @remarks + * TODO: The `{@label}` notation is still being standardized. See this issue: + * https://github.com/microsoft/tsdoc/issues/9 + */ + static readonly label: TSDocTagDefinition; + /** + * (Core) + * + * The `{@link}` inline tag is used to create hyperlinks to other pages in a + * documentation system or general internet URLs. In particular, it supports + * expressions for referencing API items. + * + * @remarks + * TODO: The `{@link}` notation is still being standardized. See this issue: + * https://github.com/microsoft/tsdoc/issues/9 + */ + static readonly link: TSDocTagDefinition; + /** + * (Extended) + * + * This modifier has similar semantics to the `override` keyword in C# or Java. + * For a member function or property, explicitly indicates that this definition + * is overriding (i.e. redefining) the definition inherited from the base class. + * The base class definition would normally be marked as `virtual`. + * + * @remarks + * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed` + * modifiers are consistently applied, but this is not required by the TSDoc standard. + */ + static readonly override: TSDocTagDefinition; + /** + * (Core) + * + * Used to indicate a doc comment that describes an entire NPM package (as opposed + * to an individual API item belonging to that package). The `@packageDocumentation` comment + * is found in the *.d.ts file that acts as the entry point for the package, and it + * should be the first `/**` comment encountered in that file. A comment containing a + * `@packageDocumentation` tag should never be used to describe an individual API item. + */ + static readonly packageDocumentation: TSDocTagDefinition; + /** + * (Core) + * + * Used to document a function parameter. The `@param` tag is followed by a parameter + * name, followed by a hyphen, followed by a description. The TSDoc parser recognizes + * this syntax and will extract it into a DocParamBlock node. + */ + static readonly param: TSDocTagDefinition; + /** + * (Core) + * + * Starts a section of additional documentation content that is not intended for a + * public audience. A tool must omit this entire section from the API reference web site, + * generated *.d.ts file, and any other outputs incorporating the content. + */ + static readonly privateRemarks: TSDocTagDefinition; + /** + * (Discretionary) + * + * Suggested meaning: Designates that an API item's release stage is "public". + * It has been officially released to third-party developers, and its signature is + * guaranteed to be stable (e.g. following Semantic Versioning rules). + * + * @remarks + * Example implementations: API Extractor + */ + static readonly public: TSDocTagDefinition; + /** + * (Extended) + * + * This modifier tag indicates that an API item should be documented as being read-only, + * even if the TypeScript type system may indicate otherwise. For example, suppose a + * class property has a setter function that always throws an exception explaining that + * the property cannot be assigned; in this situation, the `@readonly` modifier can be + * added so that the property is shown as read-only in the documentation. + * + * @remarks + * Example implementations: API Extractor + */ + static readonly readonly: TSDocTagDefinition; + /** + * (Core) + * + * The main documentation for an API item is separated into a brief "summary" section, + * optionally followed by a more detailed "remarks" section. On a documentation web site, + * index pages (e.g. showing members of a class) will show only the brief summaries, + * whereas a detail pages (e.g. describing a single member) will show the summary followed + * by the remarks. The `@remarks` block tag ends the summary section, and begins the + * remarks section for a doc comment. + */ + static readonly remarks: TSDocTagDefinition; + /** + * (Core) + * + * Used to document the return value for a function. + */ + static readonly returns: TSDocTagDefinition; + /** + * (Extended) + * + * This modifier has similar semantics to the `sealed` keyword in C# or Java. + * For a class, indicates that subclasses must not inherit from the class. + * For a member function or property, indicates that subclasses must not override + * (i.e. redefine) the member. + * + * @remarks + * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed` + * modifiers are consistently applied, but this is not required by the TSDoc standard. + */ + static readonly sealed: TSDocTagDefinition; + /** + * (Extended) + * + * Used to build a list of references to an API item or other resource that may be related to the + * current item. + * + * @remarks + * + * For example: + * + * ```ts + * /** + * * Parses a string containing a Uniform Resource Locator (URL). + * * @see {@link ParsedUrl} for the returned data structure + * * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738} + * * for syntax + * * @see your developer SDK for code samples + * * @param url - the string to be parsed + * * @returns the parsed result + * */ + * function parseURL(url: string): ParsedUrl; + * ``` + * + * `@see` is a block tag. Each block becomes an item in the list of references. For example, a documentation + * system might render the above blocks as follows: + * + * ```markdown + * `function parseURL(url: string): ParsedUrl;` + * + * Parses a string containing a Uniform Resource Locator (URL). + * + * ## See Also + * - ParsedUrl for the returned data structure + * - RFC 1738 for syntax + * - your developer SDK for code samples + * ``` + * + * NOTE: JSDoc attempts to automatically hyperlink the text immediately after `@see`. Because this is ambiguous + * with plain text, TSDoc instead requires an explicit `{@link}` tag to make hyperlinks. + */ + static readonly see: TSDocTagDefinition; + /** + * (Extended) + * + * Used to document an exception type that may be thrown by a function or property. + * + * @remarks + * + * A separate `@throws` block should be used to document each exception type. This tag is for informational + * purposes only, and does not restrict other types from being thrown. It is suggested, but not required, + * for the `@throws` block to start with a line containing only the name of the exception. + * + * For example: + * + * ```ts + * /** + * * Retrieves metadata about a book from the catalog. + * * + * * @param isbnCode - the ISBN number for the book + * * @returns the retrieved book object + * * + * * @throws {@link IsbnSyntaxError} + * * This exception is thrown if the input is not a valid ISBN number. + * * + * * @throws {@link book-lib#BookNotFoundError} + * * Thrown if the ISBN number is valid, but no such book exists in the catalog. + * * + * * @public + * */ + * function fetchBookByIsbn(isbnCode: string): Book; + * ``` + */ + static readonly throws: TSDocTagDefinition; + /** + * (Core) + * + * Used to document a generic parameter. The `@typeParam` tag is followed by a parameter + * name, followed by a hyphen, followed by a description. The TSDoc parser recognizes + * this syntax and will extract it into a DocParamBlock node. + */ + static readonly typeParam: TSDocTagDefinition; + /** + * (Extended) + * + * This modifier has similar semantics to the `virtual` keyword in C# or Java. + * For a member function or property, explicitly indicates that subclasses may override + * (i.e. redefine) the member. + * + * @remarks + * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed` + * modifiers are consistently applied, but this is not required by the TSDoc standard. + */ + static readonly virtual: TSDocTagDefinition; + /** + * (Extended) + * + * Used to specify the JSX factory function to use when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ + static readonly jsx: TSDocTagDefinition; + /** + * (Extended) + * + * Used to specify the JSX runtime to use when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ + static readonly jsxRuntime: TSDocTagDefinition; + /** + * (Extended) + * + * Used to specify the JSX fragment factory to use when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ + static readonly jsxFrag: TSDocTagDefinition; + /** + * (Extended) + * + * Used to specify the JSX import source when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ + static readonly jsxImportSource: TSDocTagDefinition; + /** + * Returns the full list of all core tags. + */ + static allDefinitions: ReadonlyArray; + private static _defineTag; +} +//# sourceMappingURL=StandardTags.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts.map b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..2ef9d58eae25b606e725687972c4edda3bdd25f3 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StandardTags.d.ts","sourceRoot":"","sources":["../../src/details/StandardTags.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAGnB,MAAM,qCAAqC,CAAC;AAG7C;;GAEG;AACH,qBAAa,YAAY;IACvB;;;;;;;;;OASG;IACH,gBAAuB,KAAK,EAAE,kBAAkB,CAI7C;IAEH;;;;;;;;;;;;;OAaG;IACH,gBAAuB,IAAI,EAAE,kBAAkB,CAI5C;IAEH;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,gBAAuB,SAAS,EAAE,kBAAkB,CAKjD;IAEH;;;;;;;;OAQG;IACH,gBAAuB,YAAY,EAAE,kBAAkB,CAIpD;IAEH;;;;;;;OAOG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAIlD;IAEH;;;;;;;;OAQG;IACH,gBAAuB,aAAa,EAAE,kBAAkB,CAIrD;IAEH;;;;;OAKG;IACH,gBAAuB,OAAO,EAAE,kBAAkB,CAK/C;IAEH;;;;;;;;;;OAUG;IACH,gBAAuB,YAAY,EAAE,kBAAkB,CAIpD;IAEH;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAIlD;IAEH;;;;;;;;;;OAUG;IACH,gBAAuB,QAAQ,EAAE,kBAAkB,CAIhD;IAEH;;;;;;;;;OASG;IACH,gBAAuB,KAAK,EAAE,kBAAkB,CAI7C;IAEH;;;;;;;;;;OAUG;IACH,gBAAuB,IAAI,EAAE,kBAAkB,CAK5C;IAEH;;;;;;;;;;;OAWG;IACH,gBAAuB,QAAQ,EAAE,kBAAkB,CAIhD;IAEH;;;;;;;;OAQG;IACH,gBAAuB,oBAAoB,EAAE,kBAAkB,CAI5D;IAEH;;;;;;OAMG;IACH,gBAAuB,KAAK,EAAE,kBAAkB,CAK7C;IAEH;;;;;;OAMG;IACH,gBAAuB,cAAc,EAAE,kBAAkB,CAItD;IAEH;;;;;;;;;OASG;IACH,gBAAuB,MAAM,EAAE,kBAAkB,CAI9C;IAEH;;;;;;;;;;;OAWG;IACH,gBAAuB,QAAQ,EAAE,kBAAkB,CAIhD;IAEH;;;;;;;;;OASG;IACH,gBAAuB,OAAO,EAAE,kBAAkB,CAI/C;IAEH;;;;OAIG;IACH,gBAAuB,OAAO,EAAE,kBAAkB,CAI/C;IAEH;;;;;;;;;;;OAWG;IACH,gBAAuB,MAAM,EAAE,kBAAkB,CAI9C;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,gBAAuB,GAAG,EAAE,kBAAkB,CAI3C;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAuB,MAAM,EAAE,kBAAkB,CAK9C;IAEH;;;;;;OAMG;IACH,gBAAuB,SAAS,EAAE,kBAAkB,CAKjD;IAEH;;;;;;;;;;OAUG;IACH,gBAAuB,OAAO,EAAE,kBAAkB,CAI/C;IAEH;;;;;;;;;OASG;IACH,gBAAuB,GAAG,EAAE,kBAAkB,CAI3C;IAEH;;;;;;;;;OASG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAIlD;IAEH;;;;;;;;;OASG;IACH,gBAAuB,OAAO,EAAE,kBAAkB,CAI/C;IAEH;;;;;;;;;OASG;IACH,gBAAuB,eAAe,EAAE,kBAAkB,CAIvD;IAEH;;OAEG;IACH,OAAc,cAAc,EAAE,aAAa,CAAC,kBAAkB,CAAC,CA8B7D;IAEF,OAAO,CAAC,MAAM,CAAC,UAAU;CAG1B"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardTags.js b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.js new file mode 100644 index 0000000000000000000000000000000000000000..27126c65f39741034c91f7187d1af661091ecb98 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.js @@ -0,0 +1,557 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { TSDocTagDefinition, TSDocTagSyntaxKind } from '../configuration/TSDocTagDefinition'; +import { Standardization } from './Standardization'; +/** + * Tags whose meaning is defined by the TSDoc standard. + */ +export class StandardTags { + static _defineTag(parameters) { + return new TSDocTagDefinition(parameters); + } +} +/** + * (Discretionary) + * + * Suggested meaning: Designates that an API item's release stage is "alpha". + * It is intended to be used by third-party developers eventually, but has not + * yet been released. The tooling may trim the declaration from a public release. + * + * @remarks + * Example implementations: API Extractor + */ +StandardTags.alpha = StandardTags._defineTag({ + tagName: '@alpha', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Discretionary +}); +/** + * (Discretionary) + * + * Suggested meaning: Designates that an API item's release stage is "beta". + * It has been released to third-party developers experimentally for the purpose of + * collecting feedback. The API should not be used in production, because its contract may + * change without notice. The tooling may trim the declaration from a public release, + * but may include it in a developer preview release. + * + * @remarks + * Example implementations: API Extractor + * + * Synonyms: `@experimental` + */ +StandardTags.beta = StandardTags._defineTag({ + tagName: '@beta', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Discretionary +}); +/** + * (Extended) + * + * ECMAScript decorators are sometimes an important part of an API contract. + * However, today the TypeScript compiler does not represent decorators in the + * .d.ts output files used by API consumers. The `@decorator` tag provides a workaround, + * enabling a decorator expressions to be quoted in a doc comment. + * + * @example + * ```ts + * class Book { + * /** + * * The title of the book. + * * @decorator `@jsonSerialized` + * * @decorator `@jsonFormat(JsonFormats.Url)` + * * + *+/ + * @jsonSerialized + * @jsonFormat(JsonFormats.Url) + * public website: string; + * } + * ``` + */ +StandardTags.decorator = StandardTags._defineTag({ + tagName: '@decorator', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + allowMultiple: true, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * This block tag is used to document the default value for a field or property, + * if a value is not assigned explicitly. + * + * @remarks + * This tag should only be used with fields or properties that are members of a class or interface. + */ +StandardTags.defaultValue = StandardTags._defineTag({ + tagName: '@defaultValue', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Extended +}); +/** + * (Core) + * + * This block tag communicates that an API item is no longer supported and may be removed + * in a future release. The `@deprecated` tag is followed by a sentence describing + * the recommended alternative. It recursively applies to members of the container. + * For example, if a class is deprecated, then so are all of its members. + */ +StandardTags.deprecated = StandardTags._defineTag({ + tagName: '@deprecated', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Core +}); +/** + * (Extended) + * + * When applied to a class or interface property, this indicates that the property + * returns an event object that event handlers can be attached to. The event-handling + * API is implementation-defined, but typically the property return type would be a class + * with members such as `addHandler()` and `removeHandler()`. A documentation tool can + * display such properties under an "Events" heading instead of the usual "Properties" heading. + */ +StandardTags.eventProperty = StandardTags._defineTag({ + tagName: '@eventProperty', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Indicates a documentation section that should be presented as an example + * illustrating how to use the API. It may include a code sample. + */ +StandardTags.example = StandardTags._defineTag({ + tagName: '@example', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + allowMultiple: true, + standardization: Standardization.Extended +}); +/** + * (Discretionary) + * + * Suggested meaning: Same semantics as `@beta`, but used by tools that don't support + * an `@alpha` release stage. + * + * @remarks + * Example implementations: Angular API documenter + * + * Synonyms: `@beta` + */ +StandardTags.experimental = StandardTags._defineTag({ + tagName: '@experimental', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Discretionary +}); +/** + * (Extended) + * + * This inline tag is used to automatically generate an API item's documentation by + * copying it from another API item. The inline tag parameter contains a reference + * to the other item, which may be an unrelated class, or even an import from a + * separate NPM package. + * + * @remarks + * What gets copied + * + * The `@inheritDoc` tag does not copy the entire comment body. Only the following + * components are copied: + * - summary section + * - `@remarks` block + * - `@params` blocks + * - `@typeParam` blocks + * - `@returns` block + * Other tags such as `@defaultValue` or `@example` are not copied, and need to be + * explicitly included after the `@inheritDoc` tag. + * + * TODO: The notation for API item references is still being standardized. See this issue: + * https://github.com/microsoft/tsdoc/issues/9 + */ +StandardTags.inheritDoc = StandardTags._defineTag({ + tagName: '@inheritDoc', + syntaxKind: TSDocTagSyntaxKind.InlineTag, + standardization: Standardization.Extended +}); +/** + * (Discretionary) + * + * Suggested meaning: Designates that an API item is not planned to be used by + * third-party developers. The tooling may trim the declaration from a public release. + * In some implementations, certain designated packages may be allowed to consume + * internal API items, e.g. because the packages are components of the same product. + * + * @remarks + * Example implementations: API Extractor + */ +StandardTags.internal = StandardTags._defineTag({ + tagName: '@internal', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Discretionary +}); +/** + * (Core) + * + * The `{@label}` inline tag is used to label a declaration, so that it can be referenced + * using a selector in the TSDoc declaration reference notation. + * + * @remarks + * TODO: The `{@label}` notation is still being standardized. See this issue: + * https://github.com/microsoft/tsdoc/issues/9 + */ +StandardTags.label = StandardTags._defineTag({ + tagName: '@label', + syntaxKind: TSDocTagSyntaxKind.InlineTag, + standardization: Standardization.Core +}); +/** + * (Core) + * + * The `{@link}` inline tag is used to create hyperlinks to other pages in a + * documentation system or general internet URLs. In particular, it supports + * expressions for referencing API items. + * + * @remarks + * TODO: The `{@link}` notation is still being standardized. See this issue: + * https://github.com/microsoft/tsdoc/issues/9 + */ +StandardTags.link = StandardTags._defineTag({ + tagName: '@link', + syntaxKind: TSDocTagSyntaxKind.InlineTag, + allowMultiple: true, + standardization: Standardization.Core +}); +/** + * (Extended) + * + * This modifier has similar semantics to the `override` keyword in C# or Java. + * For a member function or property, explicitly indicates that this definition + * is overriding (i.e. redefining) the definition inherited from the base class. + * The base class definition would normally be marked as `virtual`. + * + * @remarks + * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed` + * modifiers are consistently applied, but this is not required by the TSDoc standard. + */ +StandardTags.override = StandardTags._defineTag({ + tagName: '@override', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Extended +}); +/** + * (Core) + * + * Used to indicate a doc comment that describes an entire NPM package (as opposed + * to an individual API item belonging to that package). The `@packageDocumentation` comment + * is found in the *.d.ts file that acts as the entry point for the package, and it + * should be the first `/**` comment encountered in that file. A comment containing a + * `@packageDocumentation` tag should never be used to describe an individual API item. + */ +StandardTags.packageDocumentation = StandardTags._defineTag({ + tagName: '@packageDocumentation', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Core +}); +/** + * (Core) + * + * Used to document a function parameter. The `@param` tag is followed by a parameter + * name, followed by a hyphen, followed by a description. The TSDoc parser recognizes + * this syntax and will extract it into a DocParamBlock node. + */ +StandardTags.param = StandardTags._defineTag({ + tagName: '@param', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + allowMultiple: true, + standardization: Standardization.Core +}); +/** + * (Core) + * + * Starts a section of additional documentation content that is not intended for a + * public audience. A tool must omit this entire section from the API reference web site, + * generated *.d.ts file, and any other outputs incorporating the content. + */ +StandardTags.privateRemarks = StandardTags._defineTag({ + tagName: '@privateRemarks', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Core +}); +/** + * (Discretionary) + * + * Suggested meaning: Designates that an API item's release stage is "public". + * It has been officially released to third-party developers, and its signature is + * guaranteed to be stable (e.g. following Semantic Versioning rules). + * + * @remarks + * Example implementations: API Extractor + */ +StandardTags.public = StandardTags._defineTag({ + tagName: '@public', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Discretionary +}); +/** + * (Extended) + * + * This modifier tag indicates that an API item should be documented as being read-only, + * even if the TypeScript type system may indicate otherwise. For example, suppose a + * class property has a setter function that always throws an exception explaining that + * the property cannot be assigned; in this situation, the `@readonly` modifier can be + * added so that the property is shown as read-only in the documentation. + * + * @remarks + * Example implementations: API Extractor + */ +StandardTags.readonly = StandardTags._defineTag({ + tagName: '@readonly', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Extended +}); +/** + * (Core) + * + * The main documentation for an API item is separated into a brief "summary" section, + * optionally followed by a more detailed "remarks" section. On a documentation web site, + * index pages (e.g. showing members of a class) will show only the brief summaries, + * whereas a detail pages (e.g. describing a single member) will show the summary followed + * by the remarks. The `@remarks` block tag ends the summary section, and begins the + * remarks section for a doc comment. + */ +StandardTags.remarks = StandardTags._defineTag({ + tagName: '@remarks', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Core +}); +/** + * (Core) + * + * Used to document the return value for a function. + */ +StandardTags.returns = StandardTags._defineTag({ + tagName: '@returns', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Core +}); +/** + * (Extended) + * + * This modifier has similar semantics to the `sealed` keyword in C# or Java. + * For a class, indicates that subclasses must not inherit from the class. + * For a member function or property, indicates that subclasses must not override + * (i.e. redefine) the member. + * + * @remarks + * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed` + * modifiers are consistently applied, but this is not required by the TSDoc standard. + */ +StandardTags.sealed = StandardTags._defineTag({ + tagName: '@sealed', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Used to build a list of references to an API item or other resource that may be related to the + * current item. + * + * @remarks + * + * For example: + * + * ```ts + * /** + * * Parses a string containing a Uniform Resource Locator (URL). + * * @see {@link ParsedUrl} for the returned data structure + * * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738} + * * for syntax + * * @see your developer SDK for code samples + * * @param url - the string to be parsed + * * @returns the parsed result + * */ + * function parseURL(url: string): ParsedUrl; + * ``` + * + * `@see` is a block tag. Each block becomes an item in the list of references. For example, a documentation + * system might render the above blocks as follows: + * + * ```markdown + * `function parseURL(url: string): ParsedUrl;` + * + * Parses a string containing a Uniform Resource Locator (URL). + * + * ## See Also + * - ParsedUrl for the returned data structure + * - RFC 1738 for syntax + * - your developer SDK for code samples + * ``` + * + * NOTE: JSDoc attempts to automatically hyperlink the text immediately after `@see`. Because this is ambiguous + * with plain text, TSDoc instead requires an explicit `{@link}` tag to make hyperlinks. + */ +StandardTags.see = StandardTags._defineTag({ + tagName: '@see', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Used to document an exception type that may be thrown by a function or property. + * + * @remarks + * + * A separate `@throws` block should be used to document each exception type. This tag is for informational + * purposes only, and does not restrict other types from being thrown. It is suggested, but not required, + * for the `@throws` block to start with a line containing only the name of the exception. + * + * For example: + * + * ```ts + * /** + * * Retrieves metadata about a book from the catalog. + * * + * * @param isbnCode - the ISBN number for the book + * * @returns the retrieved book object + * * + * * @throws {@link IsbnSyntaxError} + * * This exception is thrown if the input is not a valid ISBN number. + * * + * * @throws {@link book-lib#BookNotFoundError} + * * Thrown if the ISBN number is valid, but no such book exists in the catalog. + * * + * * @public + * */ + * function fetchBookByIsbn(isbnCode: string): Book; + * ``` + */ +StandardTags.throws = StandardTags._defineTag({ + tagName: '@throws', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + allowMultiple: true, + standardization: Standardization.Extended +}); +/** + * (Core) + * + * Used to document a generic parameter. The `@typeParam` tag is followed by a parameter + * name, followed by a hyphen, followed by a description. The TSDoc parser recognizes + * this syntax and will extract it into a DocParamBlock node. + */ +StandardTags.typeParam = StandardTags._defineTag({ + tagName: '@typeParam', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + allowMultiple: true, + standardization: Standardization.Core +}); +/** + * (Extended) + * + * This modifier has similar semantics to the `virtual` keyword in C# or Java. + * For a member function or property, explicitly indicates that subclasses may override + * (i.e. redefine) the member. + * + * @remarks + * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed` + * modifiers are consistently applied, but this is not required by the TSDoc standard. + */ +StandardTags.virtual = StandardTags._defineTag({ + tagName: '@virtual', + syntaxKind: TSDocTagSyntaxKind.ModifierTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Used to specify the JSX factory function to use when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ +StandardTags.jsx = StandardTags._defineTag({ + tagName: '@jsx', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Used to specify the JSX runtime to use when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ +StandardTags.jsxRuntime = StandardTags._defineTag({ + tagName: '@jsxRuntime', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Used to specify the JSX fragment factory to use when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ +StandardTags.jsxFrag = StandardTags._defineTag({ + tagName: '@jsxFrag', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Extended +}); +/** + * (Extended) + * + * Used to specify the JSX import source when compiling JSX syntax. + * + * @remarks + * The TypeScript compiler recognizes this tag and specifies its behavior: + * + * @see {@link https://www.typescriptlang.org/tsconfig/#jsx} + */ +StandardTags.jsxImportSource = StandardTags._defineTag({ + tagName: '@jsxImportSource', + syntaxKind: TSDocTagSyntaxKind.BlockTag, + standardization: Standardization.Extended +}); +/** + * Returns the full list of all core tags. + */ +StandardTags.allDefinitions = [ + StandardTags.alpha, + StandardTags.beta, + StandardTags.defaultValue, + StandardTags.decorator, + StandardTags.deprecated, + StandardTags.eventProperty, + StandardTags.example, + StandardTags.experimental, + StandardTags.inheritDoc, + StandardTags.internal, + StandardTags.label, + StandardTags.link, + StandardTags.override, + StandardTags.packageDocumentation, + StandardTags.param, + StandardTags.privateRemarks, + StandardTags.public, + StandardTags.readonly, + StandardTags.remarks, + StandardTags.returns, + StandardTags.sealed, + StandardTags.see, + StandardTags.throws, + StandardTags.typeParam, + StandardTags.virtual, + StandardTags.jsx, + StandardTags.jsxRuntime, + StandardTags.jsxFrag, + StandardTags.jsxImportSource +]; +//# sourceMappingURL=StandardTags.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/StandardTags.js.map b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f8c285ee02ca3795884b3dd4f06c23d1d3d4b5a6 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/StandardTags.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StandardTags.js","sourceRoot":"","sources":["../../src/details/StandardTags.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAO,YAAY;IA+jBf,MAAM,CAAC,UAAU,CAAC,UAAiD;QACzE,OAAO,IAAI,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;;AAhkBD;;;;;;;;;GASG;AACoB,kBAAK,GAAuB,YAAY,CAAC,UAAU,CAAC;IACzE,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,kBAAkB,CAAC,WAAW;IAC1C,eAAe,EAAE,eAAe,CAAC,aAAa;CAC/C,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACoB,iBAAI,GAAuB,YAAY,CAAC,UAAU,CAAC;IACxE,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,kBAAkB,CAAC,WAAW;IAC1C,eAAe,EAAE,eAAe,CAAC,aAAa;CAC/C,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACoB,sBAAS,GAAuB,YAAY,CAAC,UAAU,CAAC;IAC7E,OAAO,EAAE,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AE,eAAe,CAAC,QAAQ;CAC1C,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACoB,4BAAe,GAAuB,YAAY,CAAC,UAAU,CAAC;IACnF,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,kBAAkB,CAAC,QAAQ;IACvC,eAAe,EAAE,eAAe,CAAC,QAAQ;CAC1C,CAAC,CAAC;AAEH;;GAEG;AACW,2BAAc,GAAsC;IAChE,YAAY,CAAC,KAAK;IAClB,YAAY,CAAC,IAAI;IACjB,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,SAAS;IACtB,YAAY,CAAC,UAAU;IACvB,YAAY,CAAC,aAAa;IAC1B,YAAY,CAAC,OAAO;IACpB,YAAY,CAAC,YAAY;IACzB,YAAY,CAAC,UAAU;IACvB,YAAY,CAAC,QAAQ;IACrB,YAAY,CAAC,KAAK;IAClB,YAAY,CAAC,IAAI;IACjB,YAAY,CAAC,QAAQ;IACrB,YAAY,CAAC,oBAAoB;IACjC,YAAY,CAAC,KAAK;IAClB,YAAY,CAAC,cAAc;IAC3B,YAAY,CAAC,MAAM;IACnB,YAAY,CAAC,QAAQ;IACrB,YAAY,CAAC,OAAO;IACpB,YAAY,CAAC,OAAO;IACpB,YAAY,CAAC,MAAM;IACnB,YAAY,CAAC,GAAG;IAChB,YAAY,CAAC,MAAM;IACnB,YAAY,CAAC,SAAS;IACtB,YAAY,CAAC,OAAO;IACpB,YAAY,CAAC,GAAG;IAChB,YAAY,CAAC,UAAU;IACvB,YAAY,CAAC,OAAO;IACpB,YAAY,CAAC,eAAe;CAC7B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n TSDocTagDefinition,\r\n TSDocTagSyntaxKind,\r\n type ITSDocTagDefinitionInternalParameters\r\n} from '../configuration/TSDocTagDefinition';\r\nimport { Standardization } from './Standardization';\r\n\r\n/**\r\n * Tags whose meaning is defined by the TSDoc standard.\r\n */\r\nexport class StandardTags {\r\n /**\r\n * (Discretionary)\r\n *\r\n * Suggested meaning: Designates that an API item's release stage is \"alpha\".\r\n * It is intended to be used by third-party developers eventually, but has not\r\n * yet been released. The tooling may trim the declaration from a public release.\r\n *\r\n * @remarks\r\n * Example implementations: API Extractor\r\n */\r\n public static readonly alpha: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@alpha',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Discretionary\r\n });\r\n\r\n /**\r\n * (Discretionary)\r\n *\r\n * Suggested meaning: Designates that an API item's release stage is \"beta\".\r\n * It has been released to third-party developers experimentally for the purpose of\r\n * collecting feedback. The API should not be used in production, because its contract may\r\n * change without notice. The tooling may trim the declaration from a public release,\r\n * but may include it in a developer preview release.\r\n *\r\n * @remarks\r\n * Example implementations: API Extractor\r\n *\r\n * Synonyms: `@experimental`\r\n */\r\n public static readonly beta: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@beta',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Discretionary\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * ECMAScript decorators are sometimes an important part of an API contract.\r\n * However, today the TypeScript compiler does not represent decorators in the\r\n * .d.ts output files used by API consumers. The `@decorator` tag provides a workaround,\r\n * enabling a decorator expressions to be quoted in a doc comment.\r\n *\r\n * @example\r\n * ```ts\r\n * class Book {\r\n * /**\r\n * * The title of the book.\r\n * * @decorator `@jsonSerialized`\r\n * * @decorator `@jsonFormat(JsonFormats.Url)`\r\n * *\r\n *+/\r\n * @jsonSerialized\r\n * @jsonFormat(JsonFormats.Url)\r\n * public website: string;\r\n * }\r\n * ```\r\n */\r\n public static readonly decorator: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@decorator',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n allowMultiple: true,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * This block tag is used to document the default value for a field or property,\r\n * if a value is not assigned explicitly.\r\n *\r\n * @remarks\r\n * This tag should only be used with fields or properties that are members of a class or interface.\r\n */\r\n public static readonly defaultValue: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@defaultValue',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * This block tag communicates that an API item is no longer supported and may be removed\r\n * in a future release. The `@deprecated` tag is followed by a sentence describing\r\n * the recommended alternative. It recursively applies to members of the container.\r\n * For example, if a class is deprecated, then so are all of its members.\r\n */\r\n public static readonly deprecated: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@deprecated',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * When applied to a class or interface property, this indicates that the property\r\n * returns an event object that event handlers can be attached to. The event-handling\r\n * API is implementation-defined, but typically the property return type would be a class\r\n * with members such as `addHandler()` and `removeHandler()`. A documentation tool can\r\n * display such properties under an \"Events\" heading instead of the usual \"Properties\" heading.\r\n */\r\n public static readonly eventProperty: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@eventProperty',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Indicates a documentation section that should be presented as an example\r\n * illustrating how to use the API. It may include a code sample.\r\n */\r\n public static readonly example: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@example',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n allowMultiple: true,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Discretionary)\r\n *\r\n * Suggested meaning: Same semantics as `@beta`, but used by tools that don't support\r\n * an `@alpha` release stage.\r\n *\r\n * @remarks\r\n * Example implementations: Angular API documenter\r\n *\r\n * Synonyms: `@beta`\r\n */\r\n public static readonly experimental: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@experimental',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Discretionary\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * This inline tag is used to automatically generate an API item's documentation by\r\n * copying it from another API item. The inline tag parameter contains a reference\r\n * to the other item, which may be an unrelated class, or even an import from a\r\n * separate NPM package.\r\n *\r\n * @remarks\r\n * What gets copied\r\n *\r\n * The `@inheritDoc` tag does not copy the entire comment body. Only the following\r\n * components are copied:\r\n * - summary section\r\n * - `@remarks` block\r\n * - `@params` blocks\r\n * - `@typeParam` blocks\r\n * - `@returns` block\r\n * Other tags such as `@defaultValue` or `@example` are not copied, and need to be\r\n * explicitly included after the `@inheritDoc` tag.\r\n *\r\n * TODO: The notation for API item references is still being standardized. See this issue:\r\n * https://github.com/microsoft/tsdoc/issues/9\r\n */\r\n public static readonly inheritDoc: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@inheritDoc',\r\n syntaxKind: TSDocTagSyntaxKind.InlineTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Discretionary)\r\n *\r\n * Suggested meaning: Designates that an API item is not planned to be used by\r\n * third-party developers. The tooling may trim the declaration from a public release.\r\n * In some implementations, certain designated packages may be allowed to consume\r\n * internal API items, e.g. because the packages are components of the same product.\r\n *\r\n * @remarks\r\n * Example implementations: API Extractor\r\n */\r\n public static readonly internal: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@internal',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Discretionary\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * The `{@label}` inline tag is used to label a declaration, so that it can be referenced\r\n * using a selector in the TSDoc declaration reference notation.\r\n *\r\n * @remarks\r\n * TODO: The `{@label}` notation is still being standardized. See this issue:\r\n * https://github.com/microsoft/tsdoc/issues/9\r\n */\r\n public static readonly label: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@label',\r\n syntaxKind: TSDocTagSyntaxKind.InlineTag,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * The `{@link}` inline tag is used to create hyperlinks to other pages in a\r\n * documentation system or general internet URLs. In particular, it supports\r\n * expressions for referencing API items.\r\n *\r\n * @remarks\r\n * TODO: The `{@link}` notation is still being standardized. See this issue:\r\n * https://github.com/microsoft/tsdoc/issues/9\r\n */\r\n public static readonly link: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@link',\r\n syntaxKind: TSDocTagSyntaxKind.InlineTag,\r\n allowMultiple: true,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * This modifier has similar semantics to the `override` keyword in C# or Java.\r\n * For a member function or property, explicitly indicates that this definition\r\n * is overriding (i.e. redefining) the definition inherited from the base class.\r\n * The base class definition would normally be marked as `virtual`.\r\n *\r\n * @remarks\r\n * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`\r\n * modifiers are consistently applied, but this is not required by the TSDoc standard.\r\n */\r\n public static readonly override: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@override',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * Used to indicate a doc comment that describes an entire NPM package (as opposed\r\n * to an individual API item belonging to that package). The `@packageDocumentation` comment\r\n * is found in the *.d.ts file that acts as the entry point for the package, and it\r\n * should be the first `/**` comment encountered in that file. A comment containing a\r\n * `@packageDocumentation` tag should never be used to describe an individual API item.\r\n */\r\n public static readonly packageDocumentation: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@packageDocumentation',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * Used to document a function parameter. The `@param` tag is followed by a parameter\r\n * name, followed by a hyphen, followed by a description. The TSDoc parser recognizes\r\n * this syntax and will extract it into a DocParamBlock node.\r\n */\r\n public static readonly param: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@param',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n allowMultiple: true,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * Starts a section of additional documentation content that is not intended for a\r\n * public audience. A tool must omit this entire section from the API reference web site,\r\n * generated *.d.ts file, and any other outputs incorporating the content.\r\n */\r\n public static readonly privateRemarks: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@privateRemarks',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Discretionary)\r\n *\r\n * Suggested meaning: Designates that an API item's release stage is \"public\".\r\n * It has been officially released to third-party developers, and its signature is\r\n * guaranteed to be stable (e.g. following Semantic Versioning rules).\r\n *\r\n * @remarks\r\n * Example implementations: API Extractor\r\n */\r\n public static readonly public: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@public',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Discretionary\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * This modifier tag indicates that an API item should be documented as being read-only,\r\n * even if the TypeScript type system may indicate otherwise. For example, suppose a\r\n * class property has a setter function that always throws an exception explaining that\r\n * the property cannot be assigned; in this situation, the `@readonly` modifier can be\r\n * added so that the property is shown as read-only in the documentation.\r\n *\r\n * @remarks\r\n * Example implementations: API Extractor\r\n */\r\n public static readonly readonly: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@readonly',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * The main documentation for an API item is separated into a brief \"summary\" section,\r\n * optionally followed by a more detailed \"remarks\" section. On a documentation web site,\r\n * index pages (e.g. showing members of a class) will show only the brief summaries,\r\n * whereas a detail pages (e.g. describing a single member) will show the summary followed\r\n * by the remarks. The `@remarks` block tag ends the summary section, and begins the\r\n * remarks section for a doc comment.\r\n */\r\n public static readonly remarks: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@remarks',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * Used to document the return value for a function.\r\n */\r\n public static readonly returns: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@returns',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * This modifier has similar semantics to the `sealed` keyword in C# or Java.\r\n * For a class, indicates that subclasses must not inherit from the class.\r\n * For a member function or property, indicates that subclasses must not override\r\n * (i.e. redefine) the member.\r\n *\r\n * @remarks\r\n * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`\r\n * modifiers are consistently applied, but this is not required by the TSDoc standard.\r\n */\r\n public static readonly sealed: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@sealed',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Used to build a list of references to an API item or other resource that may be related to the\r\n * current item.\r\n *\r\n * @remarks\r\n *\r\n * For example:\r\n *\r\n * ```ts\r\n * /**\r\n * * Parses a string containing a Uniform Resource Locator (URL).\r\n * * @see {@link ParsedUrl} for the returned data structure\r\n * * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738}\r\n * * for syntax\r\n * * @see your developer SDK for code samples\r\n * * @param url - the string to be parsed\r\n * * @returns the parsed result\r\n * */\r\n * function parseURL(url: string): ParsedUrl;\r\n * ```\r\n *\r\n * `@see` is a block tag. Each block becomes an item in the list of references. For example, a documentation\r\n * system might render the above blocks as follows:\r\n *\r\n * ```markdown\r\n * `function parseURL(url: string): ParsedUrl;`\r\n *\r\n * Parses a string containing a Uniform Resource Locator (URL).\r\n *\r\n * ## See Also\r\n * - ParsedUrl for the returned data structure\r\n * - RFC 1738 for syntax\r\n * - your developer SDK for code samples\r\n * ```\r\n *\r\n * NOTE: JSDoc attempts to automatically hyperlink the text immediately after `@see`. Because this is ambiguous\r\n * with plain text, TSDoc instead requires an explicit `{@link}` tag to make hyperlinks.\r\n */\r\n public static readonly see: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@see',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Used to document an exception type that may be thrown by a function or property.\r\n *\r\n * @remarks\r\n *\r\n * A separate `@throws` block should be used to document each exception type. This tag is for informational\r\n * purposes only, and does not restrict other types from being thrown. It is suggested, but not required,\r\n * for the `@throws` block to start with a line containing only the name of the exception.\r\n *\r\n * For example:\r\n *\r\n * ```ts\r\n * /**\r\n * * Retrieves metadata about a book from the catalog.\r\n * *\r\n * * @param isbnCode - the ISBN number for the book\r\n * * @returns the retrieved book object\r\n * *\r\n * * @throws {@link IsbnSyntaxError}\r\n * * This exception is thrown if the input is not a valid ISBN number.\r\n * *\r\n * * @throws {@link book-lib#BookNotFoundError}\r\n * * Thrown if the ISBN number is valid, but no such book exists in the catalog.\r\n * *\r\n * * @public\r\n * */\r\n * function fetchBookByIsbn(isbnCode: string): Book;\r\n * ```\r\n */\r\n public static readonly throws: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@throws',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n allowMultiple: true,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Core)\r\n *\r\n * Used to document a generic parameter. The `@typeParam` tag is followed by a parameter\r\n * name, followed by a hyphen, followed by a description. The TSDoc parser recognizes\r\n * this syntax and will extract it into a DocParamBlock node.\r\n */\r\n public static readonly typeParam: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@typeParam',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n allowMultiple: true,\r\n standardization: Standardization.Core\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * This modifier has similar semantics to the `virtual` keyword in C# or Java.\r\n * For a member function or property, explicitly indicates that subclasses may override\r\n * (i.e. redefine) the member.\r\n *\r\n * @remarks\r\n * A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`\r\n * modifiers are consistently applied, but this is not required by the TSDoc standard.\r\n */\r\n public static readonly virtual: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@virtual',\r\n syntaxKind: TSDocTagSyntaxKind.ModifierTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Used to specify the JSX factory function to use when compiling JSX syntax.\r\n *\r\n * @remarks\r\n * The TypeScript compiler recognizes this tag and specifies its behavior:\r\n *\r\n * @see {@link https://www.typescriptlang.org/tsconfig/#jsx}\r\n */\r\n public static readonly jsx: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@jsx',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Used to specify the JSX runtime to use when compiling JSX syntax.\r\n *\r\n * @remarks\r\n * The TypeScript compiler recognizes this tag and specifies its behavior:\r\n *\r\n * @see {@link https://www.typescriptlang.org/tsconfig/#jsx}\r\n */\r\n public static readonly jsxRuntime: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@jsxRuntime',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Used to specify the JSX fragment factory to use when compiling JSX syntax.\r\n *\r\n * @remarks\r\n * The TypeScript compiler recognizes this tag and specifies its behavior:\r\n *\r\n * @see {@link https://www.typescriptlang.org/tsconfig/#jsx}\r\n */\r\n public static readonly jsxFrag: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@jsxFrag',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * (Extended)\r\n *\r\n * Used to specify the JSX import source when compiling JSX syntax.\r\n *\r\n * @remarks\r\n * The TypeScript compiler recognizes this tag and specifies its behavior:\r\n *\r\n * @see {@link https://www.typescriptlang.org/tsconfig/#jsx}\r\n */\r\n public static readonly jsxImportSource: TSDocTagDefinition = StandardTags._defineTag({\r\n tagName: '@jsxImportSource',\r\n syntaxKind: TSDocTagSyntaxKind.BlockTag,\r\n standardization: Standardization.Extended\r\n });\r\n\r\n /**\r\n * Returns the full list of all core tags.\r\n */\r\n public static allDefinitions: ReadonlyArray = [\r\n StandardTags.alpha,\r\n StandardTags.beta,\r\n StandardTags.defaultValue,\r\n StandardTags.decorator,\r\n StandardTags.deprecated,\r\n StandardTags.eventProperty,\r\n StandardTags.example,\r\n StandardTags.experimental,\r\n StandardTags.inheritDoc,\r\n StandardTags.internal,\r\n StandardTags.label,\r\n StandardTags.link,\r\n StandardTags.override,\r\n StandardTags.packageDocumentation,\r\n StandardTags.param,\r\n StandardTags.privateRemarks,\r\n StandardTags.public,\r\n StandardTags.readonly,\r\n StandardTags.remarks,\r\n StandardTags.returns,\r\n StandardTags.sealed,\r\n StandardTags.see,\r\n StandardTags.throws,\r\n StandardTags.typeParam,\r\n StandardTags.virtual,\r\n StandardTags.jsx,\r\n StandardTags.jsxRuntime,\r\n StandardTags.jsxFrag,\r\n StandardTags.jsxImportSource\r\n ];\r\n\r\n private static _defineTag(parameters: ITSDocTagDefinitionInternalParameters): TSDocTagDefinition {\r\n return new TSDocTagDefinition(parameters);\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts b/node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..29606abbe0a02cc17dd69892ef448243b395104f --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts @@ -0,0 +1,33 @@ +/** + * Used to group the {@link StandardTags} definitions according to the level of support + * expected from documentation tools that implement the standard. + */ +export declare enum Standardization { + /** + * TSDoc tags in the "Core" standardization group are considered essential. + * Their meaning is standardized, and every documentation tool is expected + * to recognize them. The TSDoc parser library typically provides dedicated APIs + * for accessing these tags. + */ + Core = "Core", + /** + * TSDoc tags in the "Extended" standardization group are optional. Documentation tools + * may or may not support them. If they do, the syntax and semantics should conform to + * the TSDoc standard definitions. + */ + Extended = "Extended", + /** + * TSDoc tags in the "Discretionary" standardization group are optional. Although the + * syntax is specified, the semantics for these tags are implementation-specific + * (and sometimes difficult to describe completely without referring to a specific + * implementation). Discretionary tags are included in the TSDoc standard to ensure that + * if two different popular tools use the same tag name, developers can expect the syntax + * to be the same, and the semantics to be somewhat similar. + */ + Discretionary = "Discretionary", + /** + * The tag is not part of the TSDoc standard. All user-defined tags are assigned to this group. + */ + None = "None" +} +//# sourceMappingURL=Standardization.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts.map b/node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..77f413eb56aa1315f059ab9ca2483d7769085472 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Standardization.d.ts","sourceRoot":"","sources":["../../src/details/Standardization.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,oBAAY,eAAe;IACzB;;;;;OAKG;IACH,IAAI,SAAS;IAEb;;;;OAIG;IACH,QAAQ,aAAa;IAErB;;;;;;;OAOG;IACH,aAAa,kBAAkB;IAE/B;;OAEG;IACH,IAAI,SAAS;CACd"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/Standardization.js b/node_modules/@microsoft/tsdoc/lib/details/Standardization.js new file mode 100644 index 0000000000000000000000000000000000000000..4b78d70c7d6ffcbf477df48a1dd6e93edfffa06c --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/Standardization.js @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +/** + * Used to group the {@link StandardTags} definitions according to the level of support + * expected from documentation tools that implement the standard. + */ +export var Standardization; +(function (Standardization) { + /** + * TSDoc tags in the "Core" standardization group are considered essential. + * Their meaning is standardized, and every documentation tool is expected + * to recognize them. The TSDoc parser library typically provides dedicated APIs + * for accessing these tags. + */ + Standardization["Core"] = "Core"; + /** + * TSDoc tags in the "Extended" standardization group are optional. Documentation tools + * may or may not support them. If they do, the syntax and semantics should conform to + * the TSDoc standard definitions. + */ + Standardization["Extended"] = "Extended"; + /** + * TSDoc tags in the "Discretionary" standardization group are optional. Although the + * syntax is specified, the semantics for these tags are implementation-specific + * (and sometimes difficult to describe completely without referring to a specific + * implementation). Discretionary tags are included in the TSDoc standard to ensure that + * if two different popular tools use the same tag name, developers can expect the syntax + * to be the same, and the semantics to be somewhat similar. + */ + Standardization["Discretionary"] = "Discretionary"; + /** + * The tag is not part of the TSDoc standard. All user-defined tags are assigned to this group. + */ + Standardization["None"] = "None"; +})(Standardization || (Standardization = {})); +//# sourceMappingURL=Standardization.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/details/Standardization.js.map b/node_modules/@microsoft/tsdoc/lib/details/Standardization.js.map new file mode 100644 index 0000000000000000000000000000000000000000..21804b6d65cf57bd9a0effb1bca89f5e0b113066 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/details/Standardization.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Standardization.js","sourceRoot":"","sources":["../../src/details/Standardization.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D;;;GAGG;AACH,MAAM,CAAN,IAAY,eA8BX;AA9BD,WAAY,eAAe;IACzB;;;;;OAKG;IACH,gCAAa,CAAA;IAEb;;;;OAIG;IACH,wCAAqB,CAAA;IAErB;;;;;;;OAOG;IACH,kDAA+B,CAAA;IAE/B;;OAEG;IACH,gCAAa,CAAA;AACf,CAAC,EA9BW,eAAe,KAAf,eAAe,QA8B1B","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\n/**\r\n * Used to group the {@link StandardTags} definitions according to the level of support\r\n * expected from documentation tools that implement the standard.\r\n */\r\nexport enum Standardization {\r\n /**\r\n * TSDoc tags in the \"Core\" standardization group are considered essential.\r\n * Their meaning is standardized, and every documentation tool is expected\r\n * to recognize them. The TSDoc parser library typically provides dedicated APIs\r\n * for accessing these tags.\r\n */\r\n Core = 'Core',\r\n\r\n /**\r\n * TSDoc tags in the \"Extended\" standardization group are optional. Documentation tools\r\n * may or may not support them. If they do, the syntax and semantics should conform to\r\n * the TSDoc standard definitions.\r\n */\r\n Extended = 'Extended',\r\n\r\n /**\r\n * TSDoc tags in the \"Discretionary\" standardization group are optional. Although the\r\n * syntax is specified, the semantics for these tags are implementation-specific\r\n * (and sometimes difficult to describe completely without referring to a specific\r\n * implementation). Discretionary tags are included in the TSDoc standard to ensure that\r\n * if two different popular tools use the same tag name, developers can expect the syntax\r\n * to be the same, and the semantics to be somewhat similar.\r\n */\r\n Discretionary = 'Discretionary',\r\n\r\n /**\r\n * The tag is not part of the TSDoc standard. All user-defined tags are assigned to this group.\r\n */\r\n None = 'None'\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..23eb2912a9ff53ab8df33b03905f655e0e659db4 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts @@ -0,0 +1,33 @@ +import { DocNode } from '../nodes'; +/** + * Renders a DocNode tree as plain text, without any rich text formatting or markup. + */ +export declare class PlainTextEmitter { + /** + * Returns true if the specified node contains any text content. + * + * @remarks + * A documentation tool can use this test to report warnings when a developer neglected to write a code comment + * for a declaration. + * + * @param node - this node and all its children will be considered + * @param requiredCharacters - The test returns true if at least this many non-spacing characters are found. + * The default value is 1. + */ + static hasAnyTextContent(node: DocNode, requiredCharacters?: number): boolean; + /** + * Returns true if the specified collection of nodes contains any text content. + * + * @remarks + * A documentation tool can use this test to report warnings when a developer neglected to write a code comment + * for a declaration. + * + * @param nodes - the collection of nodes to be tested + * @param requiredCharacters - The test returns true if at least this many non-spacing characters are found. + * The default value is 1. + */ + static hasAnyTextContent(nodes: ReadonlyArray, requiredCharacters?: number): boolean; + private static _scanTextContent; + private static _countNonSpaceCharacters; +} +//# sourceMappingURL=PlainTextEmitter.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts.map b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..3c39466f38c4a5aaac7e269c15fb5c54c5a86957 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PlainTextEmitter.d.ts","sourceRoot":"","sources":["../../src/emitters/PlainTextEmitter.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EAOR,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;;;;;OAUG;WACW,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO;IAEpF;;;;;;;;;;OAUG;WACW,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO;IAqBpG,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAkD/B,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAkBxC"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js new file mode 100644 index 0000000000000000000000000000000000000000..0667ea183dece13a740fbcafbb44f50c618d6106 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNode, DocNodeKind } from '../nodes'; +/** + * Renders a DocNode tree as plain text, without any rich text formatting or markup. + */ +export class PlainTextEmitter { + static hasAnyTextContent(nodeOrNodes, requiredCharacters) { + if (requiredCharacters === undefined || requiredCharacters < 1) { + requiredCharacters = 1; // default + } + let nodes; + if (nodeOrNodes instanceof DocNode) { + nodes = [nodeOrNodes]; + } + else { + nodes = nodeOrNodes; + } + const foundCharacters = PlainTextEmitter._scanTextContent(nodes, requiredCharacters, 0); + return foundCharacters >= requiredCharacters; + } + static _scanTextContent(nodes, requiredCharacters, foundCharacters) { + for (const node of nodes) { + switch (node.kind) { + case DocNodeKind.FencedCode: + const docFencedCode = node; + foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docFencedCode.code); + break; + case DocNodeKind.CodeSpan: + const docCodeSpan = node; + foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docCodeSpan.code); + break; + case DocNodeKind.EscapedText: + const docEscapedText = node; + foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docEscapedText.decodedText); + break; + case DocNodeKind.LinkTag: + const docLinkTag = node; + foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docLinkTag.linkText || ''); + break; + case DocNodeKind.PlainText: + const docPlainText = node; + foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docPlainText.text); + break; + } + if (foundCharacters >= requiredCharacters) { + break; + } + foundCharacters += PlainTextEmitter._scanTextContent(node.getChildNodes(), requiredCharacters, foundCharacters); + if (foundCharacters >= requiredCharacters) { + break; + } + } + return foundCharacters; + } + static _countNonSpaceCharacters(s) { + let count = 0; + const length = s.length; + let i = 0; + while (i < length) { + switch (s.charCodeAt(i)) { + case 32: // space + case 9: // tab + case 13: // CR + case 10: // LF + break; + default: + ++count; + } + ++i; + } + return count; + } +} +//# sourceMappingURL=PlainTextEmitter.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js.map b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5c3f3485ad20b2cd336ad64cfafa6f50af2d938b --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlainTextEmitter.js","sourceRoot":"","sources":["../../src/emitters/PlainTextEmitter.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,OAAO,EACP,WAAW,EAMZ,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,OAAO,gBAAgB;IA0BpB,MAAM,CAAC,iBAAiB,CAC7B,WAA6C,EAC7C,kBAA2B;QAE3B,IAAI,kBAAkB,KAAK,SAAS,IAAI,kBAAkB,GAAG,CAAC,EAAE,CAAC;YAC/D,kBAAkB,GAAG,CAAC,CAAC,CAAC,UAAU;QACpC,CAAC;QAED,IAAI,KAA6B,CAAC;QAClC,IAAI,WAAW,YAAY,OAAO,EAAE,CAAC;YACnC,KAAK,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,WAAW,CAAC;QACtB,CAAC;QAED,MAAM,eAAe,GAAW,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC;QAEhG,OAAO,eAAe,IAAI,kB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B,EAAE,CAAC;gBAC1C,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO,eAAe,CAAC;IACzB,CAAC;IAEO,MAAM,CAAC,wBAAwB,CAAC,CAAS;QAC/C,IAAI,KAAK,GAAW,CAAC,CAAC;QACtB,MAAM,MAAM,GAAW,CAAC,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,GAAW,CAAC,CAAC;QAClB,OAAO,CAAC,GAAG,MAAM,EAAE,CAAC;YAClB,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;gBACxB,KAAK,EAAE,CAAC,CAAC,QAAQ;gBACjB,KAAK,CAAC,CAAC,CAAC,MAAM;gBACd,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,KAAK,EAAE,EAAE,KAAK;oBACZ,MAAM;gBACR;oBACE,EAAE,KAAK,CAAC;YACZ,CAAC;YACD,EAAE,CAAC,CAAC;QACN,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport {\r\n DocNode,\r\n DocNodeKind,\r\n type DocPlainText,\r\n type DocFencedCode,\r\n type DocCodeSpan,\r\n type DocLinkTag,\r\n type DocEscapedText\r\n} from '../nodes';\r\n\r\n/**\r\n * Renders a DocNode tree as plain text, without any rich text formatting or markup.\r\n */\r\nexport class PlainTextEmitter {\r\n /**\r\n * Returns true if the specified node contains any text content.\r\n *\r\n * @remarks\r\n * A documentation tool can use this test to report warnings when a developer neglected to write a code comment\r\n * for a declaration.\r\n *\r\n * @param node - this node and all its children will be considered\r\n * @param requiredCharacters - The test returns true if at least this many non-spacing characters are found.\r\n * The default value is 1.\r\n */\r\n public static hasAnyTextContent(node: DocNode, requiredCharacters?: number): boolean;\r\n\r\n /**\r\n * Returns true if the specified collection of nodes contains any text content.\r\n *\r\n * @remarks\r\n * A documentation tool can use this test to report warnings when a developer neglected to write a code comment\r\n * for a declaration.\r\n *\r\n * @param nodes - the collection of nodes to be tested\r\n * @param requiredCharacters - The test returns true if at least this many non-spacing characters are found.\r\n * The default value is 1.\r\n */\r\n public static hasAnyTextContent(nodes: ReadonlyArray, requiredCharacters?: number): boolean;\r\n public static hasAnyTextContent(\r\n nodeOrNodes: DocNode | ReadonlyArray,\r\n requiredCharacters?: number\r\n ): boolean {\r\n if (requiredCharacters === undefined || requiredCharacters < 1) {\r\n requiredCharacters = 1; // default\r\n }\r\n\r\n let nodes: ReadonlyArray;\r\n if (nodeOrNodes instanceof DocNode) {\r\n nodes = [nodeOrNodes];\r\n } else {\r\n nodes = nodeOrNodes;\r\n }\r\n\r\n const foundCharacters: number = PlainTextEmitter._scanTextContent(nodes, requiredCharacters, 0);\r\n\r\n return foundCharacters >= requiredCharacters;\r\n }\r\n\r\n private static _scanTextContent(\r\n nodes: ReadonlyArray,\r\n requiredCharacters: number,\r\n foundCharacters: number\r\n ): number {\r\n for (const node of nodes) {\r\n switch (node.kind) {\r\n case DocNodeKind.FencedCode:\r\n const docFencedCode: DocFencedCode = node as DocFencedCode;\r\n foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docFencedCode.code);\r\n break;\r\n\r\n case DocNodeKind.CodeSpan:\r\n const docCodeSpan: DocCodeSpan = node as DocCodeSpan;\r\n foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docCodeSpan.code);\r\n break;\r\n case DocNodeKind.EscapedText:\r\n const docEscapedText: DocEscapedText = node as DocEscapedText;\r\n foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docEscapedText.decodedText);\r\n break;\r\n\r\n case DocNodeKind.LinkTag:\r\n const docLinkTag: DocLinkTag = node as DocLinkTag;\r\n foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docLinkTag.linkText || '');\r\n break;\r\n\r\n case DocNodeKind.PlainText:\r\n const docPlainText: DocPlainText = node as DocPlainText;\r\n foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docPlainText.text);\r\n break;\r\n }\r\n\r\n if (foundCharacters >= requiredCharacters) {\r\n break;\r\n }\r\n\r\n foundCharacters += PlainTextEmitter._scanTextContent(\r\n node.getChildNodes(),\r\n requiredCharacters,\r\n foundCharacters\r\n );\r\n\r\n if (foundCharacters >= requiredCharacters) {\r\n break;\r\n }\r\n }\r\n\r\n return foundCharacters;\r\n }\r\n\r\n private static _countNonSpaceCharacters(s: string): number {\r\n let count: number = 0;\r\n const length: number = s.length;\r\n let i: number = 0;\r\n while (i < length) {\r\n switch (s.charCodeAt(i)) {\r\n case 32: // space\r\n case 9: // tab\r\n case 13: // CR\r\n case 10: // LF\r\n break;\r\n default:\r\n ++count;\r\n }\r\n ++i;\r\n }\r\n return count;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dd04cedb0973bd2744a4714690333bdc07a1c959 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts @@ -0,0 +1,42 @@ +/** + * An interface for a builder object that allows a large text string to be constructed incrementally by appending + * small chunks. + * + * @remarks + * + * {@link StringBuilder} is the default implementation of this contract. + */ +export interface IStringBuilder { + /** + * Append the specified text to the buffer. + */ + append(text: string): void; + /** + * Returns a single string containing all the text that was appended to the buffer so far. + * + * @remarks + * + * This is a potentially expensive operation. + */ + toString(): string; +} +/** + * This class allows a large text string to be constructed incrementally by appending small chunks. The final + * string can be obtained by calling StringBuilder.toString(). + * + * @remarks + * A naive approach might use the `+=` operator to append strings: This would have the downside of copying + * the entire string each time a chunk is appended, resulting in `O(n^2)` bytes of memory being allocated + * (and later freed by the garbage collector), and many of the allocations could be very large objects. + * StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them + * when `getText()` is finally called. + */ +export declare class StringBuilder implements IStringBuilder { + private _chunks; + constructor(); + /** {@inheritdoc IStringBuilder.append} */ + append(text: string): void; + /** {@inheritdoc IStringBuilder.toString} */ + toString(): string; +} +//# sourceMappingURL=StringBuilder.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts.map b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..c9b3d0d28a3d7aa96f4ef4609685c8f2ae19a3af --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"StringBuilder.d.ts","sourceRoot":"","sources":["../../src/emitters/StringBuilder.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;;;OAMG;IACH,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,YAAW,cAAc;IAClD,OAAO,CAAC,OAAO,CAAW;;IAM1B,0CAA0C;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjC,4CAA4C;IACrC,QAAQ,IAAI,MAAM;CAa1B"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js new file mode 100644 index 0000000000000000000000000000000000000000..2c3a331531f8189cf9bb858c0b38837d68def819 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +/** + * This class allows a large text string to be constructed incrementally by appending small chunks. The final + * string can be obtained by calling StringBuilder.toString(). + * + * @remarks + * A naive approach might use the `+=` operator to append strings: This would have the downside of copying + * the entire string each time a chunk is appended, resulting in `O(n^2)` bytes of memory being allocated + * (and later freed by the garbage collector), and many of the allocations could be very large objects. + * StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them + * when `getText()` is finally called. + */ +export class StringBuilder { + constructor() { + this._chunks = []; + } + /** {@inheritdoc IStringBuilder.append} */ + append(text) { + this._chunks.push(text); + } + /** {@inheritdoc IStringBuilder.toString} */ + toString() { + if (this._chunks.length === 0) { + return ''; + } + if (this._chunks.length > 1) { + const joined = this._chunks.join(''); + this._chunks.length = 1; + this._chunks[0] = joined; + } + return this._chunks[0]; + } +} +//# sourceMappingURL=StringBuilder.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js.map b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js.map new file mode 100644 index 0000000000000000000000000000000000000000..bae6ca4bdb5ff26e52704c1959206b986cf7e580 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"StringBuilder.js","sourceRoot":"","sources":["../../src/emitters/StringBuilder.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AA0B3D;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAa;IAGxB;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,CAAC;IAED,0CAA0C;IACnC,MAAM,CAAC,IAAY;QACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,4CAA4C;IACrC,QAAQ;QACb,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,MAAM,GAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC7C,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QAC3B,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\n/**\r\n * An interface for a builder object that allows a large text string to be constructed incrementally by appending\r\n * small chunks.\r\n *\r\n * @remarks\r\n *\r\n * {@link StringBuilder} is the default implementation of this contract.\r\n */\r\nexport interface IStringBuilder {\r\n /**\r\n * Append the specified text to the buffer.\r\n */\r\n append(text: string): void;\r\n\r\n /**\r\n * Returns a single string containing all the text that was appended to the buffer so far.\r\n *\r\n * @remarks\r\n *\r\n * This is a potentially expensive operation.\r\n */\r\n toString(): string;\r\n}\r\n\r\n/**\r\n * This class allows a large text string to be constructed incrementally by appending small chunks. The final\r\n * string can be obtained by calling StringBuilder.toString().\r\n *\r\n * @remarks\r\n * A naive approach might use the `+=` operator to append strings: This would have the downside of copying\r\n * the entire string each time a chunk is appended, resulting in `O(n^2)` bytes of memory being allocated\r\n * (and later freed by the garbage collector), and many of the allocations could be very large objects.\r\n * StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them\r\n * when `getText()` is finally called.\r\n */\r\nexport class StringBuilder implements IStringBuilder {\r\n private _chunks: string[];\r\n\r\n public constructor() {\r\n this._chunks = [];\r\n }\r\n\r\n /** {@inheritdoc IStringBuilder.append} */\r\n public append(text: string): void {\r\n this._chunks.push(text);\r\n }\r\n\r\n /** {@inheritdoc IStringBuilder.toString} */\r\n public toString(): string {\r\n if (this._chunks.length === 0) {\r\n return '';\r\n }\r\n\r\n if (this._chunks.length > 1) {\r\n const joined: string = this._chunks.join('');\r\n this._chunks.length = 1;\r\n this._chunks[0] = joined;\r\n }\r\n\r\n return this._chunks[0];\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f2476b3eb6e307b22d670bef35cb126d6d495a10 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts @@ -0,0 +1,26 @@ +import type { DocComment, DocDeclarationReference, DocHtmlEndTag, DocHtmlStartTag } from '../nodes'; +import type { IStringBuilder } from './StringBuilder'; +/** + * Renders a DocNode tree as a code comment. + */ +export declare class TSDocEmitter { + readonly eol: string; + private _emitCommentFraming; + private _output; + private _lineState; + private _previousLineHadContent; + private _hangingParagraph; + renderComment(output: IStringBuilder, docComment: DocComment): void; + renderHtmlTag(output: IStringBuilder, htmlTag: DocHtmlStartTag | DocHtmlEndTag): void; + renderDeclarationReference(output: IStringBuilder, declarationReference: DocDeclarationReference): void; + private _renderCompleteObject; + private _renderNode; + private _renderInlineTag; + private _renderNodes; + private _ensureAtStartOfLine; + private _ensureLineSkipped; + private _writeContent; + private _writeNewline; + private _writeEnd; +} +//# sourceMappingURL=TSDocEmitter.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts.map b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..80d6482125491806ed8a5f22b94e2ec940757175 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocEmitter.d.ts","sourceRoot":"","sources":["../../src/emitters/TSDocEmitter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,UAAU,EAQV,uBAAuB,EAGvB,aAAa,EACb,eAAe,EAWhB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAWtD;;GAEG;AACH,qBAAa,YAAY;IACvB,SAAgB,GAAG,EAAE,MAAM,CAAQ;IAGnC,OAAO,CAAC,mBAAmB,CAAiB;IAE5C,OAAO,CAAC,OAAO,CAA6B;IAG5C,OAAO,CAAC,UAAU,CAA+B;IAGjD,OAAO,CAAC,uBAAuB,CAAkB;IAKjD,OAAO,CAAC,iBAAiB,CAAkB;IAEpC,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI;IAKnE,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,aAAa,GAAG,IAAI;IAKrF,0BAA0B,CAC/B,MAAM,EAAE,cAAc,EACtB,oBAAoB,EAAE,uBAAuB,GAC5C,IAAI;IAKP,OAAO,CAAC,qBAAqB;IAY7B,OAAO,CAAC,WAAW;IAuQnB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,SAAS;CAclB"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.js b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.js new file mode 100644 index 0000000000000000000000000000000000000000..aa1e23567b951496fa2a3424071db7e49560d2c5 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.js @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind } from '../nodes/DocNode'; +import { DocNodeTransforms } from '../transforms/DocNodeTransforms'; +import { StandardTags } from '../details/StandardTags'; +var LineState; +(function (LineState) { + LineState[LineState["Closed"] = 0] = "Closed"; + LineState[LineState["StartOfLine"] = 1] = "StartOfLine"; + LineState[LineState["MiddleOfLine"] = 2] = "MiddleOfLine"; +})(LineState || (LineState = {})); +/** + * Renders a DocNode tree as a code comment. + */ +export class TSDocEmitter { + constructor() { + this.eol = '\n'; + // Whether to emit the /** */ framing + this._emitCommentFraming = true; + // This state machine is used by the writer functions to generate the /** */ framing around the emitted lines + this._lineState = LineState.Closed; + // State for _ensureLineSkipped() + this._previousLineHadContent = false; + // Normally a paragraph is precede by a blank line (unless it's the first thing written). + // But sometimes we want the paragraph to be attached to the previous element, e.g. when it's part of + // an "@param" block. Setting _hangingParagraph=true accomplishes that. + this._hangingParagraph = false; + } + renderComment(output, docComment) { + this._emitCommentFraming = true; + this._renderCompleteObject(output, docComment); + } + renderHtmlTag(output, htmlTag) { + this._emitCommentFraming = false; + this._renderCompleteObject(output, htmlTag); + } + renderDeclarationReference(output, declarationReference) { + this._emitCommentFraming = false; + this._renderCompleteObject(output, declarationReference); + } + _renderCompleteObject(output, docNode) { + this._output = output; + this._lineState = LineState.Closed; + this._previousLineHadContent = false; + this._hangingParagraph = false; + this._renderNode(docNode); + this._writeEnd(); + } + _renderNode(docNode) { + if (docNode === undefined) { + return; + } + switch (docNode.kind) { + case DocNodeKind.Block: + const docBlock = docNode; + this._ensureLineSkipped(); + this._renderNode(docBlock.blockTag); + if (docBlock.blockTag.tagNameWithUpperCase === StandardTags.returns.tagNameWithUpperCase || + docBlock.blockTag.tagNameWithUpperCase === StandardTags.defaultValue.tagNameWithUpperCase) { + this._writeContent(' '); + this._hangingParagraph = true; + } + this._renderNode(docBlock.content); + break; + case DocNodeKind.BlockTag: + const docBlockTag = docNode; + if (this._lineState === LineState.MiddleOfLine) { + this._writeContent(' '); + } + this._writeContent(docBlockTag.tagName); + break; + case DocNodeKind.CodeSpan: + const docCodeSpan = docNode; + this._writeContent('`'); + this._writeContent(docCodeSpan.code); + this._writeContent('`'); + break; + case DocNodeKind.Comment: + const docComment = docNode; + this._renderNodes([ + docComment.summarySection, + docComment.remarksBlock, + docComment.privateRemarks, + docComment.deprecatedBlock, + docComment.params, + docComment.typeParams, + docComment.returnsBlock, + ...docComment.customBlocks, + ...docComment.seeBlocks, + docComment.inheritDocTag + ]); + if (docComment.modifierTagSet.nodes.length > 0) { + this._ensureLineSkipped(); + this._renderNodes(docComment.modifierTagSet.nodes); + } + break; + case DocNodeKind.DeclarationReference: + const docDeclarationReference = docNode; + this._writeContent(docDeclarationReference.packageName); + this._writeContent(docDeclarationReference.importPath); + if (docDeclarationReference.packageName !== undefined || + docDeclarationReference.importPath !== undefined) { + this._writeContent('#'); + } + this._renderNodes(docDeclarationReference.memberReferences); + break; + case DocNodeKind.ErrorText: + const docErrorText = docNode; + this._writeContent(docErrorText.text); + break; + case DocNodeKind.EscapedText: + const docEscapedText = docNode; + this._writeContent(docEscapedText.encodedText); + break; + case DocNodeKind.FencedCode: + const docFencedCode = docNode; + this._ensureAtStartOfLine(); + this._writeContent('```'); + this._writeContent(docFencedCode.language); + this._writeNewline(); + this._writeContent(docFencedCode.code); + this._writeContent('```'); + this._writeNewline(); + this._writeNewline(); + break; + case DocNodeKind.HtmlAttribute: + const docHtmlAttribute = docNode; + this._writeContent(docHtmlAttribute.name); + this._writeContent(docHtmlAttribute.spacingAfterName); + this._writeContent('='); + this._writeContent(docHtmlAttribute.spacingAfterEquals); + this._writeContent(docHtmlAttribute.value); + this._writeContent(docHtmlAttribute.spacingAfterValue); + break; + case DocNodeKind.HtmlEndTag: + const docHtmlEndTag = docNode; + this._writeContent(''); + break; + case DocNodeKind.HtmlStartTag: + const docHtmlStartTag = docNode; + this._writeContent('<'); + this._writeContent(docHtmlStartTag.name); + this._writeContent(docHtmlStartTag.spacingAfterName); + let needsSpace = docHtmlStartTag.spacingAfterName === undefined || docHtmlStartTag.spacingAfterName.length === 0; + for (const attribute of docHtmlStartTag.htmlAttributes) { + if (needsSpace) { + this._writeContent(' '); + } + this._renderNode(attribute); + needsSpace = attribute.spacingAfterValue === undefined || attribute.spacingAfterValue.length === 0; + } + this._writeContent(docHtmlStartTag.selfClosingTag ? '/>' : '>'); + break; + case DocNodeKind.InheritDocTag: + const docInheritDocTag = docNode; + this._renderInlineTag(docInheritDocTag, () => { + if (docInheritDocTag.declarationReference) { + this._writeContent(' '); + this._renderNode(docInheritDocTag.declarationReference); + } + }); + break; + case DocNodeKind.InlineTag: + const docInlineTag = docNode; + this._renderInlineTag(docInlineTag, () => { + if (docInlineTag.tagContent.length > 0) { + this._writeContent(' '); + this._writeContent(docInlineTag.tagContent); + } + }); + break; + case DocNodeKind.LinkTag: + const docLinkTag = docNode; + this._renderInlineTag(docLinkTag, () => { + if (docLinkTag.urlDestination !== undefined || docLinkTag.codeDestination !== undefined) { + if (docLinkTag.urlDestination !== undefined) { + this._writeContent(' '); + this._writeContent(docLinkTag.urlDestination); + } + else if (docLinkTag.codeDestination !== undefined) { + this._writeContent(' '); + this._renderNode(docLinkTag.codeDestination); + } + } + if (docLinkTag.linkText !== undefined) { + this._writeContent(' '); + this._writeContent('|'); + this._writeContent(' '); + this._writeContent(docLinkTag.linkText); + } + }); + break; + case DocNodeKind.MemberIdentifier: + const docMemberIdentifier = docNode; + if (docMemberIdentifier.hasQuotes) { + this._writeContent('"'); + this._writeContent(docMemberIdentifier.identifier); // todo: encoding + this._writeContent('"'); + } + else { + this._writeContent(docMemberIdentifier.identifier); + } + break; + case DocNodeKind.MemberReference: + const docMemberReference = docNode; + if (docMemberReference.hasDot) { + this._writeContent('.'); + } + if (docMemberReference.selector) { + this._writeContent('('); + } + if (docMemberReference.memberSymbol) { + this._renderNode(docMemberReference.memberSymbol); + } + else { + this._renderNode(docMemberReference.memberIdentifier); + } + if (docMemberReference.selector) { + this._writeContent(':'); + this._renderNode(docMemberReference.selector); + this._writeContent(')'); + } + break; + case DocNodeKind.MemberSelector: + const docMemberSelector = docNode; + this._writeContent(docMemberSelector.selector); + break; + case DocNodeKind.MemberSymbol: + const docMemberSymbol = docNode; + this._writeContent('['); + this._renderNode(docMemberSymbol.symbolReference); + this._writeContent(']'); + break; + case DocNodeKind.Section: + const docSection = docNode; + this._renderNodes(docSection.nodes); + break; + case DocNodeKind.Paragraph: + const trimmedParagraph = DocNodeTransforms.trimSpacesInParagraph(docNode); + if (trimmedParagraph.nodes.length > 0) { + if (this._hangingParagraph) { + // If it's a hanging paragraph, then don't skip a line + this._hangingParagraph = false; + } + else { + this._ensureLineSkipped(); + } + this._renderNodes(trimmedParagraph.nodes); + this._writeNewline(); + } + break; + case DocNodeKind.ParamBlock: + const docParamBlock = docNode; + this._ensureLineSkipped(); + this._renderNode(docParamBlock.blockTag); + this._writeContent(' '); + this._writeContent(docParamBlock.parameterName); + this._writeContent(' - '); + this._hangingParagraph = true; + this._renderNode(docParamBlock.content); + this._hangingParagraph = false; + break; + case DocNodeKind.ParamCollection: + const docParamCollection = docNode; + this._renderNodes(docParamCollection.blocks); + break; + case DocNodeKind.PlainText: + const docPlainText = docNode; + this._writeContent(docPlainText.text); + break; + } + } + _renderInlineTag(docInlineTagBase, writeInlineTagContent) { + this._writeContent('{'); + this._writeContent(docInlineTagBase.tagName); + writeInlineTagContent(); + this._writeContent('}'); + } + _renderNodes(docNodes) { + for (const docNode of docNodes) { + this._renderNode(docNode); + } + } + // Calls _writeNewline() only if we're not already at the start of a new line + _ensureAtStartOfLine() { + if (this._lineState === LineState.MiddleOfLine) { + this._writeNewline(); + } + } + // Calls _writeNewline() if needed to ensure that we have skipped at least one line + _ensureLineSkipped() { + this._ensureAtStartOfLine(); + if (this._previousLineHadContent) { + this._writeNewline(); + } + } + // Writes literal text content. If it contains newlines, they will automatically be converted to + // _writeNewline() calls, to ensure that "*" is written at the start of each line. + _writeContent(content) { + if (content === undefined || content.length === 0) { + return; + } + const splitLines = content.split(/\r?\n/g); + if (splitLines.length > 1) { + let firstLine = true; + for (const line of splitLines) { + if (firstLine) { + firstLine = false; + } + else { + this._writeNewline(); + } + this._writeContent(line); + } + return; + } + if (this._lineState === LineState.Closed) { + if (this._emitCommentFraming) { + this._output.append('/**' + this.eol + ' *'); + } + this._lineState = LineState.StartOfLine; + } + if (this._lineState === LineState.StartOfLine) { + if (this._emitCommentFraming) { + this._output.append(' '); + } + } + this._output.append(content); + this._lineState = LineState.MiddleOfLine; + this._previousLineHadContent = true; + } + // Starts a new line, and inserts "/**" or "*" as appropriate. + _writeNewline() { + if (this._lineState === LineState.Closed) { + if (this._emitCommentFraming) { + this._output.append('/**' + this.eol + ' *'); + } + this._lineState = LineState.StartOfLine; + } + this._previousLineHadContent = this._lineState === LineState.MiddleOfLine; + if (this._emitCommentFraming) { + this._output.append(this.eol + ' *'); + } + else { + this._output.append(this.eol); + } + this._lineState = LineState.StartOfLine; + this._hangingParagraph = false; + } + // Closes the comment, adding the final "*/" delimiter + _writeEnd() { + if (this._lineState === LineState.MiddleOfLine) { + if (this._emitCommentFraming) { + this._writeNewline(); + } + } + if (this._lineState !== LineState.Closed) { + if (this._emitCommentFraming) { + this._output.append('/' + this.eol); + } + this._lineState = LineState.Closed; + } + } +} +//# sourceMappingURL=TSDocEmitter.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.js.map b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.js.map new file mode 100644 index 0000000000000000000000000000000000000000..40d3c10cd0c78410003c6ffe2146233ca727ddaf --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TSDocEmitter.js","sourceRoot":"","sources":["../../src/emitters/TSDocEmitter.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AA4B3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,IAAK,SAIJ;AAJD,WAAK,SAAS;IACZ,6CAAM,CAAA;IACN,uDAAW,CAAA;IACX,yDAAY,CAAA;AACd,CAAC,EAJI,SAAS,KAAT,SAAS,QAIb;AAED;;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BAAmB,EAAE,CAAC;gBAC7B,IAAI,CAAC,OAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;YAChD,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC;QAC1C,CAAC;QAED,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,YAAY,CAAC;QAE1E,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC;QACxC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACjC,CAAC;IAED,sDAAsD;IAC9C,SAAS;QACf,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,YAAY,EAAE,CAAC;YAC/C,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC7B,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,MAAM,EAAE,CAAC;YACzC,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC7B,IAAI,CAAC,OAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACvC,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC;QACrC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport type {\r\n DocNode,\r\n DocComment,\r\n DocPlainText,\r\n DocSection,\r\n DocBlock,\r\n DocParagraph,\r\n DocBlockTag,\r\n DocCodeSpan,\r\n DocFencedCode,\r\n DocDeclarationReference,\r\n DocErrorText,\r\n DocEscapedText,\r\n DocHtmlEndTag,\r\n DocHtmlStartTag,\r\n DocHtmlAttribute,\r\n DocInheritDocTag,\r\n DocInlineTagBase,\r\n DocInlineTag,\r\n DocLinkTag,\r\n DocMemberIdentifier,\r\n DocMemberReference,\r\n DocMemberSymbol,\r\n DocMemberSelector,\r\n DocParamBlock\r\n} from '../nodes';\r\nimport { DocNodeKind } from '../nodes/DocNode';\r\nimport type { IStringBuilder } from './StringBuilder';\r\nimport { DocNodeTransforms } from '../transforms/DocNodeTransforms';\r\nimport { StandardTags } from '../details/StandardTags';\r\nimport type { DocParamCollection } from '../nodes/DocParamCollection';\r\n\r\nenum LineState {\r\n Closed,\r\n StartOfLine,\r\n MiddleOfLine\r\n}\r\n\r\n/**\r\n * Renders a DocNode tree as a code comment.\r\n */\r\nexport class TSDocEmitter {\r\n public readonly eol: string = '\\n';\r\n\r\n // Whether to emit the /** */ framing\r\n private _emitCommentFraming: boolean = true;\r\n\r\n private _output: IStringBuilder | undefined;\r\n\r\n // This state machine is used by the writer functions to generate the /** */ framing around the emitted lines\r\n private _lineState: LineState = LineState.Closed;\r\n\r\n // State for _ensureLineSkipped()\r\n private _previousLineHadContent: boolean = false;\r\n\r\n // Normally a paragraph is precede by a blank line (unless it's the first thing written).\r\n // But sometimes we want the paragraph to be attached to the previous element, e.g. when it's part of\r\n // an \"@param\" block. Setting _hangingParagraph=true accomplishes that.\r\n private _hangingParagraph: boolean = false;\r\n\r\n public renderComment(output: IStringBuilder, docComment: DocComment): void {\r\n this._emitCommentFraming = true;\r\n this._renderCompleteObject(output, docComment);\r\n }\r\n\r\n public renderHtmlTag(output: IStringBuilder, htmlTag: DocHtmlStartTag | DocHtmlEndTag): void {\r\n this._emitCommentFraming = false;\r\n this._renderCompleteObject(output, htmlTag);\r\n }\r\n\r\n public renderDeclarationReference(\r\n output: IStringBuilder,\r\n declarationReference: DocDeclarationReference\r\n ): void {\r\n this._emitCommentFraming = false;\r\n this._renderCompleteObject(output, declarationReference);\r\n }\r\n\r\n private _renderCompleteObject(output: IStringBuilder, docNode: DocNode): void {\r\n this._output = output;\r\n\r\n this._lineState = LineState.Closed;\r\n this._previousLineHadContent = false;\r\n this._hangingParagraph = false;\r\n\r\n this._renderNode(docNode);\r\n\r\n this._writeEnd();\r\n }\r\n\r\n private _renderNode(docNode: DocNode | undefined): void {\r\n if (docNode === undefined) {\r\n return;\r\n }\r\n\r\n switch (docNode.kind) {\r\n case DocNodeKind.Block:\r\n const docBlock: DocBlock = docNode as DocBlock;\r\n this._ensureLineSkipped();\r\n this._renderNode(docBlock.blockTag);\r\n\r\n if (\r\n docBlock.blockTag.tagNameWithUpperCase === StandardTags.returns.tagNameWithUpperCase ||\r\n docBlock.blockTag.tagNameWithUpperCase === StandardTags.defaultValue.tagNameWithUpperCase\r\n ) {\r\n this._writeContent(' ');\r\n this._hangingParagraph = true;\r\n }\r\n\r\n this._renderNode(docBlock.content);\r\n break;\r\n\r\n case DocNodeKind.BlockTag:\r\n const docBlockTag: DocBlockTag = docNode as DocBlockTag;\r\n if (this._lineState === LineState.MiddleOfLine) {\r\n this._writeContent(' ');\r\n }\r\n this._writeContent(docBlockTag.tagName);\r\n break;\r\n\r\n case DocNodeKind.CodeSpan:\r\n const docCodeSpan: DocCodeSpan = docNode as DocCodeSpan;\r\n this._writeContent('`');\r\n this._writeContent(docCodeSpan.code);\r\n this._writeContent('`');\r\n break;\r\n\r\n case DocNodeKind.Comment:\r\n const docComment: DocComment = docNode as DocComment;\r\n this._renderNodes([\r\n docComment.summarySection,\r\n docComment.remarksBlock,\r\n docComment.privateRemarks,\r\n docComment.deprecatedBlock,\r\n docComment.params,\r\n docComment.typeParams,\r\n docComment.returnsBlock,\r\n ...docComment.customBlocks,\r\n ...docComment.seeBlocks,\r\n docComment.inheritDocTag\r\n ]);\r\n if (docComment.modifierTagSet.nodes.length > 0) {\r\n this._ensureLineSkipped();\r\n this._renderNodes(docComment.modifierTagSet.nodes);\r\n }\r\n break;\r\n\r\n case DocNodeKind.DeclarationReference:\r\n const docDeclarationReference: DocDeclarationReference = docNode as DocDeclarationReference;\r\n this._writeContent(docDeclarationReference.packageName);\r\n this._writeContent(docDeclarationReference.importPath);\r\n if (\r\n docDeclarationReference.packageName !== undefined ||\r\n docDeclarationReference.importPath !== undefined\r\n ) {\r\n this._writeContent('#');\r\n }\r\n this._renderNodes(docDeclarationReference.memberReferences);\r\n break;\r\n\r\n case DocNodeKind.ErrorText:\r\n const docErrorText: DocErrorText = docNode as DocErrorText;\r\n this._writeContent(docErrorText.text);\r\n break;\r\n\r\n case DocNodeKind.EscapedText:\r\n const docEscapedText: DocEscapedText = docNode as DocEscapedText;\r\n this._writeContent(docEscapedText.encodedText);\r\n break;\r\n\r\n case DocNodeKind.FencedCode:\r\n const docFencedCode: DocFencedCode = docNode as DocFencedCode;\r\n\r\n this._ensureAtStartOfLine();\r\n\r\n this._writeContent('```');\r\n this._writeContent(docFencedCode.language);\r\n this._writeNewline();\r\n this._writeContent(docFencedCode.code);\r\n this._writeContent('```');\r\n this._writeNewline();\r\n this._writeNewline();\r\n break;\r\n\r\n case DocNodeKind.HtmlAttribute:\r\n const docHtmlAttribute: DocHtmlAttribute = docNode as DocHtmlAttribute;\r\n this._writeContent(docHtmlAttribute.name);\r\n this._writeContent(docHtmlAttribute.spacingAfterName);\r\n this._writeContent('=');\r\n this._writeContent(docHtmlAttribute.spacingAfterEquals);\r\n this._writeContent(docHtmlAttribute.value);\r\n this._writeContent(docHtmlAttribute.spacingAfterValue);\r\n break;\r\n\r\n case DocNodeKind.HtmlEndTag:\r\n const docHtmlEndTag: DocHtmlEndTag = docNode as DocHtmlEndTag;\r\n this._writeContent('');\r\n break;\r\n\r\n case DocNodeKind.HtmlStartTag:\r\n const docHtmlStartTag: DocHtmlStartTag = docNode as DocHtmlStartTag;\r\n this._writeContent('<');\r\n this._writeContent(docHtmlStartTag.name);\r\n this._writeContent(docHtmlStartTag.spacingAfterName);\r\n\r\n let needsSpace: boolean =\r\n docHtmlStartTag.spacingAfterName === undefined || docHtmlStartTag.spacingAfterName.length === 0;\r\n\r\n for (const attribute of docHtmlStartTag.htmlAttributes) {\r\n if (needsSpace) {\r\n this._writeContent(' ');\r\n }\r\n this._renderNode(attribute);\r\n needsSpace = attribute.spacingAfterValue === undefined || attribute.spacingAfterValue.length === 0;\r\n }\r\n this._writeContent(docHtmlStartTag.selfClosingTag ? '/>' : '>');\r\n break;\r\n\r\n case DocNodeKind.InheritDocTag:\r\n const docInheritDocTag: DocInheritDocTag = docNode as DocInheritDocTag;\r\n this._renderInlineTag(docInheritDocTag, () => {\r\n if (docInheritDocTag.declarationReference) {\r\n this._writeContent(' ');\r\n this._renderNode(docInheritDocTag.declarationReference);\r\n }\r\n });\r\n break;\r\n\r\n case DocNodeKind.InlineTag:\r\n const docInlineTag: DocInlineTag = docNode as DocInlineTag;\r\n this._renderInlineTag(docInlineTag, () => {\r\n if (docInlineTag.tagContent.length > 0) {\r\n this._writeContent(' ');\r\n this._writeContent(docInlineTag.tagContent);\r\n }\r\n });\r\n break;\r\n\r\n case DocNodeKind.LinkTag:\r\n const docLinkTag: DocLinkTag = docNode as DocLinkTag;\r\n this._renderInlineTag(docLinkTag, () => {\r\n if (docLinkTag.urlDestination !== undefined || docLinkTag.codeDestination !== undefined) {\r\n if (docLinkTag.urlDestination !== undefined) {\r\n this._writeContent(' ');\r\n this._writeContent(docLinkTag.urlDestination);\r\n } else if (docLinkTag.codeDestination !== undefined) {\r\n this._writeContent(' ');\r\n this._renderNode(docLinkTag.codeDestination);\r\n }\r\n }\r\n if (docLinkTag.linkText !== undefined) {\r\n this._writeContent(' ');\r\n this._writeContent('|');\r\n this._writeContent(' ');\r\n this._writeContent(docLinkTag.linkText);\r\n }\r\n });\r\n break;\r\n\r\n case DocNodeKind.MemberIdentifier:\r\n const docMemberIdentifier: DocMemberIdentifier = docNode as DocMemberIdentifier;\r\n if (docMemberIdentifier.hasQuotes) {\r\n this._writeContent('\"');\r\n this._writeContent(docMemberIdentifier.identifier); // todo: encoding\r\n this._writeContent('\"');\r\n } else {\r\n this._writeContent(docMemberIdentifier.identifier);\r\n }\r\n break;\r\n\r\n case DocNodeKind.MemberReference:\r\n const docMemberReference: DocMemberReference = docNode as DocMemberReference;\r\n if (docMemberReference.hasDot) {\r\n this._writeContent('.');\r\n }\r\n\r\n if (docMemberReference.selector) {\r\n this._writeContent('(');\r\n }\r\n\r\n if (docMemberReference.memberSymbol) {\r\n this._renderNode(docMemberReference.memberSymbol);\r\n } else {\r\n this._renderNode(docMemberReference.memberIdentifier);\r\n }\r\n\r\n if (docMemberReference.selector) {\r\n this._writeContent(':');\r\n this._renderNode(docMemberReference.selector);\r\n this._writeContent(')');\r\n }\r\n break;\r\n\r\n case DocNodeKind.MemberSelector:\r\n const docMemberSelector: DocMemberSelector = docNode as DocMemberSelector;\r\n this._writeContent(docMemberSelector.selector);\r\n break;\r\n\r\n case DocNodeKind.MemberSymbol:\r\n const docMemberSymbol: DocMemberSymbol = docNode as DocMemberSymbol;\r\n this._writeContent('[');\r\n this._renderNode(docMemberSymbol.symbolReference);\r\n this._writeContent(']');\r\n break;\r\n\r\n case DocNodeKind.Section:\r\n const docSection: DocSection = docNode as DocSection;\r\n this._renderNodes(docSection.nodes);\r\n break;\r\n\r\n case DocNodeKind.Paragraph:\r\n const trimmedParagraph: DocParagraph = DocNodeTransforms.trimSpacesInParagraph(\r\n docNode as DocParagraph\r\n );\r\n if (trimmedParagraph.nodes.length > 0) {\r\n if (this._hangingParagraph) {\r\n // If it's a hanging paragraph, then don't skip a line\r\n this._hangingParagraph = false;\r\n } else {\r\n this._ensureLineSkipped();\r\n }\r\n\r\n this._renderNodes(trimmedParagraph.nodes);\r\n this._writeNewline();\r\n }\r\n break;\r\n\r\n case DocNodeKind.ParamBlock:\r\n const docParamBlock: DocParamBlock = docNode as DocParamBlock;\r\n this._ensureLineSkipped();\r\n this._renderNode(docParamBlock.blockTag);\r\n this._writeContent(' ');\r\n this._writeContent(docParamBlock.parameterName);\r\n this._writeContent(' - ');\r\n this._hangingParagraph = true;\r\n this._renderNode(docParamBlock.content);\r\n this._hangingParagraph = false;\r\n break;\r\n\r\n case DocNodeKind.ParamCollection:\r\n const docParamCollection: DocParamCollection = docNode as DocParamCollection;\r\n this._renderNodes(docParamCollection.blocks);\r\n break;\r\n\r\n case DocNodeKind.PlainText:\r\n const docPlainText: DocPlainText = docNode as DocPlainText;\r\n this._writeContent(docPlainText.text);\r\n break;\r\n }\r\n }\r\n\r\n private _renderInlineTag(docInlineTagBase: DocInlineTagBase, writeInlineTagContent: () => void): void {\r\n this._writeContent('{');\r\n this._writeContent(docInlineTagBase.tagName);\r\n writeInlineTagContent();\r\n this._writeContent('}');\r\n }\r\n\r\n private _renderNodes(docNodes: ReadonlyArray): void {\r\n for (const docNode of docNodes) {\r\n this._renderNode(docNode);\r\n }\r\n }\r\n\r\n // Calls _writeNewline() only if we're not already at the start of a new line\r\n private _ensureAtStartOfLine(): void {\r\n if (this._lineState === LineState.MiddleOfLine) {\r\n this._writeNewline();\r\n }\r\n }\r\n\r\n // Calls _writeNewline() if needed to ensure that we have skipped at least one line\r\n private _ensureLineSkipped(): void {\r\n this._ensureAtStartOfLine();\r\n if (this._previousLineHadContent) {\r\n this._writeNewline();\r\n }\r\n }\r\n\r\n // Writes literal text content. If it contains newlines, they will automatically be converted to\r\n // _writeNewline() calls, to ensure that \"*\" is written at the start of each line.\r\n private _writeContent(content: string | undefined): void {\r\n if (content === undefined || content.length === 0) {\r\n return;\r\n }\r\n\r\n const splitLines: string[] = content.split(/\\r?\\n/g);\r\n if (splitLines.length > 1) {\r\n let firstLine: boolean = true;\r\n for (const line of splitLines) {\r\n if (firstLine) {\r\n firstLine = false;\r\n } else {\r\n this._writeNewline();\r\n }\r\n this._writeContent(line);\r\n }\r\n return;\r\n }\r\n\r\n if (this._lineState === LineState.Closed) {\r\n if (this._emitCommentFraming) {\r\n this._output!.append('/**' + this.eol + ' *');\r\n }\r\n this._lineState = LineState.StartOfLine;\r\n }\r\n\r\n if (this._lineState === LineState.StartOfLine) {\r\n if (this._emitCommentFraming) {\r\n this._output!.append(' ');\r\n }\r\n }\r\n\r\n this._output!.append(content);\r\n this._lineState = LineState.MiddleOfLine;\r\n this._previousLineHadContent = true;\r\n }\r\n\r\n // Starts a new line, and inserts \"/**\" or \"*\" as appropriate.\r\n private _writeNewline(): void {\r\n if (this._lineState === LineState.Closed) {\r\n if (this._emitCommentFraming) {\r\n this._output!.append('/**' + this.eol + ' *');\r\n }\r\n this._lineState = LineState.StartOfLine;\r\n }\r\n\r\n this._previousLineHadContent = this._lineState === LineState.MiddleOfLine;\r\n\r\n if (this._emitCommentFraming) {\r\n this._output!.append(this.eol + ' *');\r\n } else {\r\n this._output!.append(this.eol);\r\n }\r\n\r\n this._lineState = LineState.StartOfLine;\r\n this._hangingParagraph = false;\r\n }\r\n\r\n // Closes the comment, adding the final \"*/\" delimiter\r\n private _writeEnd(): void {\r\n if (this._lineState === LineState.MiddleOfLine) {\r\n if (this._emitCommentFraming) {\r\n this._writeNewline();\r\n }\r\n }\r\n\r\n if (this._lineState !== LineState.Closed) {\r\n if (this._emitCommentFraming) {\r\n this._output!.append('/' + this.eol);\r\n }\r\n this._lineState = LineState.Closed;\r\n }\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/index.d.ts b/node_modules/@microsoft/tsdoc/lib/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0deda15f15fab7d2288694f334624bb030eaed01 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/index.d.ts @@ -0,0 +1,22 @@ +export { DocNodeManager, type IDocNodeDefinition, type DocNodeConstructor } from './configuration/DocNodeManager'; +export { TSDocConfiguration } from './configuration/TSDocConfiguration'; +export { type ITSDocTagDefinitionParameters, TSDocTagSyntaxKind, TSDocTagDefinition } from './configuration/TSDocTagDefinition'; +export { TSDocValidationConfiguration } from './configuration/TSDocValidationConfiguration'; +export { StandardTags } from './details/StandardTags'; +export { Standardization } from './details/Standardization'; +export { StandardModifierTagSet } from './details/StandardModifierTagSet'; +export { ModifierTagSet } from './details/ModifierTagSet'; +export { PlainTextEmitter } from './emitters/PlainTextEmitter'; +export { StringBuilder, type IStringBuilder } from './emitters/StringBuilder'; +export { TSDocEmitter } from './emitters/TSDocEmitter'; +export * from './nodes'; +export { ParserContext } from './parser/ParserContext'; +export { ParserMessage, type IParserMessageParameters } from './parser/ParserMessage'; +export { ParserMessageLog } from './parser/ParserMessageLog'; +export { TextRange, type ITextLocation } from './parser/TextRange'; +export { Token, TokenKind } from './parser/Token'; +export { TokenSequence, type ITokenSequenceParameters } from './parser/TokenSequence'; +export { TSDocMessageId } from './parser/TSDocMessageId'; +export { TSDocParser } from './parser/TSDocParser'; +export { DocNodeTransforms } from './transforms/DocNodeTransforms'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/index.d.ts.map b/node_modules/@microsoft/tsdoc/lib/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1880eb1b8f12281b1da3e2c18b81263684a6bbcc --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EACL,KAAK,6BAA6B,EAClC,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/index.js b/node_modules/@microsoft/tsdoc/lib/index.js new file mode 100644 index 0000000000000000000000000000000000000000..44d9290e8fb5d6692d15ef02a334dac467c0d4c0 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/index.js @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +export { DocNodeManager } from './configuration/DocNodeManager'; +export { TSDocConfiguration } from './configuration/TSDocConfiguration'; +export { TSDocTagSyntaxKind, TSDocTagDefinition } from './configuration/TSDocTagDefinition'; +export { TSDocValidationConfiguration } from './configuration/TSDocValidationConfiguration'; +export { StandardTags } from './details/StandardTags'; +export { Standardization } from './details/Standardization'; +export { StandardModifierTagSet } from './details/StandardModifierTagSet'; +export { ModifierTagSet } from './details/ModifierTagSet'; +export { PlainTextEmitter } from './emitters/PlainTextEmitter'; +export { StringBuilder } from './emitters/StringBuilder'; +export { TSDocEmitter } from './emitters/TSDocEmitter'; +export * from './nodes'; +export { ParserContext } from './parser/ParserContext'; +export { ParserMessage } from './parser/ParserMessage'; +export { ParserMessageLog } from './parser/ParserMessageLog'; +export { TextRange } from './parser/TextRange'; +export { Token, TokenKind } from './parser/Token'; +export { TokenSequence } from './parser/TokenSequence'; +export { TSDocMessageId } from './parser/TSDocMessageId'; +export { TSDocParser } from './parser/TSDocParser'; +export { DocNodeTransforms } from './transforms/DocNodeTransforms'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/index.js.map b/node_modules/@microsoft/tsdoc/lib/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..315e2a70a060ee515363c6501a09fffb632560f4 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,cAAc,EAGf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAuB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAiC,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAsB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAiC,MAAM,wBAAwB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nexport {\r\n DocNodeManager,\r\n type IDocNodeDefinition,\r\n type DocNodeConstructor\r\n} from './configuration/DocNodeManager';\r\nexport { TSDocConfiguration } from './configuration/TSDocConfiguration';\r\nexport {\r\n type ITSDocTagDefinitionParameters,\r\n TSDocTagSyntaxKind,\r\n TSDocTagDefinition\r\n} from './configuration/TSDocTagDefinition';\r\nexport { TSDocValidationConfiguration } from './configuration/TSDocValidationConfiguration';\r\n\r\nexport { StandardTags } from './details/StandardTags';\r\nexport { Standardization } from './details/Standardization';\r\nexport { StandardModifierTagSet } from './details/StandardModifierTagSet';\r\nexport { ModifierTagSet } from './details/ModifierTagSet';\r\n\r\nexport { PlainTextEmitter } from './emitters/PlainTextEmitter';\r\nexport { StringBuilder, type IStringBuilder } from './emitters/StringBuilder';\r\nexport { TSDocEmitter } from './emitters/TSDocEmitter';\r\n\r\nexport * from './nodes';\r\n\r\nexport { ParserContext } from './parser/ParserContext';\r\nexport { ParserMessage, type IParserMessageParameters } from './parser/ParserMessage';\r\nexport { ParserMessageLog } from './parser/ParserMessageLog';\r\nexport { TextRange, type ITextLocation } from './parser/TextRange';\r\nexport { Token, TokenKind } from './parser/Token';\r\nexport { TokenSequence, type ITokenSequenceParameters } from './parser/TokenSequence';\r\nexport { TSDocMessageId } from './parser/TSDocMessageId';\r\nexport { TSDocParser } from './parser/TSDocParser';\r\n\r\nexport { DocNodeTransforms } from './transforms/DocNodeTransforms';\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..112af80f088eb364d7f1ebe356d3722f493a0e06 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.d.ts @@ -0,0 +1,5 @@ +import type { TSDocConfiguration } from '../configuration/TSDocConfiguration'; +export declare class BuiltInDocNodes { + static register(configuration: TSDocConfiguration): void; +} +//# sourceMappingURL=BuiltInDocNodes.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..892ecf8f64ed6da1b060d7ce038c8602091e7ad7 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BuiltInDocNodes.d.ts","sourceRoot":"","sources":["../../src/nodes/BuiltInDocNodes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAK9E,qBAAa,eAAe;WACZ,QAAQ,CAAC,aAAa,EAAE,kBAAkB,GAAG,IAAI;CAmDhE"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.js b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.js new file mode 100644 index 0000000000000000000000000000000000000000..210ac76a0bd7bcec436931e94c2684587be276fc --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.js @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind } from './DocNode'; +import * as nodes from '..'; +export class BuiltInDocNodes { + static register(configuration) { + const docNodeManager = configuration.docNodeManager; + docNodeManager.registerDocNodes('@microsoft/tsdoc', [ + { docNodeKind: DocNodeKind.Block, constructor: nodes.DocBlock }, + { docNodeKind: DocNodeKind.BlockTag, constructor: nodes.DocBlockTag }, + { docNodeKind: DocNodeKind.CodeSpan, constructor: nodes.DocCodeSpan }, + { docNodeKind: DocNodeKind.Comment, constructor: nodes.DocComment }, + { docNodeKind: DocNodeKind.DeclarationReference, constructor: nodes.DocDeclarationReference }, + { docNodeKind: DocNodeKind.ErrorText, constructor: nodes.DocErrorText }, + { docNodeKind: DocNodeKind.EscapedText, constructor: nodes.DocEscapedText }, + { docNodeKind: DocNodeKind.Excerpt, constructor: nodes.DocExcerpt }, + { docNodeKind: DocNodeKind.FencedCode, constructor: nodes.DocFencedCode }, + { docNodeKind: DocNodeKind.HtmlAttribute, constructor: nodes.DocHtmlAttribute }, + { docNodeKind: DocNodeKind.HtmlEndTag, constructor: nodes.DocHtmlEndTag }, + { docNodeKind: DocNodeKind.HtmlStartTag, constructor: nodes.DocHtmlStartTag }, + { docNodeKind: DocNodeKind.InheritDocTag, constructor: nodes.DocInheritDocTag }, + { docNodeKind: DocNodeKind.InlineTag, constructor: nodes.DocInlineTag }, + { docNodeKind: DocNodeKind.LinkTag, constructor: nodes.DocLinkTag }, + { docNodeKind: DocNodeKind.MemberIdentifier, constructor: nodes.DocMemberIdentifier }, + { docNodeKind: DocNodeKind.MemberReference, constructor: nodes.DocMemberReference }, + { docNodeKind: DocNodeKind.MemberSelector, constructor: nodes.DocMemberSelector }, + { docNodeKind: DocNodeKind.MemberSymbol, constructor: nodes.DocMemberSymbol }, + { docNodeKind: DocNodeKind.Paragraph, constructor: nodes.DocParagraph }, + { docNodeKind: DocNodeKind.ParamBlock, constructor: nodes.DocParamBlock }, + { docNodeKind: DocNodeKind.ParamCollection, constructor: nodes.DocParamCollection }, + { docNodeKind: DocNodeKind.PlainText, constructor: nodes.DocPlainText }, + { docNodeKind: DocNodeKind.Section, constructor: nodes.DocSection }, + { docNodeKind: DocNodeKind.SoftBreak, constructor: nodes.DocSoftBreak } + ]); + docNodeManager.registerAllowableChildren(DocNodeKind.Section, [ + DocNodeKind.FencedCode, + DocNodeKind.Paragraph, + DocNodeKind.HtmlStartTag, + DocNodeKind.HtmlEndTag + ]); + docNodeManager.registerAllowableChildren(DocNodeKind.Paragraph, [ + DocNodeKind.BlockTag, + DocNodeKind.CodeSpan, + DocNodeKind.ErrorText, + DocNodeKind.EscapedText, + DocNodeKind.HtmlStartTag, + DocNodeKind.HtmlEndTag, + DocNodeKind.InlineTag, + DocNodeKind.LinkTag, + DocNodeKind.PlainText, + DocNodeKind.SoftBreak + ]); + } +} +//# sourceMappingURL=BuiltInDocNodes.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.js.map new file mode 100644 index 0000000000000000000000000000000000000000..28ba154b1d72289f5e854378659b29031bf3a939 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/BuiltInDocNodes.js.map @@ -0,0 +1 @@ +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EAAE,WAAW,EAAE,KAAK,CAAC,YAAY,EAAE;SACxE,CAAC,CAAC;QAEH,cAAc,CAAC,yBAAyB,CAAC,WAAW,CAAC,OAAO,EAAE;YAC5D,WAAW,CAAC,UAAU;YACtB,WAAW,CAAC,SAAS;YACrB,WAAW,CAAC,YAAY;YACxB,WAAW,CAAC,UAAU;SACvB,CAAC,CAAC;QAEH,cAAc,CAAC,yBAAyB,CAAC,WAAW,CAAC,SAAS,EAAE;YAC9D,WAAW,CAAC,QAAQ;YACpB,WAAW,CAAC,QAAQ;YACpB,WAAW,CAAC,SAAS;YACrB,WAAW,CAAC,WAAW;YACvB,WAAW,CAAC,YAAY;YACxB,WAAW,CAAC,UAAU;YACtB,WAAW,CAAC,SAAS;YACrB,WAAW,CAAC,OAAO;YACnB,WAAW,CAAC,SAAS;YACrB,WAAW,CAAC,SAAS;SACtB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport type { TSDocConfiguration } from '../configuration/TSDocConfiguration';\r\nimport type { DocNodeManager } from '../configuration/DocNodeManager';\r\nimport { DocNodeKind } from './DocNode';\r\nimport * as nodes from '..';\r\n\r\nexport class BuiltInDocNodes {\r\n public static register(configuration: TSDocConfiguration): void {\r\n const docNodeManager: DocNodeManager = configuration.docNodeManager;\r\n\r\n docNodeManager.registerDocNodes('@microsoft/tsdoc', [\r\n { docNodeKind: DocNodeKind.Block, constructor: nodes.DocBlock },\r\n { docNodeKind: DocNodeKind.BlockTag, constructor: nodes.DocBlockTag },\r\n { docNodeKind: DocNodeKind.CodeSpan, constructor: nodes.DocCodeSpan },\r\n { docNodeKind: DocNodeKind.Comment, constructor: nodes.DocComment },\r\n { docNodeKind: DocNodeKind.DeclarationReference, constructor: nodes.DocDeclarationReference },\r\n { docNodeKind: DocNodeKind.ErrorText, constructor: nodes.DocErrorText },\r\n { docNodeKind: DocNodeKind.EscapedText, constructor: nodes.DocEscapedText },\r\n { docNodeKind: DocNodeKind.Excerpt, constructor: nodes.DocExcerpt },\r\n { docNodeKind: DocNodeKind.FencedCode, constructor: nodes.DocFencedCode },\r\n { docNodeKind: DocNodeKind.HtmlAttribute, constructor: nodes.DocHtmlAttribute },\r\n { docNodeKind: DocNodeKind.HtmlEndTag, constructor: nodes.DocHtmlEndTag },\r\n { docNodeKind: DocNodeKind.HtmlStartTag, constructor: nodes.DocHtmlStartTag },\r\n { docNodeKind: DocNodeKind.InheritDocTag, constructor: nodes.DocInheritDocTag },\r\n { docNodeKind: DocNodeKind.InlineTag, constructor: nodes.DocInlineTag },\r\n { docNodeKind: DocNodeKind.LinkTag, constructor: nodes.DocLinkTag },\r\n { docNodeKind: DocNodeKind.MemberIdentifier, constructor: nodes.DocMemberIdentifier },\r\n { docNodeKind: DocNodeKind.MemberReference, constructor: nodes.DocMemberReference },\r\n { docNodeKind: DocNodeKind.MemberSelector, constructor: nodes.DocMemberSelector },\r\n { docNodeKind: DocNodeKind.MemberSymbol, constructor: nodes.DocMemberSymbol },\r\n { docNodeKind: DocNodeKind.Paragraph, constructor: nodes.DocParagraph },\r\n { docNodeKind: DocNodeKind.ParamBlock, constructor: nodes.DocParamBlock },\r\n { docNodeKind: DocNodeKind.ParamCollection, constructor: nodes.DocParamCollection },\r\n { docNodeKind: DocNodeKind.PlainText, constructor: nodes.DocPlainText },\r\n { docNodeKind: DocNodeKind.Section, constructor: nodes.DocSection },\r\n { docNodeKind: DocNodeKind.SoftBreak, constructor: nodes.DocSoftBreak }\r\n ]);\r\n\r\n docNodeManager.registerAllowableChildren(DocNodeKind.Section, [\r\n DocNodeKind.FencedCode,\r\n DocNodeKind.Paragraph,\r\n DocNodeKind.HtmlStartTag,\r\n DocNodeKind.HtmlEndTag\r\n ]);\r\n\r\n docNodeManager.registerAllowableChildren(DocNodeKind.Paragraph, [\r\n DocNodeKind.BlockTag,\r\n DocNodeKind.CodeSpan,\r\n DocNodeKind.ErrorText,\r\n DocNodeKind.EscapedText,\r\n DocNodeKind.HtmlStartTag,\r\n DocNodeKind.HtmlEndTag,\r\n DocNodeKind.InlineTag,\r\n DocNodeKind.LinkTag,\r\n DocNodeKind.PlainText,\r\n DocNodeKind.SoftBreak\r\n ]);\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..84ffa849101b67b6024c0153394adf33ace910f8 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts @@ -0,0 +1,41 @@ +import { DocNodeKind, DocNode, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode'; +import { DocSection } from './DocSection'; +import type { DocBlockTag } from './DocBlockTag'; +/** + * Constructor parameters for {@link DocBlock}. + */ +export interface IDocBlockParameters extends IDocNodeParameters { + blockTag: DocBlockTag; +} +/** + * Constructor parameters for {@link DocBlock}. + */ +export interface IDocBlockParsedParameters extends IDocNodeParsedParameters { + blockTag: DocBlockTag; +} +/** + * Represents a section that is introduced by a TSDoc block tag. + * For example, an `@example` block. + */ +export declare class DocBlock extends DocNode { + private readonly _blockTag; + private readonly _content; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocBlockParameters | IDocBlockParsedParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The TSDoc tag that introduces this section. + */ + get blockTag(): DocBlockTag; + /** + * The TSDoc tag that introduces this section. + */ + get content(): DocSection; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; +} +//# sourceMappingURL=DocBlock.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a15cecce618f7e5849252b748372720a5e26be7c --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocBlock.d.ts","sourceRoot":"","sources":["../../src/nodes/DocBlock.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IACzE,QAAQ,EAAE,WAAW,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,QAAS,SAAQ,OAAO;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;IAEtC;;;OAGG;gBACgB,UAAU,EAAE,mBAAmB,GAAG,yBAAyB;IAM9E,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;OAEG;IACH,IAAW,QAAQ,IAAI,WAAW,CAEjC;IAED;;OAEG;IACH,IAAW,OAAO,IAAI,UAAU,CAE/B;IAED,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;CAGhE"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.js new file mode 100644 index 0000000000000000000000000000000000000000..734c27c9f3130945a1e706f1b78461ccd2e32524 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.js @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind, DocNode } from './DocNode'; +import { DocSection } from './DocSection'; +/** + * Represents a section that is introduced by a TSDoc block tag. + * For example, an `@example` block. + */ +export class DocBlock extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + this._blockTag = parameters.blockTag; + this._content = new DocSection({ configuration: this.configuration }); + } + /** @override */ + get kind() { + return DocNodeKind.Block; + } + /** + * The TSDoc tag that introduces this section. + */ + get blockTag() { + return this._blockTag; + } + /** + * The TSDoc tag that introduces this section. + */ + get content() { + return this._content; + } + /** @override */ + onGetChildNodes() { + return [this.blockTag, this._content]; + } +} +//# sourceMappingURL=DocBlock.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.js.map new file mode 100644 index 0000000000000000000000000000000000000000..7b2edc2969d78a10faa493550fe823048ed9b586 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlock.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocBlock.js","sourceRoot":"","sources":["../../src/nodes/DocBlock.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAA0D,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,OAAO;IAInC;;;OAGG;IACH,YAAmB,UAA2D;QAC5E,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNodeKind, DocNode, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode';\r\nimport { DocSection } from './DocSection';\r\nimport type { DocBlockTag } from './DocBlockTag';\r\n\r\n/**\r\n * Constructor parameters for {@link DocBlock}.\r\n */\r\nexport interface IDocBlockParameters extends IDocNodeParameters {\r\n blockTag: DocBlockTag;\r\n}\r\n\r\n/**\r\n * Constructor parameters for {@link DocBlock}.\r\n */\r\nexport interface IDocBlockParsedParameters extends IDocNodeParsedParameters {\r\n blockTag: DocBlockTag;\r\n}\r\n\r\n/**\r\n * Represents a section that is introduced by a TSDoc block tag.\r\n * For example, an `@example` block.\r\n */\r\nexport class DocBlock extends DocNode {\r\n private readonly _blockTag: DocBlockTag;\r\n private readonly _content: DocSection;\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocBlockParameters | IDocBlockParsedParameters) {\r\n super(parameters);\r\n this._blockTag = parameters.blockTag;\r\n this._content = new DocSection({ configuration: this.configuration });\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.Block;\r\n }\r\n\r\n /**\r\n * The TSDoc tag that introduces this section.\r\n */\r\n public get blockTag(): DocBlockTag {\r\n return this._blockTag;\r\n }\r\n\r\n /**\r\n * The TSDoc tag that introduces this section.\r\n */\r\n public get content(): DocSection {\r\n return this._content;\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [this.blockTag, this._content];\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3871e367f009f9e3926a13cce29a732cdbad8680 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts @@ -0,0 +1,44 @@ +import { DocNodeKind, DocNode, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode'; +import type { TokenSequence } from '../parser/TokenSequence'; +/** + * Constructor parameters for {@link DocBlockTag}. + */ +export interface IDocBlockTagParameters extends IDocNodeParameters { + tagName: string; +} +/** + * Constructor parameters for {@link DocBlockTag}. + */ +export interface IDocBlockTagParsedParameters extends IDocNodeParsedParameters { + tagName: string; + tagNameExcerpt: TokenSequence; +} +/** + * Represents a TSDoc block tag such as `@param` or `@public`. + */ +export declare class DocBlockTag extends DocNode { + private readonly _tagName; + private readonly _tagNameWithUpperCase; + private readonly _tagNameExcerpt; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocBlockTagParameters | IDocBlockTagParsedParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed + * by ASCII letters using "camelCase" capitalization. + */ + get tagName(): string; + /** + * The TSDoc tag name in all capitals, which is used for performing + * case-insensitive comparisons or lookups. + */ + get tagNameWithUpperCase(): string; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; + getTokenSequence(): TokenSequence; +} +//# sourceMappingURL=DocBlockTag.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..5a208483d03833c44bb1f316d8ec5630b99a8a15 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocBlockTag.d.ts","sourceRoot":"","sources":["../../src/nodes/DocBlockTag.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAEzG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,aAAa,CAAC;CAC/B;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,OAAO;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAS;IAC/C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyB;IAEzD;;;OAGG;gBACgB,UAAU,EAAE,sBAAsB,GAAG,4BAA4B;IAgBpF,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;;OAGG;IACH,IAAW,OAAO,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,IAAW,oBAAoB,IAAI,MAAM,CAExC;IAED,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;IAIxD,gBAAgB,IAAI,aAAa;CAQzC"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.js new file mode 100644 index 0000000000000000000000000000000000000000..89e75a99842edcb9ce4477e5068dcd50b4782bdc --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.js @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind, DocNode } from './DocNode'; +import { StringChecks } from '../parser/StringChecks'; +import { DocExcerpt, ExcerptKind } from './DocExcerpt'; +/** + * Represents a TSDoc block tag such as `@param` or `@public`. + */ +export class DocBlockTag extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + StringChecks.validateTSDocTagName(parameters.tagName); + this._tagName = parameters.tagName; + this._tagNameWithUpperCase = parameters.tagName.toUpperCase(); + if (DocNode.isParsedParameters(parameters)) { + this._tagNameExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.BlockTag, + content: parameters.tagNameExcerpt + }); + } + } + /** @override */ + get kind() { + return DocNodeKind.BlockTag; + } + /** + * The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed + * by ASCII letters using "camelCase" capitalization. + */ + get tagName() { + return this._tagName; + } + /** + * The TSDoc tag name in all capitals, which is used for performing + * case-insensitive comparisons or lookups. + */ + get tagNameWithUpperCase() { + return this._tagNameWithUpperCase; + } + /** @override */ + onGetChildNodes() { + return [this._tagNameExcerpt]; + } + getTokenSequence() { + if (!this._tagNameExcerpt) { + throw new Error('DocBlockTag.getTokenSequence() failed because this object did not originate from a parsed input'); + } + return this._tagNameExcerpt.content; + } +} +//# sourceMappingURL=DocBlockTag.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.js.map new file mode 100644 index 0000000000000000000000000000000000000000..35737dcec03198fd8869a381a71771c6aaa7ec1e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocBlockTag.js.map @@ -0,0 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IAAI,CAAC,eAAe,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;IACtC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNodeKind, DocNode, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode';\r\nimport { StringChecks } from '../parser/StringChecks';\r\nimport type { TokenSequence } from '../parser/TokenSequence';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\n\r\n/**\r\n * Constructor parameters for {@link DocBlockTag}.\r\n */\r\nexport interface IDocBlockTagParameters extends IDocNodeParameters {\r\n tagName: string;\r\n}\r\n\r\n/**\r\n * Constructor parameters for {@link DocBlockTag}.\r\n */\r\nexport interface IDocBlockTagParsedParameters extends IDocNodeParsedParameters {\r\n tagName: string;\r\n tagNameExcerpt: TokenSequence;\r\n}\r\n\r\n/**\r\n * Represents a TSDoc block tag such as `@param` or `@public`.\r\n */\r\nexport class DocBlockTag extends DocNode {\r\n private readonly _tagName: string;\r\n private readonly _tagNameWithUpperCase: string;\r\n private readonly _tagNameExcerpt: DocExcerpt | undefined;\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocBlockTagParameters | IDocBlockTagParsedParameters) {\r\n super(parameters);\r\n\r\n StringChecks.validateTSDocTagName(parameters.tagName);\r\n this._tagName = parameters.tagName;\r\n this._tagNameWithUpperCase = parameters.tagName.toUpperCase();\r\n\r\n if (DocNode.isParsedParameters(parameters)) {\r\n this._tagNameExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.BlockTag,\r\n content: parameters.tagNameExcerpt\r\n });\r\n }\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.BlockTag;\r\n }\r\n\r\n /**\r\n * The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed\r\n * by ASCII letters using \"camelCase\" capitalization.\r\n */\r\n public get tagName(): string {\r\n return this._tagName;\r\n }\r\n\r\n /**\r\n * The TSDoc tag name in all capitals, which is used for performing\r\n * case-insensitive comparisons or lookups.\r\n */\r\n public get tagNameWithUpperCase(): string {\r\n return this._tagNameWithUpperCase;\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [this._tagNameExcerpt];\r\n }\r\n\r\n public getTokenSequence(): TokenSequence {\r\n if (!this._tagNameExcerpt) {\r\n throw new Error(\r\n 'DocBlockTag.getTokenSequence() failed because this object did not originate from a parsed input'\r\n );\r\n }\r\n return this._tagNameExcerpt.content;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3eb4c7e1f79af9bcc6a43ff399b58da29ca9936a --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts @@ -0,0 +1,40 @@ +import { DocNodeKind, type IDocNodeParameters, DocNode, type IDocNodeParsedParameters } from './DocNode'; +import type { TokenSequence } from '../parser/TokenSequence'; +/** + * Constructor parameters for {@link DocCodeSpan}. + */ +export interface IDocCodeSpanParameters extends IDocNodeParameters { + code: string; +} +/** + * Constructor parameters for {@link DocCodeSpan}. + */ +export interface IDocCodeSpanParsedParameters extends IDocNodeParsedParameters { + openingDelimiterExcerpt: TokenSequence; + codeExcerpt: TokenSequence; + closingDelimiterExcerpt: TokenSequence; +} +/** + * Represents CommonMark-style code span, i.e. code surrounded by + * backtick characters. + */ +export declare class DocCodeSpan extends DocNode { + private readonly _openingDelimiterExcerpt; + private _code; + private readonly _codeExcerpt; + private readonly _closingDelimiterExcerpt; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocCodeSpanParameters | IDocCodeSpanParsedParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The text that should be rendered as code, excluding the backtick delimiters. + */ + get code(): string; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; +} +//# sourceMappingURL=DocCodeSpan.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e3f93dfdcdefdbaaffc54ee6dba2034a9a550f11 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocCodeSpan.d.ts","sourceRoot":"","sources":["../../src/nodes/DocCodeSpan.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,uBAAuB,EAAE,aAAa,CAAC;IAEvC,WAAW,EAAE,aAAa,CAAC;IAE3B,uBAAuB,EAAE,aAAa,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,OAAO;IAEtC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAyB;IAGlE,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyB;IAGtD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAyB;IAElE;;;OAGG;gBACgB,UAAU,EAAE,sBAAsB,GAAG,4BAA4B;IAwBpF,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAKxB;IAED,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;CAGhE"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.js new file mode 100644 index 0000000000000000000000000000000000000000..d167ae30d02cd7f9da012e06f6fed3a55b15b178 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.js @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind, DocNode } from './DocNode'; +import { DocExcerpt, ExcerptKind } from './DocExcerpt'; +/** + * Represents CommonMark-style code span, i.e. code surrounded by + * backtick characters. + */ +export class DocCodeSpan extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + if (DocNode.isParsedParameters(parameters)) { + this._openingDelimiterExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.CodeSpan_OpeningDelimiter, + content: parameters.openingDelimiterExcerpt + }); + this._codeExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.CodeSpan_Code, + content: parameters.codeExcerpt + }); + this._closingDelimiterExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.CodeSpan_ClosingDelimiter, + content: parameters.closingDelimiterExcerpt + }); + } + else { + this._code = parameters.code; + } + } + /** @override */ + get kind() { + return DocNodeKind.CodeSpan; + } + /** + * The text that should be rendered as code, excluding the backtick delimiters. + */ + get code() { + if (this._code === undefined) { + this._code = this._codeExcerpt.content.toString(); + } + return this._code; + } + /** @override */ + onGetChildNodes() { + return [this._openingDelimiterExcerpt, this._codeExcerpt, this._closingDelimiterExcerpt]; + } +} +//# sourceMappingURL=DocCodeSpan.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4f71fbdd50970c6f21cc7db6bef21b8bcc2352b9 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocCodeSpan.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocCodeSpan.js","sourceRoot":"","sources":["../../src/nodes/DocCodeSpan.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAA2B,OAAO,EAAiC,MAAM,WAAW,CAAC;AAEzG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAoBvD;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAWtC;;;OAGG;IACH,YAAmB,UAAiE;QAClF,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,wBAAwB,GAAG,IAAI,UAAU,CAAC;gBAC7C,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,WAAW,EAAE,WAAW,CAAC,yBAAyB;gBAClD,OAAO,EAAE,UAAU,CAAC,uBAAuB;aAC5C,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,GAAG,IAAI,UAAU,CAAC;gBACjC,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,WAAW,EAAE,WAAW,CAAC,aAAa;gBACtC,OAAO,EAAE,UAAU,CAAC,WAAW;aAChC,CAAC,CAAC;YACH,IAAI,CAAC,wBAAwB,GAAG,IAAI,UAAU,CAAC;gBAC7C,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,WAAW,EAAE,WAAW,CAAC,yBAAyB;gBAClD,OAAO,EAAE,UAAU,CAAC,uBAAuB;aAC5C,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACb,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrD,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAC3F,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNodeKind, type IDocNodeParameters, DocNode, type IDocNodeParsedParameters } from './DocNode';\r\nimport type { TokenSequence } from '../parser/TokenSequence';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\n\r\n/**\r\n * Constructor parameters for {@link DocCodeSpan}.\r\n */\r\nexport interface IDocCodeSpanParameters extends IDocNodeParameters {\r\n code: string;\r\n}\r\n\r\n/**\r\n * Constructor parameters for {@link DocCodeSpan}.\r\n */\r\nexport interface IDocCodeSpanParsedParameters extends IDocNodeParsedParameters {\r\n openingDelimiterExcerpt: TokenSequence;\r\n\r\n codeExcerpt: TokenSequence;\r\n\r\n closingDelimiterExcerpt: TokenSequence;\r\n}\r\n\r\n/**\r\n * Represents CommonMark-style code span, i.e. code surrounded by\r\n * backtick characters.\r\n */\r\nexport class DocCodeSpan extends DocNode {\r\n // The opening ` delimiter\r\n private readonly _openingDelimiterExcerpt: DocExcerpt | undefined;\r\n\r\n // The code content\r\n private _code: string | undefined;\r\n private readonly _codeExcerpt: DocExcerpt | undefined;\r\n\r\n // The closing ` delimiter\r\n private readonly _closingDelimiterExcerpt: DocExcerpt | undefined;\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocCodeSpanParameters | IDocCodeSpanParsedParameters) {\r\n super(parameters);\r\n\r\n if (DocNode.isParsedParameters(parameters)) {\r\n this._openingDelimiterExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.CodeSpan_OpeningDelimiter,\r\n content: parameters.openingDelimiterExcerpt\r\n });\r\n this._codeExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.CodeSpan_Code,\r\n content: parameters.codeExcerpt\r\n });\r\n this._closingDelimiterExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.CodeSpan_ClosingDelimiter,\r\n content: parameters.closingDelimiterExcerpt\r\n });\r\n } else {\r\n this._code = parameters.code;\r\n }\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.CodeSpan;\r\n }\r\n\r\n /**\r\n * The text that should be rendered as code, excluding the backtick delimiters.\r\n */\r\n public get code(): string {\r\n if (this._code === undefined) {\r\n this._code = this._codeExcerpt!.content.toString();\r\n }\r\n return this._code;\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [this._openingDelimiterExcerpt, this._codeExcerpt, this._closingDelimiterExcerpt];\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fceb2b325ee428f1b2d412a9c74cf7a3badbcf72 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts @@ -0,0 +1,120 @@ +import { DocNode, DocNodeKind, type IDocNodeParameters } from './DocNode'; +import { DocSection } from './DocSection'; +import { StandardModifierTagSet } from '../details/StandardModifierTagSet'; +import type { DocBlock } from './DocBlock'; +import type { DocInheritDocTag } from './DocInheritDocTag'; +import { DocParamCollection } from './DocParamCollection'; +/** + * Constructor parameters for {@link DocComment}. + */ +export interface IDocCommentParameters extends IDocNodeParameters { +} +/** + * Represents an entire documentation comment conforming to the TSDoc structure. + * This is the root of the DocNode tree. + */ +export declare class DocComment extends DocNode { + /** + * The main documentation for an API item is separated into a brief "summary" section, + * optionally followed by an `@remarks` block containing additional details. + * + * @remarks + * The summary section should be brief. On a documentation web site, it will be shown + * on a page that lists summaries for many different API items. On a detail page for + * a single item, the summary will be shown followed by the remarks section (if any). + */ + summarySection: DocSection; + /** + * The main documentation for an API item is separated into a brief "summary" section + * optionally followed by an `@remarks` block containing additional details. + * + * @remarks + * Unlike the summary, the remarks block may contain lengthy documentation content. + * The remarks should not restate information from the summary, since the summary section + * will always be displayed wherever the remarks section appears. Other sections + * (e.g. an `@example` block) will be shown after the remarks section. + */ + remarksBlock: DocBlock | undefined; + /** + * The `@privateRemarks` tag starts a block of additional commentary that is not meant + * for an external audience. A documentation tool must omit this content from an + * API reference web site. It should also be omitted when generating a normalized + * *.d.ts file intended for third-party developers. + * + * @remarks + * A similar effect could be accomplished by enclosing content inside CommonMark + * `` comments, or by moving the content into a separate `//` TypeScript comment. + * However, the `@privateRemarks` tag is a more formal convention. + */ + privateRemarks: DocBlock | undefined; + /** + * If present, this block indicates that an API item is no loner supported and may be + * removed in a future release. The `@deprecated` tag must be followed by a sentence + * describing the recommended alternative. Deprecation recursively applies to members + * of a container. For example, if a class is deprecated, then so are all of its members. + */ + deprecatedBlock: DocBlock | undefined; + /** + * The collection of parsed `@param` blocks for this doc comment. + */ + readonly params: DocParamCollection; + /** + * The collection of parsed `@typeParam` blocks for this doc comment. + */ + readonly typeParams: DocParamCollection; + /** + * The `@returns` block for this doc comment, or undefined if there is not one. + */ + returnsBlock: DocBlock | undefined; + /** + * If this doc comment contains an `@inheritDoc` tag, it will be extracted and associated + * with the DocComment. + */ + inheritDocTag: DocInheritDocTag | undefined; + /** + * The modifier tags for this DocComment. + */ + readonly modifierTagSet: StandardModifierTagSet; + private _seeBlocks; + private _customBlocks; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocCommentParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The collection of all `@see` DockBlockTag nodes belonging to this doc comment. + */ + get seeBlocks(): ReadonlyArray; + /** + * The collection of all DocBlock nodes belonging to this doc comment. + */ + get customBlocks(): ReadonlyArray; + /** + * Append an item to the seeBlocks collection. + * @internal + */ + _appendSeeBlock(block: DocBlock): void; + /** + * Append an item to the customBlocks collection. + */ + appendCustomBlock(block: DocBlock): void; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; + /** + * Generates a doc comment corresponding to the `DocComment` tree. The output is in a normalized form, + * and may ignore formatting/spacing from the original input. + * + * @remarks + * After parsing a string, and possibly modifying the result, `emitAsTsdoc()` can be used to render the result + * as a doc comment in a normalized format. It can also be used to emit a `DocComment` tree that was constructed + * manually. + * + * This method is provided as convenience for simple use cases. To customize the output, or if you need + * to render into a `StringBuilder`, use the {@link TSDocEmitter} class instead. + */ + emitAsTsdoc(): string; +} +//# sourceMappingURL=DocComment.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..1edf2cf7c54266a0ecabc55a15acc4a6c6f52894 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocComment.d.ts","sourceRoot":"","sources":["../../src/nodes/DocComment.ts"],"names":[],"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IACH,IAAW,YAAY,IAAI,aAAa,CAAC,QAAQ,CAAC,CAEjD;IAED;;;OAGG;IACI,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI7C;;OAEG;IACI,iBAAiB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/C,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;IAgB/D;;;;;;;;;;;OAWG;IACI,WAAW,IAAI,MAAM;CAM7B"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.js new file mode 100644 index 0000000000000000000000000000000000000000..4374ffdfdb5593c83484de86db9e2238a6f5d035 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.js @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNode, DocNodeKind } from './DocNode'; +import { DocSection } from './DocSection'; +import { StandardModifierTagSet } from '../details/StandardModifierTagSet'; +import { StringBuilder } from '../emitters/StringBuilder'; +import { TSDocEmitter } from '../emitters/TSDocEmitter'; +import { DocParamCollection } from './DocParamCollection'; +/** + * Represents an entire documentation comment conforming to the TSDoc structure. + * This is the root of the DocNode tree. + */ +export class DocComment extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + this.summarySection = new DocSection({ configuration: this.configuration }); + this.remarksBlock = undefined; + this.privateRemarks = undefined; + this.deprecatedBlock = undefined; + this.params = new DocParamCollection({ configuration: this.configuration }); + this.typeParams = new DocParamCollection({ configuration: this.configuration }); + this.returnsBlock = undefined; + this.modifierTagSet = new StandardModifierTagSet(); + this._seeBlocks = []; + this._customBlocks = []; + } + /** @override */ + get kind() { + return DocNodeKind.Comment; + } + /** + * The collection of all `@see` DockBlockTag nodes belonging to this doc comment. + */ + get seeBlocks() { + return this._seeBlocks; + } + /** + * The collection of all DocBlock nodes belonging to this doc comment. + */ + get customBlocks() { + return this._customBlocks; + } + /** + * Append an item to the seeBlocks collection. + * @internal + */ + _appendSeeBlock(block) { + this._seeBlocks.push(block); + } + /** + * Append an item to the customBlocks collection. + */ + appendCustomBlock(block) { + this._customBlocks.push(block); + } + /** @override */ + onGetChildNodes() { + return [ + this.summarySection, + this.remarksBlock, + this.privateRemarks, + this.deprecatedBlock, + this.params.count > 0 ? this.params : undefined, + this.typeParams.count > 0 ? this.typeParams : undefined, + this.returnsBlock, + ...this.customBlocks, + ...this.seeBlocks, + this.inheritDocTag, + ...this.modifierTagSet.nodes + ]; + } + /** + * Generates a doc comment corresponding to the `DocComment` tree. The output is in a normalized form, + * and may ignore formatting/spacing from the original input. + * + * @remarks + * After parsing a string, and possibly modifying the result, `emitAsTsdoc()` can be used to render the result + * as a doc comment in a normalized format. It can also be used to emit a `DocComment` tree that was constructed + * manually. + * + * This method is provided as convenience for simple use cases. To customize the output, or if you need + * to render into a `StringBuilder`, use the {@link TSDocEmitter} class instead. + */ + emitAsTsdoc() { + const stringBuilder = new StringBuilder(); + const emitter = new TSDocEmitter(); + emitter.renderComment(stringBuilder, this); + return stringBuilder.toString(); + } +} +//# sourceMappingURL=DocComment.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.js.map new file mode 100644 index 0000000000000000000000000000000000000000..6627c86e443f557088d6118b4b264cd7d28f8e2e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocComment.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocComment.js","sourceRoot":"","sources":["../../src/nodes/DocComment.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,OAAO,EAAE,WAAW,EAA2B,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM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GG;IACI,eAAe,CAAC,KAAe;QACpC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,iBAAiB,CAAC,KAAe;QACtC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,OAAO;YACL,IAAI,CAAC,cAAc;YACnB,IAAI,CAAC,YAAY;YACjB,IAAI,CAAC,cAAc;YACnB,IAAI,CAAC,eAAe;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YAC/C,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YACvD,IAAI,CAAC,YAAY;YACjB,GAAG,IAAI,CAAC,YAAY;YACpB,GAAG,IAAI,CAAC,SAAS;YACjB,IAAI,CAAC,aAAa;YAClB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK;SAC7B,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACI,WAAW;QAChB,MAAM,aAAa,GAAkB,IAAI,aAAa,EAAE,CAAC;QACzD,MAAM,OAAO,GAAiB,IAAI,YAAY,EAAE,CAAC;QACjD,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QAC3C,OAAO,aAAa,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNode, DocNodeKind, type IDocNodeParameters } from './DocNode';\r\nimport { DocSection } from './DocSection';\r\nimport { StandardModifierTagSet } from '../details/StandardModifierTagSet';\r\nimport type { DocBlock } from './DocBlock';\r\nimport type { DocInheritDocTag } from './DocInheritDocTag';\r\nimport { StringBuilder } from '../emitters/StringBuilder';\r\nimport { TSDocEmitter } from '../emitters/TSDocEmitter';\r\nimport { DocParamCollection } from './DocParamCollection';\r\n\r\n/**\r\n * Constructor parameters for {@link DocComment}.\r\n */\r\nexport interface IDocCommentParameters extends IDocNodeParameters {}\r\n\r\n/**\r\n * Represents an entire documentation comment conforming to the TSDoc structure.\r\n * This is the root of the DocNode tree.\r\n */\r\nexport class DocComment extends DocNode {\r\n /**\r\n * The main documentation for an API item is separated into a brief \"summary\" section,\r\n * optionally followed by an `@remarks` block containing additional details.\r\n *\r\n * @remarks\r\n * The summary section should be brief. On a documentation web site, it will be shown\r\n * on a page that lists summaries for many different API items. On a detail page for\r\n * a single item, the summary will be shown followed by the remarks section (if any).\r\n */\r\n public summarySection: DocSection;\r\n\r\n /**\r\n * The main documentation for an API item is separated into a brief \"summary\" section\r\n * optionally followed by an `@remarks` block containing additional details.\r\n *\r\n * @remarks\r\n * Unlike the summary, the remarks block may contain lengthy documentation content.\r\n * The remarks should not restate information from the summary, since the summary section\r\n * will always be displayed wherever the remarks section appears. Other sections\r\n * (e.g. an `@example` block) will be shown after the remarks section.\r\n */\r\n public remarksBlock: DocBlock | undefined;\r\n\r\n /**\r\n * The `@privateRemarks` tag starts a block of additional commentary that is not meant\r\n * for an external audience. A documentation tool must omit this content from an\r\n * API reference web site. It should also be omitted when generating a normalized\r\n * *.d.ts file intended for third-party developers.\r\n *\r\n * @remarks\r\n * A similar effect could be accomplished by enclosing content inside CommonMark\r\n * `` comments, or by moving the content into a separate `//` TypeScript comment.\r\n * However, the `@privateRemarks` tag is a more formal convention.\r\n */\r\n public privateRemarks: DocBlock | undefined;\r\n\r\n /**\r\n * If present, this block indicates that an API item is no loner supported and may be\r\n * removed in a future release. The `@deprecated` tag must be followed by a sentence\r\n * describing the recommended alternative. Deprecation recursively applies to members\r\n * of a container. For example, if a class is deprecated, then so are all of its members.\r\n */\r\n public deprecatedBlock: DocBlock | undefined;\r\n\r\n /**\r\n * The collection of parsed `@param` blocks for this doc comment.\r\n */\r\n public readonly params: DocParamCollection;\r\n\r\n /**\r\n * The collection of parsed `@typeParam` blocks for this doc comment.\r\n */\r\n public readonly typeParams: DocParamCollection;\r\n\r\n /**\r\n * The `@returns` block for this doc comment, or undefined if there is not one.\r\n */\r\n public returnsBlock: DocBlock | undefined;\r\n\r\n /**\r\n * If this doc comment contains an `@inheritDoc` tag, it will be extracted and associated\r\n * with the DocComment.\r\n */\r\n public inheritDocTag: DocInheritDocTag | undefined;\r\n\r\n /**\r\n * The modifier tags for this DocComment.\r\n */\r\n public readonly modifierTagSet: StandardModifierTagSet;\r\n\r\n private _seeBlocks: DocBlock[];\r\n private _customBlocks: DocBlock[];\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocCommentParameters) {\r\n super(parameters);\r\n\r\n this.summarySection = new DocSection({ configuration: this.configuration });\r\n this.remarksBlock = undefined;\r\n this.privateRemarks = undefined;\r\n this.deprecatedBlock = undefined;\r\n this.params = new DocParamCollection({ configuration: this.configuration });\r\n this.typeParams = new DocParamCollection({ configuration: this.configuration });\r\n this.returnsBlock = undefined;\r\n\r\n this.modifierTagSet = new StandardModifierTagSet();\r\n\r\n this._seeBlocks = [];\r\n this._customBlocks = [];\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.Comment;\r\n }\r\n\r\n /**\r\n * The collection of all `@see` DockBlockTag nodes belonging to this doc comment.\r\n */\r\n public get seeBlocks(): ReadonlyArray {\r\n return this._seeBlocks;\r\n }\r\n\r\n /**\r\n * The collection of all DocBlock nodes belonging to this doc comment.\r\n */\r\n public get customBlocks(): ReadonlyArray {\r\n return this._customBlocks;\r\n }\r\n\r\n /**\r\n * Append an item to the seeBlocks collection.\r\n * @internal\r\n */\r\n public _appendSeeBlock(block: DocBlock): void {\r\n this._seeBlocks.push(block);\r\n }\r\n\r\n /**\r\n * Append an item to the customBlocks collection.\r\n */\r\n public appendCustomBlock(block: DocBlock): void {\r\n this._customBlocks.push(block);\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [\r\n this.summarySection,\r\n this.remarksBlock,\r\n this.privateRemarks,\r\n this.deprecatedBlock,\r\n this.params.count > 0 ? this.params : undefined,\r\n this.typeParams.count > 0 ? this.typeParams : undefined,\r\n this.returnsBlock,\r\n ...this.customBlocks,\r\n ...this.seeBlocks,\r\n this.inheritDocTag,\r\n ...this.modifierTagSet.nodes\r\n ];\r\n }\r\n\r\n /**\r\n * Generates a doc comment corresponding to the `DocComment` tree. The output is in a normalized form,\r\n * and may ignore formatting/spacing from the original input.\r\n *\r\n * @remarks\r\n * After parsing a string, and possibly modifying the result, `emitAsTsdoc()` can be used to render the result\r\n * as a doc comment in a normalized format. It can also be used to emit a `DocComment` tree that was constructed\r\n * manually.\r\n *\r\n * This method is provided as convenience for simple use cases. To customize the output, or if you need\r\n * to render into a `StringBuilder`, use the {@link TSDocEmitter} class instead.\r\n */\r\n public emitAsTsdoc(): string {\r\n const stringBuilder: StringBuilder = new StringBuilder();\r\n const emitter: TSDocEmitter = new TSDocEmitter();\r\n emitter.renderComment(stringBuilder, this);\r\n return stringBuilder.toString();\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3fe7295bcf1707fedace15717e01ceabe950a477 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts @@ -0,0 +1,73 @@ +import { DocNode, DocNodeKind, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode'; +import type { DocMemberReference } from './DocMemberReference'; +import type { TokenSequence } from '../parser/TokenSequence'; +/** + * Constructor parameters for {@link DocDeclarationReference}. + */ +export interface IDocDeclarationReferenceParameters extends IDocNodeParameters { + packageName?: string; + importPath?: string; + memberReferences?: DocMemberReference[]; +} +/** + * Constructor parameters for {@link DocDeclarationReference}. + */ +export interface IDocDeclarationReferenceParsedParameters extends IDocNodeParsedParameters { + packageNameExcerpt?: TokenSequence; + importPathExcerpt?: TokenSequence; + importHashExcerpt?: TokenSequence; + spacingAfterImportHashExcerpt?: TokenSequence; + memberReferences?: DocMemberReference[]; +} +/** + * Represents a declaration reference. + * + * @remarks + * Declaration references are TSDoc expressions used by tags such as `{@link}` + * or `{@inheritDoc}` that need to refer to another declaration. + */ +export declare class DocDeclarationReference extends DocNode { + private _packageName; + private readonly _packageNameExcerpt; + private _importPath; + private readonly _importPathExcerpt; + private readonly _importHashExcerpt; + private readonly _spacingAfterImportHashExcerpt; + private readonly _memberReferences; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocDeclarationReferenceParameters | IDocDeclarationReferenceParsedParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The optional package name, which may optionally include an NPM scope. + * + * Example: `"@scope/my-package"` + */ + get packageName(): string | undefined; + /** + * The optional import path. If a package name is provided, then if an import path is provided, + * the path must start with a "/" delimiter; otherwise paths are resolved relative to the source file + * containing the reference. + * + * Example: `"/path1/path2"` + * Example: `"./path1/path2"` + * Example: `"../path2/path2"` + */ + get importPath(): string | undefined; + /** + * The chain of member references that indicate the declaration being referenced. + * If this list is empty, then either the packageName or importPath must be provided, + * because the reference refers to a module. + */ + get memberReferences(): ReadonlyArray; + /** + * Generates the TSDoc representation of this declaration reference. + */ + emitAsTsdoc(): string; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; +} +//# sourceMappingURL=DocDeclarationReference.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..f12bfe0d8a752873a644d5f52cbc936c9bd7c0dd --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocDeclarationReference.d.ts","sourceRoot":"","sources":["../../src/nodes/DocDeclarationReference.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,kBAAkB;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,wCAAyC,SAAQ,wBAAwB;IACxF,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,6BAA6B,CAAC,EAAE,aAAa,CAAC;IAC9C,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACzC;AAED;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,OAAO;IAClD,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAyB;IAE7D,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAyB;IAE5D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAyB;IAC5D,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAyB;IAExE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuB;IAEzD;;;OAGG;gBAED,UAAU,EAAE,kCAAkC,GAAG,wCAAwC;IA4C3F,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;;;OAIG;IACH,IAAW,WAAW,IAAI,MAAM,GAAG,SAAS,CAO3C;IAED;;;;;;;;OAQG;IACH,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAO1C;IAED;;;;OAIG;IACH,IAAW,gBAAgB,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAE/D;IAED;;OAEG;IACI,WAAW,IAAI,MAAM;IAO5B,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;CAShE"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.js new file mode 100644 index 0000000000000000000000000000000000000000..f1924d6ebd20f846c4abe068c4d29777880dfb8d --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.js @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNode, DocNodeKind } from './DocNode'; +import { DocExcerpt, ExcerptKind } from './DocExcerpt'; +import { StringBuilder } from '../emitters/StringBuilder'; +import { TSDocEmitter } from '../emitters/TSDocEmitter'; +/** + * Represents a declaration reference. + * + * @remarks + * Declaration references are TSDoc expressions used by tags such as `{@link}` + * or `{@inheritDoc}` that need to refer to another declaration. + */ +export class DocDeclarationReference extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + if (DocNode.isParsedParameters(parameters)) { + if (parameters.packageNameExcerpt) { + this._packageNameExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.DeclarationReference_PackageName, + content: parameters.packageNameExcerpt + }); + } + if (parameters.importPathExcerpt) { + this._importPathExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.DeclarationReference_ImportPath, + content: parameters.importPathExcerpt + }); + } + if (parameters.importHashExcerpt) { + this._importHashExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.DeclarationReference_ImportHash, + content: parameters.importHashExcerpt + }); + } + if (parameters.spacingAfterImportHashExcerpt) { + this._spacingAfterImportHashExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.Spacing, + content: parameters.spacingAfterImportHashExcerpt + }); + } + } + else { + this._packageName = parameters.packageName; + this._importPath = parameters.importPath; + } + this._memberReferences = []; + if (parameters.memberReferences) { + this._memberReferences.push(...parameters.memberReferences); + } + } + /** @override */ + get kind() { + return DocNodeKind.DeclarationReference; + } + /** + * The optional package name, which may optionally include an NPM scope. + * + * Example: `"@scope/my-package"` + */ + get packageName() { + if (this._packageName === undefined) { + if (this._packageNameExcerpt !== undefined) { + this._packageName = this._packageNameExcerpt.content.toString(); + } + } + return this._packageName; + } + /** + * The optional import path. If a package name is provided, then if an import path is provided, + * the path must start with a "/" delimiter; otherwise paths are resolved relative to the source file + * containing the reference. + * + * Example: `"/path1/path2"` + * Example: `"./path1/path2"` + * Example: `"../path2/path2"` + */ + get importPath() { + if (this._importPath === undefined) { + if (this._importPathExcerpt !== undefined) { + this._importPath = this._importPathExcerpt.content.toString(); + } + } + return this._importPath; + } + /** + * The chain of member references that indicate the declaration being referenced. + * If this list is empty, then either the packageName or importPath must be provided, + * because the reference refers to a module. + */ + get memberReferences() { + return this._memberReferences; + } + /** + * Generates the TSDoc representation of this declaration reference. + */ + emitAsTsdoc() { + const stringBuilder = new StringBuilder(); + const emitter = new TSDocEmitter(); + emitter.renderDeclarationReference(stringBuilder, this); + return stringBuilder.toString(); + } + /** @override */ + onGetChildNodes() { + return [ + this._packageNameExcerpt, + this._importPathExcerpt, + this._importHashExcerpt, + this._spacingAfterImportHashExcerpt, + ...this._memberReferences + ]; + } +} +//# sourceMappingURL=DocDeclarationReference.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.js.map new file mode 100644 index 0000000000000000000000000000000000000000..d3dbf3ef7659fe01e677078aaaecdc9a8d27ac4c --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocDeclarationReference.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocDeclarationReference.js","sourceRoot":"","sources":["../../src/nodes/DocDeclarationReference.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,OAAO,EAAE,WAAW,EAA0D,MAAM,WAAW,CAAC;AAGzG,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAsBxD;;;;;;GAMG;AACH,MAAM,OAAO,uBAAwB,SAAQ,OAAO;IAYlD;;;OAGG;IACH,YACE,UAAyF;QAEzF,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3C,IAAI,UAAU,CAAC,kBAAkB,EAAE,CAAC;gBAClC,IAAI,CAAC,mBAAmB,GAAG,IAAI,UAAU,CAAC;oBACxC,aAAa,EAAE,IAAI,CAAC,aAAa;oBACjC,WAAW,EAAE,WAAW,CAAC,gCAAgC;oBACzD,OAAO,EAAE,UAAU,CAAC,kBAAkB;iBACvC,CAAC,CAAC;YACL,CAAC;YACD,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC;gBACjC,IAAI,CAAC,kBAAkB,GAAG,IAAI,UAAU,CAAC;oBACvC,aAAa,EAAE,IAAI,CAAC,aAAa;oBACjC,WAAW,EAAE,WAAW,CAAC,+BAA+B;oBACxD,OAAO,EAAE,UAAU,CAAC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C;IAC3B,CAAC;IAED;;;;;;;;OAQG;IACH,IAAW,UAAU;QACnB,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;gBAC1C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YAChE,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAED;;OAEG;IACI,WAAW;QAChB,MAAM,aAAa,GAAkB,IAAI,aAAa,EAAE,CAAC;QACzD,MAAM,OAAO,GAAiB,IAAI,YAAY,EAAE,CAAC;QACjD,OAAO,CAAC,0BAA0B,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QACxD,OAAO,aAAa,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,OAAO;YACL,IAAI,CAAC,mBAAmB;YACxB,IAAI,CAAC,kBAAkB;YACvB,IAAI,CAAC,kBAAkB;YACvB,IAAI,CAAC,8BAA8B;YACnC,GAAG,IAAI,CAAC,iBAAiB;SAC1B,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNode, DocNodeKind, type IDocNodeParameters, type IDocNodeParsedParameters } from './DocNode';\r\nimport type { DocMemberReference } from './DocMemberReference';\r\nimport type { TokenSequence } from '../parser/TokenSequence';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\nimport { StringBuilder } from '../emitters/StringBuilder';\r\nimport { TSDocEmitter } from '../emitters/TSDocEmitter';\r\n\r\n/**\r\n * Constructor parameters for {@link DocDeclarationReference}.\r\n */\r\nexport interface IDocDeclarationReferenceParameters extends IDocNodeParameters {\r\n packageName?: string;\r\n importPath?: string;\r\n memberReferences?: DocMemberReference[];\r\n}\r\n\r\n/**\r\n * Constructor parameters for {@link DocDeclarationReference}.\r\n */\r\nexport interface IDocDeclarationReferenceParsedParameters extends IDocNodeParsedParameters {\r\n packageNameExcerpt?: TokenSequence;\r\n importPathExcerpt?: TokenSequence;\r\n importHashExcerpt?: TokenSequence;\r\n spacingAfterImportHashExcerpt?: TokenSequence;\r\n memberReferences?: DocMemberReference[];\r\n}\r\n\r\n/**\r\n * Represents a declaration reference.\r\n *\r\n * @remarks\r\n * Declaration references are TSDoc expressions used by tags such as `{@link}`\r\n * or `{@inheritDoc}` that need to refer to another declaration.\r\n */\r\nexport class DocDeclarationReference extends DocNode {\r\n private _packageName: string | undefined;\r\n private readonly _packageNameExcerpt: DocExcerpt | undefined;\r\n\r\n private _importPath: string | undefined;\r\n private readonly _importPathExcerpt: DocExcerpt | undefined;\r\n\r\n private readonly _importHashExcerpt: DocExcerpt | undefined;\r\n private readonly _spacingAfterImportHashExcerpt: DocExcerpt | undefined;\r\n\r\n private readonly _memberReferences: DocMemberReference[];\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(\r\n parameters: IDocDeclarationReferenceParameters | IDocDeclarationReferenceParsedParameters\r\n ) {\r\n super(parameters);\r\n\r\n if (DocNode.isParsedParameters(parameters)) {\r\n if (parameters.packageNameExcerpt) {\r\n this._packageNameExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.DeclarationReference_PackageName,\r\n content: parameters.packageNameExcerpt\r\n });\r\n }\r\n if (parameters.importPathExcerpt) {\r\n this._importPathExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.DeclarationReference_ImportPath,\r\n content: parameters.importPathExcerpt\r\n });\r\n }\r\n if (parameters.importHashExcerpt) {\r\n this._importHashExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.DeclarationReference_ImportHash,\r\n content: parameters.importHashExcerpt\r\n });\r\n }\r\n if (parameters.spacingAfterImportHashExcerpt) {\r\n this._spacingAfterImportHashExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.Spacing,\r\n content: parameters.spacingAfterImportHashExcerpt\r\n });\r\n }\r\n } else {\r\n this._packageName = parameters.packageName;\r\n this._importPath = parameters.importPath;\r\n }\r\n\r\n this._memberReferences = [];\r\n if (parameters.memberReferences) {\r\n this._memberReferences.push(...parameters.memberReferences);\r\n }\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.DeclarationReference;\r\n }\r\n\r\n /**\r\n * The optional package name, which may optionally include an NPM scope.\r\n *\r\n * Example: `\"@scope/my-package\"`\r\n */\r\n public get packageName(): string | undefined {\r\n if (this._packageName === undefined) {\r\n if (this._packageNameExcerpt !== undefined) {\r\n this._packageName = this._packageNameExcerpt.content.toString();\r\n }\r\n }\r\n return this._packageName;\r\n }\r\n\r\n /**\r\n * The optional import path. If a package name is provided, then if an import path is provided,\r\n * the path must start with a \"/\" delimiter; otherwise paths are resolved relative to the source file\r\n * containing the reference.\r\n *\r\n * Example: `\"/path1/path2\"`\r\n * Example: `\"./path1/path2\"`\r\n * Example: `\"../path2/path2\"`\r\n */\r\n public get importPath(): string | undefined {\r\n if (this._importPath === undefined) {\r\n if (this._importPathExcerpt !== undefined) {\r\n this._importPath = this._importPathExcerpt.content.toString();\r\n }\r\n }\r\n return this._importPath;\r\n }\r\n\r\n /**\r\n * The chain of member references that indicate the declaration being referenced.\r\n * If this list is empty, then either the packageName or importPath must be provided,\r\n * because the reference refers to a module.\r\n */\r\n public get memberReferences(): ReadonlyArray {\r\n return this._memberReferences;\r\n }\r\n\r\n /**\r\n * Generates the TSDoc representation of this declaration reference.\r\n */\r\n public emitAsTsdoc(): string {\r\n const stringBuilder: StringBuilder = new StringBuilder();\r\n const emitter: TSDocEmitter = new TSDocEmitter();\r\n emitter.renderDeclarationReference(stringBuilder, this);\r\n return stringBuilder.toString();\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [\r\n this._packageNameExcerpt,\r\n this._importPathExcerpt,\r\n this._importHashExcerpt,\r\n this._spacingAfterImportHashExcerpt,\r\n ...this._memberReferences\r\n ];\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..93dc591710826fe4f0a0c732f6aefb098229540e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts @@ -0,0 +1,57 @@ +import { DocNodeKind, DocNode, type IDocNodeParsedParameters } from './DocNode'; +import type { TokenSequence } from '../parser/TokenSequence'; +import type { TSDocMessageId } from '../parser/TSDocMessageId'; +/** + * Constructor parameters for {@link DocErrorText}. + */ +export interface IDocErrorTextParsedParameters extends IDocNodeParsedParameters { + textExcerpt: TokenSequence; + messageId: TSDocMessageId; + errorMessage: string; + errorLocation: TokenSequence; +} +/** + * Represents a span of text that contained invalid markup. + * The characters should be rendered as plain text. + */ +export declare class DocErrorText extends DocNode { + private _text; + private readonly _textExcerpt; + private readonly _messageId; + private readonly _errorMessage; + private readonly _errorLocation; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocErrorTextParsedParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The characters that should be rendered as plain text because they + * could not be parsed successfully. + */ + get text(): string; + get textExcerpt(): TokenSequence | undefined; + /** + * The TSDoc error message identifier. + */ + get messageId(): TSDocMessageId; + /** + * A description of why the character could not be parsed. + */ + get errorMessage(): string; + /** + * The range of characters that caused the error. In general these may be + * somewhat farther ahead in the input stream from the DocErrorText node itself. + * + * @remarks + * For example, for the malformed HTML tag ``, the DocErrorText node + * will correspond to the `<` character that looked like an HTML tag, whereas the + * error location might be the `@` character that caused the trouble. + */ + get errorLocation(): TokenSequence; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; +} +//# sourceMappingURL=DocErrorText.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..91b4da3681ae8e51e111f75a65957502e132a15e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocErrorText.d.ts","sourceRoot":"","sources":["../../src/nodes/DocErrorText.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB;IAC7E,WAAW,EAAE,aAAa,CAAC;IAE3B,SAAS,EAAE,cAAc,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,OAAO;IACvC,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAa;IAE1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiB;IAC5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAE/C;;;OAGG;gBACgB,UAAU,EAAE,6BAA6B;IAc5D,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;;OAGG;IACH,IAAW,IAAI,IAAI,MAAM,CAKxB;IAED,IAAW,WAAW,IAAI,aAAa,GAAG,SAAS,CAMlD;IAED;;OAEG;IACH,IAAW,SAAS,IAAI,cAAc,CAErC;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;;;;;;;OAQG;IACH,IAAW,aAAa,IAAI,aAAa,CAExC;IAED,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;CAGhE"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.js new file mode 100644 index 0000000000000000000000000000000000000000..9cc3873dce881c1892fe42d429e04c6e8ec1d51e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.js @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind, DocNode } from './DocNode'; +import { DocExcerpt, ExcerptKind } from './DocExcerpt'; +/** + * Represents a span of text that contained invalid markup. + * The characters should be rendered as plain text. + */ +export class DocErrorText extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + this._textExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.ErrorText, + content: parameters.textExcerpt + }); + this._messageId = parameters.messageId; + this._errorMessage = parameters.errorMessage; + this._errorLocation = parameters.errorLocation; + } + /** @override */ + get kind() { + return DocNodeKind.ErrorText; + } + /** + * The characters that should be rendered as plain text because they + * could not be parsed successfully. + */ + get text() { + if (this._text === undefined) { + this._text = this._textExcerpt.content.toString(); + } + return this._text; + } + get textExcerpt() { + if (this._textExcerpt) { + return this._textExcerpt.content; + } + else { + return undefined; + } + } + /** + * The TSDoc error message identifier. + */ + get messageId() { + return this._messageId; + } + /** + * A description of why the character could not be parsed. + */ + get errorMessage() { + return this._errorMessage; + } + /** + * The range of characters that caused the error. In general these may be + * somewhat farther ahead in the input stream from the DocErrorText node itself. + * + * @remarks + * For example, for the malformed HTML tag ``, the DocErrorText node + * will correspond to the `<` character that looked like an HTML tag, whereas the + * error location might be the `@` character that caused the trouble. + */ + get errorLocation() { + return this._errorLocation; + } + /** @override */ + onGetChildNodes() { + return [this._textExcerpt]; + } +} +//# sourceMappingURL=DocErrorText.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.js.map new file mode 100644 index 0000000000000000000000000000000000000000..88b29b9009a79a2282b11c6c261a10402c7bfc4e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocErrorText.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocErrorText.js","sourceRoot":"","sources":["../../src/nodes/DocErrorText.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAiC,MAAM,WAAW,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAcvD;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,OAAO;IAQvC;;;OAGG;IACH,YAAmB,UAAyC;QAC1D,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,CAAC,YAAY,GAAG,IAAI,UAAU,CAAC;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,WAAW,CAAC,SAAS;YAClC,OAAO,EAAE,UAAU,CAAC,WAAW;SAChC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,YAAY,CAAC;QAC7C,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC;IACjD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACH,IAAW,IAAI;QACb,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACpD,CAAC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,WAAW;QACpB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED;;;;;;;;OAQG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC7B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNodeKind, DocNode, type IDocNodeParsedParameters } from './DocNode';\r\nimport type { TokenSequence } from '../parser/TokenSequence';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\nimport type { TSDocMessageId } from '../parser/TSDocMessageId';\r\n\r\n/**\r\n * Constructor parameters for {@link DocErrorText}.\r\n */\r\nexport interface IDocErrorTextParsedParameters extends IDocNodeParsedParameters {\r\n textExcerpt: TokenSequence;\r\n\r\n messageId: TSDocMessageId;\r\n errorMessage: string;\r\n errorLocation: TokenSequence;\r\n}\r\n\r\n/**\r\n * Represents a span of text that contained invalid markup.\r\n * The characters should be rendered as plain text.\r\n */\r\nexport class DocErrorText extends DocNode {\r\n private _text: string | undefined;\r\n private readonly _textExcerpt: DocExcerpt;\r\n\r\n private readonly _messageId: TSDocMessageId;\r\n private readonly _errorMessage: string;\r\n private readonly _errorLocation: TokenSequence;\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocErrorTextParsedParameters) {\r\n super(parameters);\r\n\r\n this._textExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.ErrorText,\r\n content: parameters.textExcerpt\r\n });\r\n\r\n this._messageId = parameters.messageId;\r\n this._errorMessage = parameters.errorMessage;\r\n this._errorLocation = parameters.errorLocation;\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.ErrorText;\r\n }\r\n\r\n /**\r\n * The characters that should be rendered as plain text because they\r\n * could not be parsed successfully.\r\n */\r\n public get text(): string {\r\n if (this._text === undefined) {\r\n this._text = this._textExcerpt.content.toString();\r\n }\r\n return this._text;\r\n }\r\n\r\n public get textExcerpt(): TokenSequence | undefined {\r\n if (this._textExcerpt) {\r\n return this._textExcerpt.content;\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n\r\n /**\r\n * The TSDoc error message identifier.\r\n */\r\n public get messageId(): TSDocMessageId {\r\n return this._messageId;\r\n }\r\n\r\n /**\r\n * A description of why the character could not be parsed.\r\n */\r\n public get errorMessage(): string {\r\n return this._errorMessage;\r\n }\r\n\r\n /**\r\n * The range of characters that caused the error. In general these may be\r\n * somewhat farther ahead in the input stream from the DocErrorText node itself.\r\n *\r\n * @remarks\r\n * For example, for the malformed HTML tag ``, the DocErrorText node\r\n * will correspond to the `<` character that looked like an HTML tag, whereas the\r\n * error location might be the `@` character that caused the trouble.\r\n */\r\n public get errorLocation(): TokenSequence {\r\n return this._errorLocation;\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [this._textExcerpt];\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2e59e5228a141efd0bb98f7ae450bfbb5bebe33f --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts @@ -0,0 +1,54 @@ +import { DocNodeKind, type IDocNodeParsedParameters, DocNode } from './DocNode'; +import type { TokenSequence } from '../parser/TokenSequence'; +/** + * Constructor parameters for {@link DocEscapedText}. + */ +export interface IDocEscapedTextParsedParameters extends IDocNodeParsedParameters { + escapeStyle: EscapeStyle; + encodedTextExcerpt: TokenSequence; + decodedText: string; +} +/** + * The style of escaping to be used with DocEscapedText. + */ +export declare enum EscapeStyle { + /** + * Use a backslash symbol to escape the character. + */ + CommonMarkBackslash = 0 +} +/** + * Represents a text character that should be escaped as a TSDoc symbol. + * @remarks + * Note that renders will normally apply appropriate escaping when rendering + * DocPlainText in a format such as HTML or TSDoc. The DocEscapedText node + * forces a specific escaping that may not be the default. + */ +export declare class DocEscapedText extends DocNode { + private readonly _escapeStyle; + private _encodedText; + private readonly _encodedTextExcerpt; + private readonly _decodedText; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocEscapedTextParsedParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * The style of escaping to be performed. + */ + get escapeStyle(): EscapeStyle; + /** + * The text sequence including escapes. + */ + get encodedText(): string; + /** + * The text without escaping. + */ + get decodedText(): string; + /** @override */ + protected onGetChildNodes(): ReadonlyArray; +} +//# sourceMappingURL=DocEscapedText.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..16d01a31c8bcafb5e6f08240d874538fc6efd033 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocEscapedText.d.ts","sourceRoot":"","sources":["../../src/nodes/DocEscapedText.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,wBAAwB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAC/E,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,EAAE,aAAa,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,mBAAmB,IAAA;CACpB;AAED;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAE3C,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAa;IAEjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC;;;OAGG;gBACgB,UAAU,EAAE,+BAA+B;IAc9D,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,WAAW,CAEpC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,MAAM,CAK/B;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,gBAAgB;IAChB,SAAS,CAAC,eAAe,IAAI,aAAa,CAAC,OAAO,GAAG,SAAS,CAAC;CAGhE"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.js new file mode 100644 index 0000000000000000000000000000000000000000..1815a6c2d4dc7bfad554518fa3bf79b3d4428dd4 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.js @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNodeKind, DocNode } from './DocNode'; +import { DocExcerpt, ExcerptKind } from './DocExcerpt'; +/** + * The style of escaping to be used with DocEscapedText. + */ +export var EscapeStyle; +(function (EscapeStyle) { + /** + * Use a backslash symbol to escape the character. + */ + EscapeStyle[EscapeStyle["CommonMarkBackslash"] = 0] = "CommonMarkBackslash"; +})(EscapeStyle || (EscapeStyle = {})); +/** + * Represents a text character that should be escaped as a TSDoc symbol. + * @remarks + * Note that renders will normally apply appropriate escaping when rendering + * DocPlainText in a format such as HTML or TSDoc. The DocEscapedText node + * forces a specific escaping that may not be the default. + */ +export class DocEscapedText extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + this._escapeStyle = parameters.escapeStyle; + this._encodedTextExcerpt = new DocExcerpt({ + configuration: this.configuration, + excerptKind: ExcerptKind.EscapedText, + content: parameters.encodedTextExcerpt + }); + this._decodedText = parameters.decodedText; + } + /** @override */ + get kind() { + return DocNodeKind.EscapedText; + } + /** + * The style of escaping to be performed. + */ + get escapeStyle() { + return this._escapeStyle; + } + /** + * The text sequence including escapes. + */ + get encodedText() { + if (this._encodedText === undefined) { + this._encodedText = this._encodedTextExcerpt.content.toString(); + } + return this._encodedText; + } + /** + * The text without escaping. + */ + get decodedText() { + return this._decodedText; + } + /** @override */ + onGetChildNodes() { + return [this._encodedTextExcerpt]; + } +} +//# sourceMappingURL=DocEscapedText.js.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.js.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.js.map new file mode 100644 index 0000000000000000000000000000000000000000..09d0ef04c76a352a0fdb00a0fd139d33c2b6733e --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocEscapedText.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DocEscapedText.js","sourceRoot":"","sources":["../../src/nodes/DocEscapedText.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,WAAW,EAAiC,OAAO,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAYvD;;GAEG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB;;OAEG;IACH,2EAAmB,CAAA;AACrB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED;;;;;;GAMG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAO;IAQzC;;;OAGG;IACH,YAAmB,UAA2C;QAC5D,KAAK,CAAC,UAAU,CAAC,CAAC;QAElB,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,WAAW,CAAC;QAE3C,IAAI,CAAC,mBAAmB,GAAG,IAAI,UAAU,CAAC;YACxC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,WAAW,EAAE,WAAW,CAAC,WAAW;YACpC,OAAO,EAAE,UAAU,CAAC,kBAAkB;SACvC,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,WAAW,CAAC;IAC7C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,WAAW,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACpB,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACpC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAClE,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,gBAAgB;IACN,eAAe;QACvB,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { DocNodeKind, type IDocNodeParsedParameters, DocNode } from './DocNode';\r\nimport { DocExcerpt, ExcerptKind } from './DocExcerpt';\r\nimport type { TokenSequence } from '../parser/TokenSequence';\r\n\r\n/**\r\n * Constructor parameters for {@link DocEscapedText}.\r\n */\r\nexport interface IDocEscapedTextParsedParameters extends IDocNodeParsedParameters {\r\n escapeStyle: EscapeStyle;\r\n encodedTextExcerpt: TokenSequence;\r\n decodedText: string;\r\n}\r\n\r\n/**\r\n * The style of escaping to be used with DocEscapedText.\r\n */\r\nexport enum EscapeStyle {\r\n /**\r\n * Use a backslash symbol to escape the character.\r\n */\r\n CommonMarkBackslash\r\n}\r\n\r\n/**\r\n * Represents a text character that should be escaped as a TSDoc symbol.\r\n * @remarks\r\n * Note that renders will normally apply appropriate escaping when rendering\r\n * DocPlainText in a format such as HTML or TSDoc. The DocEscapedText node\r\n * forces a specific escaping that may not be the default.\r\n */\r\nexport class DocEscapedText extends DocNode {\r\n private readonly _escapeStyle: EscapeStyle;\r\n\r\n private _encodedText: string | undefined;\r\n private readonly _encodedTextExcerpt: DocExcerpt;\r\n\r\n private readonly _decodedText: string;\r\n\r\n /**\r\n * Don't call this directly. Instead use {@link TSDocParser}\r\n * @internal\r\n */\r\n public constructor(parameters: IDocEscapedTextParsedParameters) {\r\n super(parameters);\r\n\r\n this._escapeStyle = parameters.escapeStyle;\r\n\r\n this._encodedTextExcerpt = new DocExcerpt({\r\n configuration: this.configuration,\r\n excerptKind: ExcerptKind.EscapedText,\r\n content: parameters.encodedTextExcerpt\r\n });\r\n\r\n this._decodedText = parameters.decodedText;\r\n }\r\n\r\n /** @override */\r\n public get kind(): DocNodeKind | string {\r\n return DocNodeKind.EscapedText;\r\n }\r\n\r\n /**\r\n * The style of escaping to be performed.\r\n */\r\n public get escapeStyle(): EscapeStyle {\r\n return this._escapeStyle;\r\n }\r\n\r\n /**\r\n * The text sequence including escapes.\r\n */\r\n public get encodedText(): string {\r\n if (this._encodedText === undefined) {\r\n this._encodedText = this._encodedTextExcerpt.content.toString();\r\n }\r\n return this._encodedText;\r\n }\r\n\r\n /**\r\n * The text without escaping.\r\n */\r\n public get decodedText(): string {\r\n return this._decodedText;\r\n }\r\n\r\n /** @override */\r\n protected onGetChildNodes(): ReadonlyArray {\r\n return [this._encodedTextExcerpt];\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts b/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e39942b42e98c0f34084b186e5a99f62228a4ace --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts @@ -0,0 +1,105 @@ +import { DocNode, type IDocNodeParameters, DocNodeKind } from './DocNode'; +import type { TokenSequence } from '../parser/TokenSequence'; +/** + * Indicates the type of {@link DocExcerpt}. + */ +export declare enum ExcerptKind { + Spacing = "Spacing", + BlockTag = "BlockTag", + CodeSpan_OpeningDelimiter = "CodeSpan_OpeningDelimiter", + CodeSpan_Code = "CodeSpan_Code", + CodeSpan_ClosingDelimiter = "CodeSpan_ClosingDelimiter", + DeclarationReference_PackageName = "DeclarationReference_PackageName", + DeclarationReference_ImportPath = "DeclarationReference_ImportPath", + DeclarationReference_ImportHash = "DeclarationReference_ImportHash", + /** + * Input characters that were reported as an error and do not appear to be part of a valid expression. + * A syntax highlighter might display them with an error color (e.g. red). + */ + ErrorText = "ErrorText", + /** + * Input characters that do not conform to the TSDoc specification, but were recognized by the parser, for example + * as a known JSDoc pattern. A syntax highlighter should not display them with an error color (e.g. red) + * because the error reporting may be suppressed for "lax" parsing of legacy source code. + */ + NonstandardText = "NonstandardText", + EscapedText = "EscapedText", + FencedCode_OpeningFence = "FencedCode_OpeningFence", + FencedCode_Language = "FencedCode_Language", + FencedCode_Code = "FencedCode_Code", + FencedCode_ClosingFence = "FencedCode_ClosingFence", + HtmlAttribute_Name = "HtmlAttribute_Name", + HtmlAttribute_Equals = "HtmlAttribute_Equals", + HtmlAttribute_Value = "HtmlAttribute_Value", + HtmlEndTag_OpeningDelimiter = "HtmlEndTag_OpeningDelimiter", + HtmlEndTag_Name = "HtmlEndTag_Name", + HtmlEndTag_ClosingDelimiter = "HtmlEndTag_ClosingDelimiter", + HtmlStartTag_OpeningDelimiter = "HtmlStartTag_OpeningDelimiter", + HtmlStartTag_Name = "HtmlStartTag_Name", + HtmlStartTag_ClosingDelimiter = "HtmlStartTag_ClosingDelimiter", + InlineTag_OpeningDelimiter = "InlineTag_OpeningDelimiter", + InlineTag_TagName = "InlineTag_TagName", + InlineTag_TagContent = "InlineTag_TagContent", + InlineTag_ClosingDelimiter = "InlineTag_ClosingDelimiter", + LinkTag_UrlDestination = "LinkTag_UrlDestination", + LinkTag_Pipe = "LinkTag_Pipe", + LinkTag_LinkText = "LinkTag_LinkText", + MemberIdentifier_LeftQuote = "MemberIdentifier_LeftQuote", + MemberIdentifier_Identifier = "MemberIdentifier_Identifier", + MemberIdentifier_RightQuote = "MemberIdentifier_RightQuote", + MemberReference_Dot = "MemberReference_Dot", + MemberReference_LeftParenthesis = "MemberReference_LeftParenthesis", + MemberReference_Colon = "MemberReference_Colon", + MemberReference_RightParenthesis = "MemberReference_RightParenthesis", + MemberSelector = "MemberSelector", + DocMemberSymbol_LeftBracket = "DocMemberSymbol_LeftBracket", + DocMemberSymbol_RightBracket = "DocMemberSymbol_RightBracket", + ParamBlock_ParameterName = "ParamBlock_ParameterName", + ParamBlock_Hyphen = "ParamBlock_Hyphen", + PlainText = "PlainText", + SoftBreak = "SoftBreak" +} +/** + * Constructor parameters for {@link DocExcerpt}. + */ +export interface IDocExcerptParameters extends IDocNodeParameters { + excerptKind: ExcerptKind; + content: TokenSequence; +} +/** + * Represents a parsed token sequence. + * + * @remarks + * When a `DocNode` is created by parsing a doc comment, it will have `DocExcerpt` child nodes corresponding to + * the parsed syntax elements such as names, keywords, punctuation, and spaces. These excerpts indicate the original + * coordinates of the syntax element, and thus can be used for syntax highlighting and precise error reporting. + * They could also be used to rewrite specific words in a source file (e.g. renaming a parameter) without disturbing + * any other characters in the file. + * + * Every parsed character will correspond to at most one DocExcerpt object. In other words, excerpts never overlap. + * A given excerpt can span multiple comment lines, and it may contain gaps, for example to skip the `*` character + * that starts a new TSDoc comment line. + */ +export declare class DocExcerpt extends DocNode { + private readonly _excerptKind; + private readonly _content; + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters: IDocExcerptParameters); + /** @override */ + get kind(): DocNodeKind | string; + /** + * Indicates the kind of DocExcerpt. + */ + get excerptKind(): ExcerptKind; + /** + * The input token sequence corresponding to this excerpt. + * @remarks + * Note that a token sequence can span multiple input lines and may contain gaps, for example to skip the `*` + * character that starts a new TSDoc comment line. + */ + get content(): TokenSequence; +} +//# sourceMappingURL=DocExcerpt.d.ts.map \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts.map b/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..03308849370a908b3548db542923b908880b519c --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"DocExcerpt.d.ts","sourceRoot":"","sources":["../../src/nodes/DocExcerpt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE,MAAM,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AW,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IAEzC;;;OAGG;gBACgB,UAAU,EAAE,qBAAqB;IAoBpD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,GAAG,MAAM,CAEtC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,WAAW,CAEpC;IAED;;;;;OAKG;IACH,IAAW,OAAO,IAAI,aAAa,CAElC;CACF"} \ No newline at end of file diff --git a/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.js b/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.js new file mode 100644 index 0000000000000000000000000000000000000000..81c40c26405288f3a1580d521fd48fb630cf5944 --- /dev/null +++ b/node_modules/@microsoft/tsdoc/lib/nodes/DocExcerpt.js @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +import { DocNode, DocNodeKind } from './DocNode'; +import { TokenKind } from '../parser/Token'; +/* eslint-disable @typescript-eslint/naming-convention */ +/** + * Indicates the type of {@link DocExcerpt}. + */ +export var ExcerptKind; +(function (ExcerptKind) { + ExcerptKind["Spacing"] = "Spacing"; + ExcerptKind["BlockTag"] = "BlockTag"; + ExcerptKind["CodeSpan_OpeningDelimiter"] = "CodeSpan_OpeningDelimiter"; + ExcerptKind["CodeSpan_Code"] = "CodeSpan_Code"; + ExcerptKind["CodeSpan_ClosingDelimiter"] = "CodeSpan_ClosingDelimiter"; + ExcerptKind["DeclarationReference_PackageName"] = "DeclarationReference_PackageName"; + ExcerptKind["DeclarationReference_ImportPath"] = "DeclarationReference_ImportPath"; + ExcerptKind["DeclarationReference_ImportHash"] = "DeclarationReference_ImportHash"; + /** + * Input characters that were reported as an error and do not appear to be part of a valid expression. + * A syntax highlighter might display them with an error color (e.g. red). + */ + ExcerptKind["ErrorText"] = "ErrorText"; + /** + * Input characters that do not conform to the TSDoc specification, but were recognized by the parser, for example + * as a known JSDoc pattern. A syntax highlighter should not display them with an error color (e.g. red) + * because the error reporting may be suppressed for "lax" parsing of legacy source code. + */ + ExcerptKind["NonstandardText"] = "NonstandardText"; + ExcerptKind["EscapedText"] = "EscapedText"; + ExcerptKind["FencedCode_OpeningFence"] = "FencedCode_OpeningFence"; + ExcerptKind["FencedCode_Language"] = "FencedCode_Language"; + ExcerptKind["FencedCode_Code"] = "FencedCode_Code"; + ExcerptKind["FencedCode_ClosingFence"] = "FencedCode_ClosingFence"; + ExcerptKind["HtmlAttribute_Name"] = "HtmlAttribute_Name"; + ExcerptKind["HtmlAttribute_Equals"] = "HtmlAttribute_Equals"; + ExcerptKind["HtmlAttribute_Value"] = "HtmlAttribute_Value"; + ExcerptKind["HtmlEndTag_OpeningDelimiter"] = "HtmlEndTag_OpeningDelimiter"; + ExcerptKind["HtmlEndTag_Name"] = "HtmlEndTag_Name"; + ExcerptKind["HtmlEndTag_ClosingDelimiter"] = "HtmlEndTag_ClosingDelimiter"; + ExcerptKind["HtmlStartTag_OpeningDelimiter"] = "HtmlStartTag_OpeningDelimiter"; + ExcerptKind["HtmlStartTag_Name"] = "HtmlStartTag_Name"; + ExcerptKind["HtmlStartTag_ClosingDelimiter"] = "HtmlStartTag_ClosingDelimiter"; + ExcerptKind["InlineTag_OpeningDelimiter"] = "InlineTag_OpeningDelimiter"; + ExcerptKind["InlineTag_TagName"] = "InlineTag_TagName"; + ExcerptKind["InlineTag_TagContent"] = "InlineTag_TagContent"; + ExcerptKind["InlineTag_ClosingDelimiter"] = "InlineTag_ClosingDelimiter"; + ExcerptKind["LinkTag_UrlDestination"] = "LinkTag_UrlDestination"; + ExcerptKind["LinkTag_Pipe"] = "LinkTag_Pipe"; + ExcerptKind["LinkTag_LinkText"] = "LinkTag_LinkText"; + ExcerptKind["MemberIdentifier_LeftQuote"] = "MemberIdentifier_LeftQuote"; + ExcerptKind["MemberIdentifier_Identifier"] = "MemberIdentifier_Identifier"; + ExcerptKind["MemberIdentifier_RightQuote"] = "MemberIdentifier_RightQuote"; + ExcerptKind["MemberReference_Dot"] = "MemberReference_Dot"; + ExcerptKind["MemberReference_LeftParenthesis"] = "MemberReference_LeftParenthesis"; + ExcerptKind["MemberReference_Colon"] = "MemberReference_Colon"; + ExcerptKind["MemberReference_RightParenthesis"] = "MemberReference_RightParenthesis"; + ExcerptKind["MemberSelector"] = "MemberSelector"; + ExcerptKind["DocMemberSymbol_LeftBracket"] = "DocMemberSymbol_LeftBracket"; + ExcerptKind["DocMemberSymbol_RightBracket"] = "DocMemberSymbol_RightBracket"; + ExcerptKind["ParamBlock_ParameterName"] = "ParamBlock_ParameterName"; + ExcerptKind["ParamBlock_Hyphen"] = "ParamBlock_Hyphen"; + ExcerptKind["PlainText"] = "PlainText"; + ExcerptKind["SoftBreak"] = "SoftBreak"; +})(ExcerptKind || (ExcerptKind = {})); +/** + * Represents a parsed token sequence. + * + * @remarks + * When a `DocNode` is created by parsing a doc comment, it will have `DocExcerpt` child nodes corresponding to + * the parsed syntax elements such as names, keywords, punctuation, and spaces. These excerpts indicate the original + * coordinates of the syntax element, and thus can be used for syntax highlighting and precise error reporting. + * They could also be used to rewrite specific words in a source file (e.g. renaming a parameter) without disturbing + * any other characters in the file. + * + * Every parsed character will correspond to at most one DocExcerpt object. In other words, excerpts never overlap. + * A given excerpt can span multiple comment lines, and it may contain gaps, for example to skip the `*` character + * that starts a new TSDoc comment line. + */ +export class DocExcerpt extends DocNode { + /** + * Don't call this directly. Instead use {@link TSDocParser} + * @internal + */ + constructor(parameters) { + super(parameters); + if (parameters.excerptKind === ExcerptKind.Spacing) { + for (const token of parameters.content.tokens) { + switch (token.kind) { + case TokenKind.Spacing: + case TokenKind.Newline: + case TokenKind.EndOfInput: + break; + default: + throw new Error(`The excerptKind=Spacing but the range contains a non-whitespace token`); + } + } + } + this._excerptKind = parameters.excerptKind; + this._content = parameters.content; + } + /** @override */ + get kind() { + return DocNodeKind.Excerpt; + } + /** + * Indicates the kind of DocExcerpt. + */ + get excerptKind() { + return this._excerptKind; + } + /** + * The input token sequence corresponding to this excerpt. + * @remarks + * Note that a token sequence can span multiple input lines and may contain gaps, for example to skip the `*` + * character that starts a new TSDoc comment line. + */ + get content() { + return this._content; + } +} +//# sourceMappingURL=DocExcerpt.js.map \ No newline at end of file