Spaces:
Sleeping
Sleeping
Re-add Swagger dependencies (part 2)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- node_modules/@microsoft/tsdoc/CHANGELOG.json +778 -0
- node_modules/@microsoft/tsdoc/CHANGELOG.md +421 -0
- node_modules/@microsoft/tsdoc/LICENSE +22 -0
- node_modules/@microsoft/tsdoc/README.md +56 -0
- node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts +200 -0
- node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js +1281 -0
- node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts +44 -0
- node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js +94 -0
- node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts +133 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js +219 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts +69 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js +45 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts +43 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js +47 -0
- node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts +44 -0
- node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js +68 -0
- node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts +52 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js +77 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts +400 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardTags.js +557 -0
- node_modules/@microsoft/tsdoc/lib/details/StandardTags.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts +33 -0
- node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/details/Standardization.js +36 -0
- node_modules/@microsoft/tsdoc/lib/details/Standardization.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts +33 -0
- node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js +75 -0
- node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js.map +1 -0
- node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts +42 -0
- node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts.map +1 -0
- node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js +35 -0
- node_modules/@microsoft/tsdoc/lib/emitters/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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@microsoft/tsdoc",
|
| 3 |
+
"entries": [
|
| 4 |
+
{
|
| 5 |
+
"version": "0.16.0",
|
| 6 |
+
"tag": "@microsoft/tsdoc_v0.16.0",
|
| 7 |
+
"date": "Tue, 11 Nov 2025 00:51:42 GMT",
|
| 8 |
+
"comments": {
|
| 9 |
+
"minor": [
|
| 10 |
+
{
|
| 11 |
+
"comment": "Normalize builtin imports."
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"comment": "Standardize TypeScript's `@jsx`, `@jsxRuntime`, `@jsxFrag`, `@jsxImportSource` tags."
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"patch": [
|
| 18 |
+
{
|
| 19 |
+
"comment": "Ensure TSDocEmitter does not emit a newline for the text after `@defaultValue` tags."
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"comment": "Remove test files and declaration maps from the published package."
|
| 23 |
+
}
|
| 24 |
+
]
|
| 25 |
+
}
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"version": "0.15.1",
|
| 29 |
+
"tag": "@microsoft/tsdoc_v0.15.1",
|
| 30 |
+
"date": "Sat, 23 Nov 2024 00:23:35 GMT",
|
| 31 |
+
"comments": {
|
| 32 |
+
"patch": [
|
| 33 |
+
{
|
| 34 |
+
"comment": "Include CHANGELOG.md in published releases again"
|
| 35 |
+
}
|
| 36 |
+
]
|
| 37 |
+
}
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"version": "0.15.0",
|
| 41 |
+
"tag": "@microsoft/tsdoc_v0.15.0",
|
| 42 |
+
"date": "Tue, 28 May 2024 21:34:19 GMT",
|
| 43 |
+
"comments": {
|
| 44 |
+
"minor": [
|
| 45 |
+
{
|
| 46 |
+
"comment": "Minor package cleanup."
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"comment": "Eliminate remaining const enums."
|
| 50 |
+
}
|
| 51 |
+
],
|
| 52 |
+
"patch": [
|
| 53 |
+
{
|
| 54 |
+
"comment": "Update an image URL in the README.md file"
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"comment": "Upgrade dev toolchain (Heft, Webpack, TypeScript)"
|
| 58 |
+
}
|
| 59 |
+
]
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"version": "0.14.2",
|
| 64 |
+
"tag": "@microsoft/tsdoc_v0.14.2",
|
| 65 |
+
"date": "Wed, 14 Sep 2022 02:55:06 GMT",
|
| 66 |
+
"comments": {
|
| 67 |
+
"patch": [
|
| 68 |
+
{
|
| 69 |
+
"comment": "Update an internal type import to avoid a circular reference (GitHub #327 and #328)"
|
| 70 |
+
}
|
| 71 |
+
]
|
| 72 |
+
}
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"version": "0.14.1",
|
| 76 |
+
"tag": "@microsoft/tsdoc_v0.14.1",
|
| 77 |
+
"date": "Sat, 09 Apr 2022 02:28:41 GMT",
|
| 78 |
+
"comments": {
|
| 79 |
+
"patch": [
|
| 80 |
+
{
|
| 81 |
+
"comment": "Rename the \"master\" branch to \"main.\""
|
| 82 |
+
}
|
| 83 |
+
]
|
| 84 |
+
}
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"version": "0.14.0",
|
| 88 |
+
"tag": "@microsoft/tsdoc_v0.14.0",
|
| 89 |
+
"date": "Thu, 07 Apr 2022 22:51:07 GMT",
|
| 90 |
+
"comments": {
|
| 91 |
+
"minor": [
|
| 92 |
+
{
|
| 93 |
+
"comment": "Add `supportedHtmlElements` and `reportUnsupportedHtmlElements` options and corresponding validation"
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"comment": "Convert \"const enum\" APIs to be regular enums to enable compatibility with isolatedModules=true (GitHub #306)"
|
| 97 |
+
}
|
| 98 |
+
]
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"version": "0.13.2",
|
| 103 |
+
"tag": "@microsoft/tsdoc_v0.13.2",
|
| 104 |
+
"date": "Tue, 20 Apr 2021 04:25:13 GMT",
|
| 105 |
+
"comments": {
|
| 106 |
+
"patch": [
|
| 107 |
+
{
|
| 108 |
+
"comment": "Fix an issue where \"tsdoc-inline-tag-missing-braces\" and \"tsdoc-tag-should-not-have-braces\" were reported incorrectly"
|
| 109 |
+
}
|
| 110 |
+
]
|
| 111 |
+
}
|
| 112 |
+
},
|
| 113 |
+
{
|
| 114 |
+
"version": "0.13.1",
|
| 115 |
+
"tag": "@microsoft/tsdoc_v0.13.1",
|
| 116 |
+
"date": "Mon, 19 Apr 2021 21:22:32 GMT",
|
| 117 |
+
"comments": {
|
| 118 |
+
"patch": [
|
| 119 |
+
{
|
| 120 |
+
"comment": "Add a new TSDocMessageId definition used by @microsoft/tsdoc-config"
|
| 121 |
+
}
|
| 122 |
+
]
|
| 123 |
+
}
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"version": "0.13.0",
|
| 127 |
+
"tag": "@microsoft/tsdoc_v0.13.0",
|
| 128 |
+
"date": "Fri, 22 Jan 2021 18:07:19 GMT",
|
| 129 |
+
"comments": {
|
| 130 |
+
"patch": [
|
| 131 |
+
{
|
| 132 |
+
"comment": "Update doc comments to fix some syntax issues"
|
| 133 |
+
}
|
| 134 |
+
],
|
| 135 |
+
"minor": [
|
| 136 |
+
{
|
| 137 |
+
"comment": "Update tsdoc.json schema to add a new field \"noStandardTags\""
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"comment": "Add new APIs: TSDocConfiguration.clear() and TSDocTagDefinition.validateTSDocTagName()"
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"comment": "Add new \"supportForTags\" field to tsdoc.json schema"
|
| 144 |
+
}
|
| 145 |
+
]
|
| 146 |
+
}
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"version": "0.12.24",
|
| 150 |
+
"tag": "@microsoft/tsdoc_v0.12.24",
|
| 151 |
+
"date": "Thu, 03 Dec 2020 08:07:55 GMT",
|
| 152 |
+
"comments": {
|
| 153 |
+
"patch": [
|
| 154 |
+
{
|
| 155 |
+
"comment": "Add a missing declaration file"
|
| 156 |
+
}
|
| 157 |
+
]
|
| 158 |
+
}
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"version": "0.12.23",
|
| 162 |
+
"tag": "@microsoft/tsdoc_v0.12.23",
|
| 163 |
+
"date": "Thu, 03 Dec 2020 04:31:52 GMT",
|
| 164 |
+
"comments": {
|
| 165 |
+
"patch": [
|
| 166 |
+
{
|
| 167 |
+
"comment": "Add a definition for the `@decorator` block tag (RFC 271)"
|
| 168 |
+
}
|
| 169 |
+
]
|
| 170 |
+
}
|
| 171 |
+
},
|
| 172 |
+
{
|
| 173 |
+
"version": "0.12.22",
|
| 174 |
+
"tag": "@microsoft/tsdoc_v0.12.22",
|
| 175 |
+
"date": "Mon, 30 Nov 2020 06:16:21 GMT",
|
| 176 |
+
"comments": {
|
| 177 |
+
"patch": [
|
| 178 |
+
{
|
| 179 |
+
"comment": "Update documentation to reference the new website URL"
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"comment": "Upgrade build tools and configuration"
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"comment": "Fix typo"
|
| 186 |
+
}
|
| 187 |
+
]
|
| 188 |
+
}
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"version": "0.12.21",
|
| 192 |
+
"tag": "@microsoft/tsdoc_v0.12.21",
|
| 193 |
+
"date": "Fri, 04 Sep 2020 15:53:27 GMT",
|
| 194 |
+
"comments": {
|
| 195 |
+
"patch": [
|
| 196 |
+
{
|
| 197 |
+
"comment": "Fix an issue where the line extractor's trailing whitespace trimming sometimes trimmed a non-whitespace character (GitHub #258)"
|
| 198 |
+
},
|
| 199 |
+
{
|
| 200 |
+
"comment": "Update build system"
|
| 201 |
+
}
|
| 202 |
+
]
|
| 203 |
+
}
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"version": "0.12.20",
|
| 207 |
+
"tag": "@microsoft/tsdoc_v0.12.20",
|
| 208 |
+
"date": "Wed, 20 May 2020 22:33:27 GMT",
|
| 209 |
+
"comments": {
|
| 210 |
+
"patch": [
|
| 211 |
+
{
|
| 212 |
+
"comment": "Add support for `@see` tag"
|
| 213 |
+
},
|
| 214 |
+
{
|
| 215 |
+
"comment": "Improve documentation for `@inheritDoc`"
|
| 216 |
+
}
|
| 217 |
+
]
|
| 218 |
+
}
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"version": "0.12.19",
|
| 222 |
+
"tag": "@microsoft/tsdoc_v0.12.19",
|
| 223 |
+
"date": "Fri, 27 Mar 2020 23:14:53 GMT",
|
| 224 |
+
"comments": {
|
| 225 |
+
"patch": [
|
| 226 |
+
{
|
| 227 |
+
"comment": "Add some missing entries to TSDocConfiguration.allTsdocMessageIds() which were breaking eslint-plugin-tsdoc"
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"comment": "Fix an issue where \"h1\" was not allowed as an HTML element name"
|
| 231 |
+
}
|
| 232 |
+
]
|
| 233 |
+
}
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"version": "0.12.18",
|
| 237 |
+
"tag": "@microsoft/tsdoc_v0.12.18",
|
| 238 |
+
"date": "Sat, 22 Feb 2020 20:44:16 GMT",
|
| 239 |
+
"comments": {
|
| 240 |
+
"patch": [
|
| 241 |
+
{
|
| 242 |
+
"comment": "Fix an issue where JSDoc optional params were not parsed correctly"
|
| 243 |
+
}
|
| 244 |
+
]
|
| 245 |
+
}
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"version": "0.12.17",
|
| 249 |
+
"tag": "@microsoft/tsdoc_v0.12.17",
|
| 250 |
+
"date": "Sat, 22 Feb 2020 02:55:07 GMT",
|
| 251 |
+
"comments": {
|
| 252 |
+
"patch": [
|
| 253 |
+
{
|
| 254 |
+
"comment": "Improve the parsing of `@param` and `@typeParam` tags to recognize legacy syntaxes"
|
| 255 |
+
}
|
| 256 |
+
]
|
| 257 |
+
}
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"version": "0.12.16",
|
| 261 |
+
"tag": "@microsoft/tsdoc_v0.12.16",
|
| 262 |
+
"date": "Tue, 19 Nov 2019 22:01:56 GMT",
|
| 263 |
+
"comments": {
|
| 264 |
+
"patch": [
|
| 265 |
+
{
|
| 266 |
+
"comment": "Add some new TSDocMessageId definitions used by @microsoft/tsdoc-config"
|
| 267 |
+
}
|
| 268 |
+
]
|
| 269 |
+
}
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"version": "0.12.15",
|
| 273 |
+
"tag": "@microsoft/tsdoc_v0.12.15",
|
| 274 |
+
"date": "Sat, 09 Nov 2019 05:55:42 GMT",
|
| 275 |
+
"comments": {
|
| 276 |
+
"patch": [
|
| 277 |
+
{
|
| 278 |
+
"comment": "Add new API TSDocConfiguration.allTsdocMessageIds"
|
| 279 |
+
}
|
| 280 |
+
]
|
| 281 |
+
}
|
| 282 |
+
},
|
| 283 |
+
{
|
| 284 |
+
"version": "0.12.14",
|
| 285 |
+
"tag": "@microsoft/tsdoc_v0.12.14",
|
| 286 |
+
"date": "Wed, 04 Sep 2019 03:30:10 GMT",
|
| 287 |
+
"comments": {
|
| 288 |
+
"patch": [
|
| 289 |
+
{
|
| 290 |
+
"comment": "Fix a regression where some API signatures were incompatible with TypeScript versions prior to 3.4"
|
| 291 |
+
}
|
| 292 |
+
]
|
| 293 |
+
}
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"version": "0.12.13",
|
| 297 |
+
"tag": "@microsoft/tsdoc_v0.12.13",
|
| 298 |
+
"date": "Fri, 30 Aug 2019 18:38:59 GMT",
|
| 299 |
+
"comments": {
|
| 300 |
+
"patch": [
|
| 301 |
+
{
|
| 302 |
+
"comment": "Fix an invalid regular expression."
|
| 303 |
+
}
|
| 304 |
+
]
|
| 305 |
+
}
|
| 306 |
+
},
|
| 307 |
+
{
|
| 308 |
+
"version": "0.12.12",
|
| 309 |
+
"tag": "@microsoft/tsdoc_v0.12.12",
|
| 310 |
+
"date": "Wed, 07 Aug 2019 23:06:02 GMT",
|
| 311 |
+
"comments": {
|
| 312 |
+
"patch": [
|
| 313 |
+
{
|
| 314 |
+
"comment": "Improve DeclarationReference.parse for module sources"
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"comment": "Add a definition for the `@throws` block tag (RFC 171)"
|
| 318 |
+
}
|
| 319 |
+
]
|
| 320 |
+
}
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"version": "0.12.11",
|
| 324 |
+
"tag": "@microsoft/tsdoc_v0.12.11",
|
| 325 |
+
"date": "Wed, 24 Jul 2019 00:38:18 GMT",
|
| 326 |
+
"comments": {
|
| 327 |
+
"patch": [
|
| 328 |
+
{
|
| 329 |
+
"comment": "Add new meanings to DeclarationReference and fix some parsing bugs"
|
| 330 |
+
}
|
| 331 |
+
]
|
| 332 |
+
}
|
| 333 |
+
},
|
| 334 |
+
{
|
| 335 |
+
"version": "0.12.10",
|
| 336 |
+
"tag": "@microsoft/tsdoc_v0.12.10",
|
| 337 |
+
"date": "Fri, 19 Jul 2019 02:47:09 GMT",
|
| 338 |
+
"comments": {
|
| 339 |
+
"patch": [
|
| 340 |
+
{
|
| 341 |
+
"comment": "Add beta implementation of new DeclarationReference API"
|
| 342 |
+
}
|
| 343 |
+
]
|
| 344 |
+
}
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"version": "0.12.9",
|
| 348 |
+
"tag": "@microsoft/tsdoc_v0.12.9",
|
| 349 |
+
"date": "Thu, 11 Apr 2019 03:58:35 GMT",
|
| 350 |
+
"comments": {
|
| 351 |
+
"patch": [
|
| 352 |
+
{
|
| 353 |
+
"comment": "Improve the wording of the error messages involving character sequences that look like TSDoc tags"
|
| 354 |
+
}
|
| 355 |
+
]
|
| 356 |
+
}
|
| 357 |
+
},
|
| 358 |
+
{
|
| 359 |
+
"version": "0.12.8",
|
| 360 |
+
"tag": "@microsoft/tsdoc_v0.12.8",
|
| 361 |
+
"date": "Tue, 12 Mar 2019 23:18:11 GMT",
|
| 362 |
+
"comments": {
|
| 363 |
+
"patch": [
|
| 364 |
+
{
|
| 365 |
+
"comment": "Fix an issue where tsdoc-param-tag-with-invalid-name was sometimes incorrectly reported certain identifiers (issue #148)"
|
| 366 |
+
}
|
| 367 |
+
]
|
| 368 |
+
}
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"version": "0.12.7",
|
| 372 |
+
"tag": "@microsoft/tsdoc_v0.12.7",
|
| 373 |
+
"date": "Fri, 01 Mar 2019 06:39:52 GMT",
|
| 374 |
+
"comments": {
|
| 375 |
+
"patch": [
|
| 376 |
+
{
|
| 377 |
+
"comment": "Add new API TSDocConfiguration.isKnownMessageId()"
|
| 378 |
+
}
|
| 379 |
+
]
|
| 380 |
+
}
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"version": "0.12.6",
|
| 384 |
+
"tag": "@microsoft/tsdoc_v0.12.6",
|
| 385 |
+
"date": "Thu, 28 Feb 2019 01:29:39 GMT",
|
| 386 |
+
"comments": {
|
| 387 |
+
"patch": [
|
| 388 |
+
{
|
| 389 |
+
"comment": "Add a new API ParserMessage.messageId with a unique ID useful for filtering and searching for errors"
|
| 390 |
+
}
|
| 391 |
+
]
|
| 392 |
+
}
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"version": "0.12.5",
|
| 396 |
+
"tag": "@microsoft/tsdoc_v0.12.5",
|
| 397 |
+
"date": "Tue, 29 Jan 2019 22:49:58 GMT",
|
| 398 |
+
"comments": {
|
| 399 |
+
"patch": [
|
| 400 |
+
{
|
| 401 |
+
"comment": "Update parser to allow `$` character in `@param` names, since ECMAScript allows this in unquoted identifiers"
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"comment": "Allow `$` character in declaration reference member identifiers (Example: `{@link Button.$render}`)"
|
| 405 |
+
}
|
| 406 |
+
]
|
| 407 |
+
}
|
| 408 |
+
},
|
| 409 |
+
{
|
| 410 |
+
"version": "0.12.4",
|
| 411 |
+
"tag": "@microsoft/tsdoc_v0.12.4",
|
| 412 |
+
"date": "Tue, 20 Nov 2018 21:23:06 GMT",
|
| 413 |
+
"comments": {
|
| 414 |
+
"patch": [
|
| 415 |
+
{
|
| 416 |
+
"comment": "Add new interface `IStringBuilder`"
|
| 417 |
+
}
|
| 418 |
+
]
|
| 419 |
+
}
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"version": "0.12.3",
|
| 423 |
+
"tag": "@microsoft/tsdoc_v0.12.3",
|
| 424 |
+
"date": "Tue, 20 Nov 2018 07:42:17 GMT",
|
| 425 |
+
"comments": {
|
| 426 |
+
"patch": [
|
| 427 |
+
{
|
| 428 |
+
"comment": "Add a new API `PlainTextEmitter.hasAnyTextContent()`"
|
| 429 |
+
}
|
| 430 |
+
]
|
| 431 |
+
}
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"version": "0.12.2",
|
| 435 |
+
"tag": "@microsoft/tsdoc_v0.12.2",
|
| 436 |
+
"date": "Fri, 09 Nov 2018 15:13:13 GMT",
|
| 437 |
+
"comments": {
|
| 438 |
+
"patch": [
|
| 439 |
+
{
|
| 440 |
+
"comment": "Improve trimming of spacing for link text in `{@link}` tags"
|
| 441 |
+
}
|
| 442 |
+
]
|
| 443 |
+
}
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"version": "0.12.1",
|
| 447 |
+
"tag": "@microsoft/tsdoc_v0.12.1",
|
| 448 |
+
"date": "Tue, 06 Nov 2018 01:37:22 GMT",
|
| 449 |
+
"comments": {
|
| 450 |
+
"patch": [
|
| 451 |
+
{
|
| 452 |
+
"comment": "Allow HTML in a `DocSection` node"
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"comment": "Fix a bug where `TSDocEmitter.renderHtmlTag()` and `TSDocEmitter.renderDeclarationReference()` were including comment framing"
|
| 456 |
+
},
|
| 457 |
+
{
|
| 458 |
+
"comment": "Add `DocSection.appendNodesInParagraph()` API"
|
| 459 |
+
}
|
| 460 |
+
]
|
| 461 |
+
}
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"version": "0.12.0",
|
| 465 |
+
"tag": "@microsoft/tsdoc_v0.12.0",
|
| 466 |
+
"date": "Sat, 03 Nov 2018 02:07:10 GMT",
|
| 467 |
+
"comments": {
|
| 468 |
+
"patch": [
|
| 469 |
+
{
|
| 470 |
+
"comment": "Add `DocDeclarationReference.emitAsTsdoc()`, `DocHtmlStartTag.emitAsHtml()`, and `DocHtmlEndTag.emitAsHtml()`"
|
| 471 |
+
},
|
| 472 |
+
{
|
| 473 |
+
"comment": "Child nodes can now be specified as a second constructor parameter for `DocNodeContainer`"
|
| 474 |
+
}
|
| 475 |
+
],
|
| 476 |
+
"minor": [
|
| 477 |
+
{
|
| 478 |
+
"comment": "(API change) `DocErrorText` is no longer allowed in `DocSection`; instead it must be part of a `DocParagraph`"
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"comment": "(API change) Rename `TSDocParserConfiguration` to `TSDocConfiguration`"
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"comment": "(API change) Require an associated `TSDocConfiguration` to be included with the parameters for every `DocNode` constructor"
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"comment": "Introduce `TSDocConfiguration.docNodeManager` for registering custom `DocNode` subclasses and their container relationships"
|
| 488 |
+
}
|
| 489 |
+
]
|
| 490 |
+
}
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"version": "0.11.0",
|
| 494 |
+
"tag": "@microsoft/tsdoc_v0.11.0",
|
| 495 |
+
"date": "Sat, 27 Oct 2018 04:52:23 GMT",
|
| 496 |
+
"comments": {
|
| 497 |
+
"minor": [
|
| 498 |
+
{
|
| 499 |
+
"comment": "(API change) Introduce `DocParamCollection` to enable efficient lookups of parameters by name"
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"comment": "(API change) Rename `DocComment.typeParamBlocks` --> `DocComment.typeParams`"
|
| 503 |
+
},
|
| 504 |
+
{
|
| 505 |
+
"comment": "(API change) Rename `DocComment.paramBlocks` --> `DocComment.params`"
|
| 506 |
+
}
|
| 507 |
+
]
|
| 508 |
+
}
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"version": "0.10.0",
|
| 512 |
+
"tag": "@microsoft/tsdoc_v0.10.0",
|
| 513 |
+
"date": "Fri, 26 Oct 2018 08:42:51 GMT",
|
| 514 |
+
"comments": {
|
| 515 |
+
"minor": [
|
| 516 |
+
{
|
| 517 |
+
"comment": "Add new APIs `DocComment.emitAsTsdoc()`, `TSDocEmitter`, and `StringBuilder`"
|
| 518 |
+
}
|
| 519 |
+
]
|
| 520 |
+
}
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"version": "0.9.3",
|
| 524 |
+
"tag": "@microsoft/tsdoc_v0.9.3",
|
| 525 |
+
"date": "Thu, 25 Oct 2018 08:29:36 GMT",
|
| 526 |
+
"comments": {
|
| 527 |
+
"patch": [
|
| 528 |
+
{
|
| 529 |
+
"comment": "Fix issue where `DocErrorText.text` returned `[object Object]` instead of the text"
|
| 530 |
+
}
|
| 531 |
+
]
|
| 532 |
+
}
|
| 533 |
+
},
|
| 534 |
+
{
|
| 535 |
+
"version": "0.9.2",
|
| 536 |
+
"tag": "@microsoft/tsdoc_v0.9.2",
|
| 537 |
+
"date": "Wed, 17 Oct 2018 13:41:54 GMT",
|
| 538 |
+
"comments": {
|
| 539 |
+
"patch": [
|
| 540 |
+
{
|
| 541 |
+
"comment": "Fix stack overflow in DocFencedCode.language property getter"
|
| 542 |
+
}
|
| 543 |
+
]
|
| 544 |
+
}
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"version": "0.9.1",
|
| 548 |
+
"tag": "@microsoft/tsdoc_v0.9.1",
|
| 549 |
+
"date": "Wed, 17 Oct 2018 12:49:01 GMT",
|
| 550 |
+
"comments": {
|
| 551 |
+
"patch": [
|
| 552 |
+
{
|
| 553 |
+
"comment": "Fix a regression where the paragraph splitter was sometimes skipping blocks"
|
| 554 |
+
}
|
| 555 |
+
]
|
| 556 |
+
}
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"version": "0.9.0",
|
| 560 |
+
"tag": "@microsoft/tsdoc_v0.9.0",
|
| 561 |
+
"date": "Wed, 17 Oct 2018 04:47:19 GMT",
|
| 562 |
+
"comments": {
|
| 563 |
+
"minor": [
|
| 564 |
+
{
|
| 565 |
+
"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"
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"comment": "(API change) Rename `DocParticle` to `DocExcerpt`, and eliminate the `Excerpt` class"
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"comment": "(API change) Eliminate `DocNodeLeaf`, since now `DocExcerpt` is the only class that can represent excerpts"
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"comment": "(API change) Remove `DocNode.updateParameters()` because it is no longer needed"
|
| 575 |
+
},
|
| 576 |
+
{
|
| 577 |
+
"comment": "(API change) Spacing is now represented as a normal `DocExcerpt`, rather than via a special `Excerpt.spacingAfterContent`"
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"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."
|
| 581 |
+
}
|
| 582 |
+
]
|
| 583 |
+
}
|
| 584 |
+
},
|
| 585 |
+
{
|
| 586 |
+
"version": "0.8.1",
|
| 587 |
+
"tag": "@microsoft/api-extractor_v0.8.1",
|
| 588 |
+
"date": "Sun, 07 Oct 2018 06:30:34 GMT",
|
| 589 |
+
"comments": {
|
| 590 |
+
"patch": [
|
| 591 |
+
{
|
| 592 |
+
"comment": "Improve error reporting for declaration references that are probably missing a `\"#\"` delimiter"
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"comment": "Rename `DocCodeFence` to `DocFencedCode`"
|
| 596 |
+
}
|
| 597 |
+
]
|
| 598 |
+
}
|
| 599 |
+
},
|
| 600 |
+
{
|
| 601 |
+
"version": "0.8.0",
|
| 602 |
+
"tag": "@microsoft/api-extractor_v0.8.0",
|
| 603 |
+
"date": "Wed, 03 Oct 2018 02:43:47 GMT",
|
| 604 |
+
"comments": {
|
| 605 |
+
"minor": [
|
| 606 |
+
{
|
| 607 |
+
"comment": "Introduce a distinction between \"defined\" tags (i.e. recognized) versus \"supported\" tags (i.e. implemented by the tool)"
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"comment": "The parser optionally reports usage of undefined tags"
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"comment": "The parser optionally reports usage of unsupported tags"
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"comment": "The parser reports usage of inline/block syntax that is inconsistent with the tag definition"
|
| 617 |
+
},
|
| 618 |
+
{
|
| 619 |
+
"comment": "Code spans are now allowed to be adjacent to other text, but must contain at least one character"
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"comment": "An `@deprecated` block must contain a deprecation message"
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"comment": "If `@inheritDoc` is used, then the summary section must be empty, and there must not be an `@remarks` block"
|
| 626 |
+
}
|
| 627 |
+
]
|
| 628 |
+
}
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"version": "0.7.0",
|
| 632 |
+
"tag": "@microsoft/api-extractor_v0.7.0",
|
| 633 |
+
"date": "Tue, 02 Oct 2018 02:35:35 GMT",
|
| 634 |
+
"comments": {
|
| 635 |
+
"minor": [
|
| 636 |
+
{
|
| 637 |
+
"comment": "Add support for `@defaultValue` tag"
|
| 638 |
+
},
|
| 639 |
+
{
|
| 640 |
+
"comment": "Add support for `@typeParam` tag"
|
| 641 |
+
}
|
| 642 |
+
]
|
| 643 |
+
}
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"version": "0.6.0",
|
| 647 |
+
"tag": "@microsoft/api-extractor_v0.6.0",
|
| 648 |
+
"date": "Mon, 01 Oct 2018 22:11:24 GMT",
|
| 649 |
+
"comments": {
|
| 650 |
+
"minor": [
|
| 651 |
+
{
|
| 652 |
+
"comment": "Add support for `@link` tags using the new declaration reference syntax"
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"comment": "Add support for `@inheritDoc` tags"
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"comment": "Add new APIs: `DocDeclarationReference`, `DocInheritDocTag`, `DocLinkTag`, `DocMemberIdentifier`, `DocMemberReference`, `DocMemberSelector`, `DocMemberSymbol`"
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"comment": "Remove `ParserContext.verbatimNodes`"
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"comment": "Add `DocParticle.particleId` property"
|
| 665 |
+
}
|
| 666 |
+
]
|
| 667 |
+
}
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"version": "0.5.0",
|
| 671 |
+
"tag": "@microsoft/api-extractor_v0.5.0",
|
| 672 |
+
"date": "Tue, 25 Sep 2018 03:04:06 GMT",
|
| 673 |
+
"comments": {
|
| 674 |
+
"minor": [
|
| 675 |
+
{
|
| 676 |
+
"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"
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"comment": "Add `DocNodeTransforms.trimSpacesInParagraphNodes()` for collapsing whitespace inside `DocParagraph` subtrees"
|
| 680 |
+
},
|
| 681 |
+
{
|
| 682 |
+
"comment": "Extract the `DocNode.excerpt` property into a new abstract base class `DocNodeLeaf`"
|
| 683 |
+
}
|
| 684 |
+
]
|
| 685 |
+
}
|
| 686 |
+
},
|
| 687 |
+
{
|
| 688 |
+
"version": "0.4.1",
|
| 689 |
+
"tag": "@microsoft/api-extractor_v0.4.1",
|
| 690 |
+
"date": "Fri, 31 Aug 2018 03:32:18 GMT",
|
| 691 |
+
"comments": {
|
| 692 |
+
"patch": [
|
| 693 |
+
{
|
| 694 |
+
"comment": "Improve the error location reporting for DocErrorText objects"
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"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"
|
| 698 |
+
}
|
| 699 |
+
]
|
| 700 |
+
}
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"version": "0.4.0",
|
| 704 |
+
"tag": "@microsoft/api-extractor_v0.4.0",
|
| 705 |
+
"date": "Tue, 28 Aug 2018 03:17:20 GMT",
|
| 706 |
+
"comments": {
|
| 707 |
+
"minor": [
|
| 708 |
+
{
|
| 709 |
+
"comment": "Rename `DocCodeSpan.text` to `DocCodeSpan.code` and model the delimiters using particles"
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"comment": "Add support for code fences (`DocCodeFence`)"
|
| 713 |
+
},
|
| 714 |
+
{
|
| 715 |
+
"comment": "`DocSection` content is now grouped into `DocParagraph` nodes; blank lines are used to indicate paragraph boundaries"
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"comment": "Rename `DocComment.deprecated` to `deprecatedBlock`"
|
| 719 |
+
}
|
| 720 |
+
]
|
| 721 |
+
}
|
| 722 |
+
},
|
| 723 |
+
{
|
| 724 |
+
"version": "0.3.0",
|
| 725 |
+
"tag": "@microsoft/api-extractor_v0.3.0",
|
| 726 |
+
"date": "Sat, 25 Aug 2018 05:53:56 GMT",
|
| 727 |
+
"comments": {
|
| 728 |
+
"minor": [
|
| 729 |
+
{
|
| 730 |
+
"comment": "Add TextRange.isEmpty()"
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"comment": "Improve the ModifierTagSet API"
|
| 734 |
+
},
|
| 735 |
+
{
|
| 736 |
+
"comment": "Implement the @privateRemarks and @deprecated tags"
|
| 737 |
+
}
|
| 738 |
+
]
|
| 739 |
+
}
|
| 740 |
+
},
|
| 741 |
+
{
|
| 742 |
+
"version": "0.2.0",
|
| 743 |
+
"tag": "@microsoft/api-extractor_v0.2.0",
|
| 744 |
+
"date": "Fri, 24 Aug 2018 01:19:56 GMT",
|
| 745 |
+
"comments": {
|
| 746 |
+
"minor": [
|
| 747 |
+
{
|
| 748 |
+
"comment": "Rename `CoreTags` to `StandardTags` so we can include non-core tags in the standard definitions"
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"comment": "Rename `CoreModifierTagSet` to `StandardModifierTagSet` and convert properties to functions"
|
| 752 |
+
},
|
| 753 |
+
{
|
| 754 |
+
"comment": "Categorize the standard tags according to a `Standardization` enum, and document them"
|
| 755 |
+
},
|
| 756 |
+
{
|
| 757 |
+
"comment": "Add more standard tag definitions: `@deprecated`, `@eventProperty`, `@example`, `@inheritDoc`, `@link`, `@override`, `@packageDocumentation`, `@public`, `@privateRemarks`, `@sealed`, `@virtual`"
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"comment": "Replace TSDocTagDefinition.singleton with TSDocTagDefinition.allowMultiple, since in practice most tags are single-usage"
|
| 761 |
+
}
|
| 762 |
+
]
|
| 763 |
+
}
|
| 764 |
+
},
|
| 765 |
+
{
|
| 766 |
+
"version": "0.1.0",
|
| 767 |
+
"tag": "@microsoft/api-extractor_v0.1.0",
|
| 768 |
+
"date": "Thu, 16 Aug 2018 18:18:02 GMT",
|
| 769 |
+
"comments": {
|
| 770 |
+
"minor": [
|
| 771 |
+
{
|
| 772 |
+
"comment": "Initial release of the TSDoc library! :-)"
|
| 773 |
+
}
|
| 774 |
+
]
|
| 775 |
+
}
|
| 776 |
+
}
|
| 777 |
+
]
|
| 778 |
+
}
|
node_modules/@microsoft/tsdoc/CHANGELOG.md
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Change Log - @microsoft/tsdoc
|
| 2 |
+
|
| 3 |
+
This log was last generated on Tue, 11 Nov 2025 00:51:42 GMT and should not be manually modified.
|
| 4 |
+
|
| 5 |
+
## 0.16.0
|
| 6 |
+
Tue, 11 Nov 2025 00:51:42 GMT
|
| 7 |
+
|
| 8 |
+
### Minor changes
|
| 9 |
+
|
| 10 |
+
- Normalize builtin imports.
|
| 11 |
+
- Standardize TypeScript's `@jsx`, `@jsxRuntime`, `@jsxFrag`, `@jsxImportSource` tags.
|
| 12 |
+
|
| 13 |
+
### Patches
|
| 14 |
+
|
| 15 |
+
- Ensure TSDocEmitter does not emit a newline for the text after `@defaultValue` tags.
|
| 16 |
+
- Remove test files and declaration maps from the published package.
|
| 17 |
+
|
| 18 |
+
## 0.15.1
|
| 19 |
+
Sat, 23 Nov 2024 00:23:35 GMT
|
| 20 |
+
|
| 21 |
+
### Patches
|
| 22 |
+
|
| 23 |
+
- Include CHANGELOG.md in published releases again
|
| 24 |
+
|
| 25 |
+
## 0.15.0
|
| 26 |
+
Tue, 28 May 2024 21:34:19 GMT
|
| 27 |
+
|
| 28 |
+
### Minor changes
|
| 29 |
+
|
| 30 |
+
- Minor package cleanup.
|
| 31 |
+
- Eliminate remaining const enums.
|
| 32 |
+
|
| 33 |
+
### Patches
|
| 34 |
+
|
| 35 |
+
- Update an image URL in the README.md file
|
| 36 |
+
- Upgrade dev toolchain (Heft, Webpack, TypeScript)
|
| 37 |
+
|
| 38 |
+
## 0.14.2
|
| 39 |
+
Wed, 14 Sep 2022 02:55:06 GMT
|
| 40 |
+
|
| 41 |
+
### Patches
|
| 42 |
+
|
| 43 |
+
- Update an internal type import to avoid a circular reference (GitHub #327 and #328)
|
| 44 |
+
|
| 45 |
+
## 0.14.1
|
| 46 |
+
Sat, 09 Apr 2022 02:28:41 GMT
|
| 47 |
+
|
| 48 |
+
### Patches
|
| 49 |
+
|
| 50 |
+
- Rename the "master" branch to "main."
|
| 51 |
+
|
| 52 |
+
## 0.14.0
|
| 53 |
+
Thu, 07 Apr 2022 22:51:07 GMT
|
| 54 |
+
|
| 55 |
+
### Minor changes
|
| 56 |
+
|
| 57 |
+
- Add `supportedHtmlElements` and `reportUnsupportedHtmlElements` options and corresponding validation
|
| 58 |
+
- Convert "const enum" APIs to be regular enums to enable compatibility with isolatedModules=true (GitHub #306)
|
| 59 |
+
|
| 60 |
+
## 0.13.2
|
| 61 |
+
Tue, 20 Apr 2021 04:25:13 GMT
|
| 62 |
+
|
| 63 |
+
### Patches
|
| 64 |
+
|
| 65 |
+
- Fix an issue where "tsdoc-inline-tag-missing-braces" and "tsdoc-tag-should-not-have-braces" were reported incorrectly
|
| 66 |
+
|
| 67 |
+
## 0.13.1
|
| 68 |
+
Mon, 19 Apr 2021 21:22:32 GMT
|
| 69 |
+
|
| 70 |
+
### Patches
|
| 71 |
+
|
| 72 |
+
- Add a new TSDocMessageId definition used by @microsoft/tsdoc-config
|
| 73 |
+
|
| 74 |
+
## 0.13.0
|
| 75 |
+
Fri, 22 Jan 2021 18:07:19 GMT
|
| 76 |
+
|
| 77 |
+
### Minor changes
|
| 78 |
+
|
| 79 |
+
- Update tsdoc.json schema to add a new field "noStandardTags"
|
| 80 |
+
- Add new APIs: TSDocConfiguration.clear() and TSDocTagDefinition.validateTSDocTagName()
|
| 81 |
+
- Add new "supportForTags" field to tsdoc.json schema
|
| 82 |
+
|
| 83 |
+
### Patches
|
| 84 |
+
|
| 85 |
+
- Update doc comments to fix some syntax issues
|
| 86 |
+
|
| 87 |
+
## 0.12.24
|
| 88 |
+
Thu, 03 Dec 2020 08:07:55 GMT
|
| 89 |
+
|
| 90 |
+
### Patches
|
| 91 |
+
|
| 92 |
+
- Add a missing declaration file
|
| 93 |
+
|
| 94 |
+
## 0.12.23
|
| 95 |
+
Thu, 03 Dec 2020 04:31:52 GMT
|
| 96 |
+
|
| 97 |
+
### Patches
|
| 98 |
+
|
| 99 |
+
- Add a definition for the `@decorator` block tag (RFC 271)
|
| 100 |
+
|
| 101 |
+
## 0.12.22
|
| 102 |
+
Mon, 30 Nov 2020 06:16:21 GMT
|
| 103 |
+
|
| 104 |
+
### Patches
|
| 105 |
+
|
| 106 |
+
- Update documentation to reference the new website URL
|
| 107 |
+
- Upgrade build tools and configuration
|
| 108 |
+
- Fix typo
|
| 109 |
+
|
| 110 |
+
## 0.12.21
|
| 111 |
+
Fri, 04 Sep 2020 15:53:27 GMT
|
| 112 |
+
|
| 113 |
+
### Patches
|
| 114 |
+
|
| 115 |
+
- Fix an issue where the line extractor's trailing whitespace trimming sometimes trimmed a non-whitespace character (GitHub #258)
|
| 116 |
+
- Update build system
|
| 117 |
+
|
| 118 |
+
## 0.12.20
|
| 119 |
+
Wed, 20 May 2020 22:33:27 GMT
|
| 120 |
+
|
| 121 |
+
### Patches
|
| 122 |
+
|
| 123 |
+
- Add support for `@see` tag
|
| 124 |
+
- Improve documentation for `@inheritDoc`
|
| 125 |
+
|
| 126 |
+
## 0.12.19
|
| 127 |
+
Fri, 27 Mar 2020 23:14:53 GMT
|
| 128 |
+
|
| 129 |
+
### Patches
|
| 130 |
+
|
| 131 |
+
- Add some missing entries to TSDocConfiguration.allTsdocMessageIds() which were breaking eslint-plugin-tsdoc
|
| 132 |
+
- Fix an issue where "h1" was not allowed as an HTML element name
|
| 133 |
+
|
| 134 |
+
## 0.12.18
|
| 135 |
+
Sat, 22 Feb 2020 20:44:16 GMT
|
| 136 |
+
|
| 137 |
+
### Patches
|
| 138 |
+
|
| 139 |
+
- Fix an issue where JSDoc optional params were not parsed correctly
|
| 140 |
+
|
| 141 |
+
## 0.12.17
|
| 142 |
+
Sat, 22 Feb 2020 02:55:07 GMT
|
| 143 |
+
|
| 144 |
+
### Patches
|
| 145 |
+
|
| 146 |
+
- Improve the parsing of `@param` and `@typeParam` tags to recognize legacy syntaxes
|
| 147 |
+
|
| 148 |
+
## 0.12.16
|
| 149 |
+
Tue, 19 Nov 2019 22:01:56 GMT
|
| 150 |
+
|
| 151 |
+
### Patches
|
| 152 |
+
|
| 153 |
+
- Add some new TSDocMessageId definitions used by @microsoft/tsdoc-config
|
| 154 |
+
|
| 155 |
+
## 0.12.15
|
| 156 |
+
Sat, 09 Nov 2019 05:55:42 GMT
|
| 157 |
+
|
| 158 |
+
### Patches
|
| 159 |
+
|
| 160 |
+
- Add new API TSDocConfiguration.allTsdocMessageIds
|
| 161 |
+
|
| 162 |
+
## 0.12.14
|
| 163 |
+
Wed, 04 Sep 2019 03:30:10 GMT
|
| 164 |
+
|
| 165 |
+
### Patches
|
| 166 |
+
|
| 167 |
+
- Fix a regression where some API signatures were incompatible with TypeScript versions prior to 3.4
|
| 168 |
+
|
| 169 |
+
## 0.12.13
|
| 170 |
+
Fri, 30 Aug 2019 18:38:59 GMT
|
| 171 |
+
|
| 172 |
+
### Patches
|
| 173 |
+
|
| 174 |
+
- Fix an invalid regular expression.
|
| 175 |
+
|
| 176 |
+
## 0.12.12
|
| 177 |
+
Wed, 07 Aug 2019 23:06:02 GMT
|
| 178 |
+
|
| 179 |
+
### Patches
|
| 180 |
+
|
| 181 |
+
- Improve DeclarationReference.parse for module sources
|
| 182 |
+
- Add a definition for the `@throws` block tag (RFC 171)
|
| 183 |
+
|
| 184 |
+
## 0.12.11
|
| 185 |
+
Wed, 24 Jul 2019 00:38:18 GMT
|
| 186 |
+
|
| 187 |
+
### Patches
|
| 188 |
+
|
| 189 |
+
- Add new meanings to DeclarationReference and fix some parsing bugs
|
| 190 |
+
|
| 191 |
+
## 0.12.10
|
| 192 |
+
Fri, 19 Jul 2019 02:47:09 GMT
|
| 193 |
+
|
| 194 |
+
### Patches
|
| 195 |
+
|
| 196 |
+
- Add beta implementation of new DeclarationReference API
|
| 197 |
+
|
| 198 |
+
## 0.12.9
|
| 199 |
+
Thu, 11 Apr 2019 03:58:35 GMT
|
| 200 |
+
|
| 201 |
+
### Patches
|
| 202 |
+
|
| 203 |
+
- Improve the wording of the error messages involving character sequences that look like TSDoc tags
|
| 204 |
+
|
| 205 |
+
## 0.12.8
|
| 206 |
+
Tue, 12 Mar 2019 23:18:11 GMT
|
| 207 |
+
|
| 208 |
+
### Patches
|
| 209 |
+
|
| 210 |
+
- Fix an issue where tsdoc-param-tag-with-invalid-name was sometimes incorrectly reported certain identifiers (issue #148)
|
| 211 |
+
|
| 212 |
+
## 0.12.7
|
| 213 |
+
Fri, 01 Mar 2019 06:39:52 GMT
|
| 214 |
+
|
| 215 |
+
### Patches
|
| 216 |
+
|
| 217 |
+
- Add new API TSDocConfiguration.isKnownMessageId()
|
| 218 |
+
|
| 219 |
+
## 0.12.6
|
| 220 |
+
Thu, 28 Feb 2019 01:29:39 GMT
|
| 221 |
+
|
| 222 |
+
### Patches
|
| 223 |
+
|
| 224 |
+
- Add a new API ParserMessage.messageId with a unique ID useful for filtering and searching for errors
|
| 225 |
+
|
| 226 |
+
## 0.12.5
|
| 227 |
+
Tue, 29 Jan 2019 22:49:58 GMT
|
| 228 |
+
|
| 229 |
+
### Patches
|
| 230 |
+
|
| 231 |
+
- Update parser to allow `$` character in `@param` names, since ECMAScript allows this in unquoted identifiers
|
| 232 |
+
- Allow `$` character in declaration reference member identifiers (Example: `{@link Button.$render}`)
|
| 233 |
+
|
| 234 |
+
## 0.12.4
|
| 235 |
+
Tue, 20 Nov 2018 21:23:06 GMT
|
| 236 |
+
|
| 237 |
+
### Patches
|
| 238 |
+
|
| 239 |
+
- Add new interface `IStringBuilder`
|
| 240 |
+
|
| 241 |
+
## 0.12.3
|
| 242 |
+
Tue, 20 Nov 2018 07:42:17 GMT
|
| 243 |
+
|
| 244 |
+
### Patches
|
| 245 |
+
|
| 246 |
+
- Add a new API `PlainTextEmitter.hasAnyTextContent()`
|
| 247 |
+
|
| 248 |
+
## 0.12.2
|
| 249 |
+
Fri, 09 Nov 2018 15:13:13 GMT
|
| 250 |
+
|
| 251 |
+
### Patches
|
| 252 |
+
|
| 253 |
+
- Improve trimming of spacing for link text in `{@link}` tags
|
| 254 |
+
|
| 255 |
+
## 0.12.1
|
| 256 |
+
Tue, 06 Nov 2018 01:37:22 GMT
|
| 257 |
+
|
| 258 |
+
### Patches
|
| 259 |
+
|
| 260 |
+
- Allow HTML in a `DocSection` node
|
| 261 |
+
- Fix a bug where `TSDocEmitter.renderHtmlTag()` and `TSDocEmitter.renderDeclarationReference()` were including comment framing
|
| 262 |
+
- Add `DocSection.appendNodesInParagraph()` API
|
| 263 |
+
|
| 264 |
+
## 0.12.0
|
| 265 |
+
Sat, 03 Nov 2018 02:07:10 GMT
|
| 266 |
+
|
| 267 |
+
### Minor changes
|
| 268 |
+
|
| 269 |
+
- (API change) `DocErrorText` is no longer allowed in `DocSection`; instead it must be part of a `DocParagraph`
|
| 270 |
+
- (API change) Rename `TSDocParserConfiguration` to `TSDocConfiguration`
|
| 271 |
+
- (API change) Require an associated `TSDocConfiguration` to be included with the parameters for every `DocNode` constructor
|
| 272 |
+
- Introduce `TSDocConfiguration.docNodeManager` for registering custom `DocNode` subclasses and their container relationships
|
| 273 |
+
|
| 274 |
+
### Patches
|
| 275 |
+
|
| 276 |
+
- Add `DocDeclarationReference.emitAsTsdoc()`, `DocHtmlStartTag.emitAsHtml()`, and `DocHtmlEndTag.emitAsHtml()`
|
| 277 |
+
- Child nodes can now be specified as a second constructor parameter for `DocNodeContainer`
|
| 278 |
+
|
| 279 |
+
## 0.11.0
|
| 280 |
+
Sat, 27 Oct 2018 04:52:23 GMT
|
| 281 |
+
|
| 282 |
+
### Minor changes
|
| 283 |
+
|
| 284 |
+
- (API change) Introduce `DocParamCollection` to enable efficient lookups of parameters by name
|
| 285 |
+
- (API change) Rename `DocComment.typeParamBlocks` --> `DocComment.typeParams`
|
| 286 |
+
- (API change) Rename `DocComment.paramBlocks` --> `DocComment.params`
|
| 287 |
+
|
| 288 |
+
## 0.10.0
|
| 289 |
+
Fri, 26 Oct 2018 08:42:51 GMT
|
| 290 |
+
|
| 291 |
+
### Minor changes
|
| 292 |
+
|
| 293 |
+
- Add new APIs `DocComment.emitAsTsdoc()`, `TSDocEmitter`, and `StringBuilder`
|
| 294 |
+
|
| 295 |
+
## 0.9.3
|
| 296 |
+
Thu, 25 Oct 2018 08:29:36 GMT
|
| 297 |
+
|
| 298 |
+
### Patches
|
| 299 |
+
|
| 300 |
+
- Fix issue where `DocErrorText.text` returned `[object Object]` instead of the text
|
| 301 |
+
|
| 302 |
+
## 0.9.2
|
| 303 |
+
Wed, 17 Oct 2018 13:41:54 GMT
|
| 304 |
+
|
| 305 |
+
### Patches
|
| 306 |
+
|
| 307 |
+
- Fix stack overflow in DocFencedCode.language property getter
|
| 308 |
+
|
| 309 |
+
## 0.9.1
|
| 310 |
+
Wed, 17 Oct 2018 12:49:01 GMT
|
| 311 |
+
|
| 312 |
+
### Patches
|
| 313 |
+
|
| 314 |
+
- Fix a regression where the paragraph splitter was sometimes skipping blocks
|
| 315 |
+
|
| 316 |
+
## 0.9.0
|
| 317 |
+
Wed, 17 Oct 2018 04:47:19 GMT
|
| 318 |
+
|
| 319 |
+
### Minor changes
|
| 320 |
+
|
| 321 |
+
- (API change) Change `DocBlock` to have a `DocSection` property rather than inheriting from `DocSection`; this eliminates confusion about which nodes belong to the container
|
| 322 |
+
- (API change) Rename `DocParticle` to `DocExcerpt`, and eliminate the `Excerpt` class
|
| 323 |
+
- (API change) Eliminate `DocNodeLeaf`, since now `DocExcerpt` is the only class that can represent excerpts
|
| 324 |
+
- (API change) Remove `DocNode.updateParameters()` because it is no longer needed
|
| 325 |
+
- (API change) Spacing is now represented as a normal `DocExcerpt`, rather than via a special `Excerpt.spacingAfterContent`
|
| 326 |
+
- (API change) Simplify `DocNodeTransforms.trimSpacesInParagraph()` to no longer merge/remap excerpts during the transformation. If we need this information, we will track it differently.
|
| 327 |
+
|
| 328 |
+
## 0.8.1
|
| 329 |
+
Sun, 07 Oct 2018 06:30:34 GMT
|
| 330 |
+
|
| 331 |
+
### Patches
|
| 332 |
+
|
| 333 |
+
- Improve error reporting for declaration references that are probably missing a `"#"` delimiter
|
| 334 |
+
- Rename `DocCodeFence` to `DocFencedCode`
|
| 335 |
+
|
| 336 |
+
## 0.8.0
|
| 337 |
+
Wed, 03 Oct 2018 02:43:47 GMT
|
| 338 |
+
|
| 339 |
+
### Minor changes
|
| 340 |
+
|
| 341 |
+
- Introduce a distinction between "defined" tags (i.e. recognized) versus "supported" tags (i.e. implemented by the tool)
|
| 342 |
+
- The parser optionally reports usage of undefined tags
|
| 343 |
+
- The parser optionally reports usage of unsupported tags
|
| 344 |
+
- The parser reports usage of inline/block syntax that is inconsistent with the tag definition
|
| 345 |
+
- Code spans are now allowed to be adjacent to other text, but must contain at least one character
|
| 346 |
+
- An `@deprecated` block must contain a deprecation message
|
| 347 |
+
- If `@inheritDoc` is used, then the summary section must be empty, and there must not be an `@remarks` block
|
| 348 |
+
|
| 349 |
+
## 0.7.0
|
| 350 |
+
Tue, 02 Oct 2018 02:35:35 GMT
|
| 351 |
+
|
| 352 |
+
### Minor changes
|
| 353 |
+
|
| 354 |
+
- Add support for `@defaultValue` tag
|
| 355 |
+
- Add support for `@typeParam` tag
|
| 356 |
+
|
| 357 |
+
## 0.6.0
|
| 358 |
+
Mon, 01 Oct 2018 22:11:24 GMT
|
| 359 |
+
|
| 360 |
+
### Minor changes
|
| 361 |
+
|
| 362 |
+
- Add support for `@link` tags using the new declaration reference syntax
|
| 363 |
+
- Add support for `@inheritDoc` tags
|
| 364 |
+
- Add new APIs: `DocDeclarationReference`, `DocInheritDocTag`, `DocLinkTag`, `DocMemberIdentifier`, `DocMemberReference`, `DocMemberSelector`, `DocMemberSymbol`
|
| 365 |
+
- Remove `ParserContext.verbatimNodes`
|
| 366 |
+
- Add `DocParticle.particleId` property
|
| 367 |
+
|
| 368 |
+
## 0.5.0
|
| 369 |
+
Tue, 25 Sep 2018 03:04:06 GMT
|
| 370 |
+
|
| 371 |
+
### Minor changes
|
| 372 |
+
|
| 373 |
+
- 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
|
| 374 |
+
- Add `DocNodeTransforms.trimSpacesInParagraphNodes()` for collapsing whitespace inside `DocParagraph` subtrees
|
| 375 |
+
- Extract the `DocNode.excerpt` property into a new abstract base class `DocNodeLeaf`
|
| 376 |
+
|
| 377 |
+
## 0.4.1
|
| 378 |
+
Fri, 31 Aug 2018 03:32:18 GMT
|
| 379 |
+
|
| 380 |
+
### Patches
|
| 381 |
+
|
| 382 |
+
- Improve the error location reporting for DocErrorText objects
|
| 383 |
+
- 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
|
| 384 |
+
|
| 385 |
+
## 0.4.0
|
| 386 |
+
Tue, 28 Aug 2018 03:17:20 GMT
|
| 387 |
+
|
| 388 |
+
### Minor changes
|
| 389 |
+
|
| 390 |
+
- Rename `DocCodeSpan.text` to `DocCodeSpan.code` and model the delimiters using particles
|
| 391 |
+
- Add support for code fences (`DocCodeFence`)
|
| 392 |
+
- `DocSection` content is now grouped into `DocParagraph` nodes; blank lines are used to indicate paragraph boundaries
|
| 393 |
+
- Rename `DocComment.deprecated` to `deprecatedBlock`
|
| 394 |
+
|
| 395 |
+
## 0.3.0
|
| 396 |
+
Sat, 25 Aug 2018 05:53:56 GMT
|
| 397 |
+
|
| 398 |
+
### Minor changes
|
| 399 |
+
|
| 400 |
+
- Add TextRange.isEmpty()
|
| 401 |
+
- Improve the ModifierTagSet API
|
| 402 |
+
- Implement the @privateRemarks and @deprecated tags
|
| 403 |
+
|
| 404 |
+
## 0.2.0
|
| 405 |
+
Fri, 24 Aug 2018 01:19:56 GMT
|
| 406 |
+
|
| 407 |
+
### Minor changes
|
| 408 |
+
|
| 409 |
+
- Rename `CoreTags` to `StandardTags` so we can include non-core tags in the standard definitions
|
| 410 |
+
- Rename `CoreModifierTagSet` to `StandardModifierTagSet` and convert properties to functions
|
| 411 |
+
- Categorize the standard tags according to a `Standardization` enum, and document them
|
| 412 |
+
- Add more standard tag definitions: `@deprecated`, `@eventProperty`, `@example`, `@inheritDoc`, `@link`, `@override`, `@packageDocumentation`, `@public`, `@privateRemarks`, `@sealed`, `@virtual`
|
| 413 |
+
- Replace TSDocTagDefinition.singleton with TSDocTagDefinition.allowMultiple, since in practice most tags are single-usage
|
| 414 |
+
|
| 415 |
+
## 0.1.0
|
| 416 |
+
Thu, 16 Aug 2018 18:18:02 GMT
|
| 417 |
+
|
| 418 |
+
### Minor changes
|
| 419 |
+
|
| 420 |
+
- Initial release of the TSDoc library! :-)
|
| 421 |
+
|
node_modules/@microsoft/tsdoc/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
| 2 |
+
|
| 3 |
+
MIT License
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 6 |
+
a copy of this software and associated documentation files (the
|
| 7 |
+
"Software"), to deal in the Software without restriction, including
|
| 8 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 9 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 10 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 11 |
+
the following conditions:
|
| 12 |
+
|
| 13 |
+
The above copyright notice and this permission notice shall be
|
| 14 |
+
included in all copies or substantial portions of the Software.
|
| 15 |
+
|
| 16 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 17 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 18 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 19 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
| 20 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 21 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
| 22 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
node_modules/@microsoft/tsdoc/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# @microsoft/tsdoc
|
| 2 |
+
|
| 3 |
+
<div>
|
| 4 |
+
<br />
|
| 5 |
+
<a href="https://tsdoc.org/">
|
| 6 |
+
<img width="200" src="https://tsdoc.org/images/site/tsdoc.svg">
|
| 7 |
+
</a>
|
| 8 |
+
<p />
|
| 9 |
+
</div>
|
| 10 |
+
|
| 11 |
+
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.
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
## What is TSDoc?
|
| 15 |
+
|
| 16 |
+
**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:
|
| 17 |
+
|
| 18 |
+
```typescript
|
| 19 |
+
export class Statistics {
|
| 20 |
+
/**
|
| 21 |
+
* Returns the average of two numbers.
|
| 22 |
+
*
|
| 23 |
+
* @remarks
|
| 24 |
+
* This method is part of the {@link core-library#Statistics | Statistics subsystem}.
|
| 25 |
+
*
|
| 26 |
+
* @param x - The first input number
|
| 27 |
+
* @param y - The second input number
|
| 28 |
+
* @returns The arithmetic mean of `x` and `y`
|
| 29 |
+
*
|
| 30 |
+
* @beta
|
| 31 |
+
*/
|
| 32 |
+
public static getAverage(x: number, y: number): number {
|
| 33 |
+
return (x + y) / 2.0;
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Give it a try!
|
| 39 |
+
|
| 40 |
+
Check out the [TSDoc Playground](https://tsdoc.org/play) for a cool live demo of our parser!
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
## API Usage
|
| 44 |
+
|
| 45 |
+
The [api-demo](https://github.com/microsoft/tsdoc/tree/main/api-demo) folder on GitHub illustrates how
|
| 46 |
+
to invoke the TSDoc parser.
|
| 47 |
+
|
| 48 |
+
A separate NPM package [`@microsoft/tsdoc-config`](https://www.npmjs.com/package/@microsoft/tsdoc-config)
|
| 49 |
+
is used for loading the **tsdoc.json** file.
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Get involved
|
| 53 |
+
|
| 54 |
+
The **TSDoc** project is actively evolving. Please visit the website for the latest documentation, instructions for building/debugging the projects, and other resources:
|
| 55 |
+
|
| 56 |
+
https://tsdoc.org/
|
node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts
ADDED
|
@@ -0,0 +1,200 @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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Represents a reference to a declaration.
|
| 3 |
+
* @beta
|
| 4 |
+
*/
|
| 5 |
+
export declare class DeclarationReference {
|
| 6 |
+
private _source;
|
| 7 |
+
private _navigation;
|
| 8 |
+
private _symbol;
|
| 9 |
+
constructor(source?: ModuleSource | GlobalSource, navigation?: Navigation.Locals | Navigation.Exports, symbol?: SymbolReference);
|
| 10 |
+
get source(): ModuleSource | GlobalSource | undefined;
|
| 11 |
+
get navigation(): Navigation.Locals | Navigation.Exports | undefined;
|
| 12 |
+
get symbol(): SymbolReference | undefined;
|
| 13 |
+
get isEmpty(): boolean;
|
| 14 |
+
static parse(text: string): DeclarationReference;
|
| 15 |
+
static parseComponent(text: string): Component;
|
| 16 |
+
/**
|
| 17 |
+
* Determines whether the provided string is a well-formed symbol navigation component string.
|
| 18 |
+
*/
|
| 19 |
+
static isWellFormedComponentString(text: string): boolean;
|
| 20 |
+
/**
|
| 21 |
+
* Escapes a string for use as a symbol navigation component. If the string contains any of `!.#~:,"{}()@` or starts
|
| 22 |
+
* with `[`, it is enclosed in quotes.
|
| 23 |
+
*/
|
| 24 |
+
static escapeComponentString(text: string): string;
|
| 25 |
+
/**
|
| 26 |
+
* Unescapes a string used as a symbol navigation component.
|
| 27 |
+
*/
|
| 28 |
+
static unescapeComponentString(text: string): string;
|
| 29 |
+
/**
|
| 30 |
+
* Determines whether the provided string is a well-formed module source string. The string may not
|
| 31 |
+
* have a trailing `!` character.
|
| 32 |
+
*/
|
| 33 |
+
static isWellFormedModuleSourceString(text: string): boolean;
|
| 34 |
+
/**
|
| 35 |
+
* Escapes a string for use as a module source. If the string contains any of `!"` it is enclosed in quotes.
|
| 36 |
+
*/
|
| 37 |
+
static escapeModuleSourceString(text: string): string;
|
| 38 |
+
/**
|
| 39 |
+
* Unescapes a string used as a module source. The string may not have a trailing `!` character.
|
| 40 |
+
*/
|
| 41 |
+
static unescapeModuleSourceString(text: string): string;
|
| 42 |
+
static empty(): DeclarationReference;
|
| 43 |
+
static package(packageName: string, importPath?: string): DeclarationReference;
|
| 44 |
+
static module(path: string, userEscaped?: boolean): DeclarationReference;
|
| 45 |
+
static global(): DeclarationReference;
|
| 46 |
+
static from(base: DeclarationReference | undefined): DeclarationReference;
|
| 47 |
+
withSource(source: ModuleSource | GlobalSource | undefined): DeclarationReference;
|
| 48 |
+
withNavigation(navigation: Navigation.Locals | Navigation.Exports | undefined): DeclarationReference;
|
| 49 |
+
withSymbol(symbol: SymbolReference | undefined): DeclarationReference;
|
| 50 |
+
withComponentPath(componentPath: ComponentPath): DeclarationReference;
|
| 51 |
+
withMeaning(meaning: Meaning | undefined): DeclarationReference;
|
| 52 |
+
withOverloadIndex(overloadIndex: number | undefined): DeclarationReference;
|
| 53 |
+
addNavigationStep(navigation: Navigation, component: ComponentLike): DeclarationReference;
|
| 54 |
+
toString(): string;
|
| 55 |
+
}
|
| 56 |
+
/**
|
| 57 |
+
* Indicates the symbol table from which to resolve the next symbol component.
|
| 58 |
+
* @beta
|
| 59 |
+
*/
|
| 60 |
+
export declare enum Navigation {
|
| 61 |
+
Exports = ".",
|
| 62 |
+
Members = "#",
|
| 63 |
+
Locals = "~"
|
| 64 |
+
}
|
| 65 |
+
/**
|
| 66 |
+
* Represents a module.
|
| 67 |
+
* @beta
|
| 68 |
+
*/
|
| 69 |
+
export declare class ModuleSource {
|
| 70 |
+
readonly escapedPath: string;
|
| 71 |
+
private _path;
|
| 72 |
+
private _pathComponents;
|
| 73 |
+
constructor(path: string, userEscaped?: boolean);
|
| 74 |
+
get path(): string;
|
| 75 |
+
get packageName(): string;
|
| 76 |
+
get scopeName(): string;
|
| 77 |
+
get unscopedPackageName(): string;
|
| 78 |
+
get importPath(): string;
|
| 79 |
+
static fromScopedPackage(scopeName: string | undefined, unscopedPackageName: string, importPath?: string): ModuleSource;
|
| 80 |
+
static fromPackage(packageName: string, importPath?: string): ModuleSource;
|
| 81 |
+
private static _fromPackageName;
|
| 82 |
+
toString(): string;
|
| 83 |
+
private _getOrParsePathComponents;
|
| 84 |
+
}
|
| 85 |
+
/**
|
| 86 |
+
* Represents the global scope.
|
| 87 |
+
* @beta
|
| 88 |
+
*/
|
| 89 |
+
export declare class GlobalSource {
|
| 90 |
+
static readonly instance: GlobalSource;
|
| 91 |
+
private constructor();
|
| 92 |
+
toString(): string;
|
| 93 |
+
}
|
| 94 |
+
/**
|
| 95 |
+
* @beta
|
| 96 |
+
*/
|
| 97 |
+
export type Component = ComponentString | ComponentReference;
|
| 98 |
+
/**
|
| 99 |
+
* @beta
|
| 100 |
+
*/
|
| 101 |
+
export declare namespace Component {
|
| 102 |
+
function from(value: ComponentLike): Component;
|
| 103 |
+
}
|
| 104 |
+
/**
|
| 105 |
+
* @beta
|
| 106 |
+
*/
|
| 107 |
+
export type ComponentLike = Component | DeclarationReference | string;
|
| 108 |
+
/**
|
| 109 |
+
* @beta
|
| 110 |
+
*/
|
| 111 |
+
export declare class ComponentString {
|
| 112 |
+
readonly text: string;
|
| 113 |
+
constructor(text: string, userEscaped?: boolean);
|
| 114 |
+
toString(): string;
|
| 115 |
+
}
|
| 116 |
+
/**
|
| 117 |
+
* @beta
|
| 118 |
+
*/
|
| 119 |
+
export declare class ComponentReference {
|
| 120 |
+
readonly reference: DeclarationReference;
|
| 121 |
+
constructor(reference: DeclarationReference);
|
| 122 |
+
static parse(text: string): ComponentReference;
|
| 123 |
+
withReference(reference: DeclarationReference): ComponentReference;
|
| 124 |
+
toString(): string;
|
| 125 |
+
}
|
| 126 |
+
/**
|
| 127 |
+
* @beta
|
| 128 |
+
*/
|
| 129 |
+
export type ComponentPath = ComponentRoot | ComponentNavigation;
|
| 130 |
+
/**
|
| 131 |
+
* @beta
|
| 132 |
+
*/
|
| 133 |
+
export declare abstract class ComponentPathBase {
|
| 134 |
+
readonly component: Component;
|
| 135 |
+
constructor(component: Component);
|
| 136 |
+
addNavigationStep(this: ComponentPath, navigation: Navigation, component: ComponentLike): ComponentPath;
|
| 137 |
+
abstract toString(): string;
|
| 138 |
+
}
|
| 139 |
+
/**
|
| 140 |
+
* @beta
|
| 141 |
+
*/
|
| 142 |
+
export declare class ComponentRoot extends ComponentPathBase {
|
| 143 |
+
withComponent(component: ComponentLike): ComponentRoot;
|
| 144 |
+
toString(): string;
|
| 145 |
+
}
|
| 146 |
+
/**
|
| 147 |
+
* @beta
|
| 148 |
+
*/
|
| 149 |
+
export declare class ComponentNavigation extends ComponentPathBase {
|
| 150 |
+
readonly parent: ComponentPath;
|
| 151 |
+
readonly navigation: Navigation;
|
| 152 |
+
constructor(parent: ComponentPath, navigation: Navigation, component: Component);
|
| 153 |
+
withParent(parent: ComponentPath): ComponentNavigation;
|
| 154 |
+
withNavigation(navigation: Navigation): ComponentNavigation;
|
| 155 |
+
withComponent(component: ComponentLike): ComponentNavigation;
|
| 156 |
+
toString(): string;
|
| 157 |
+
}
|
| 158 |
+
/**
|
| 159 |
+
* @beta
|
| 160 |
+
*/
|
| 161 |
+
export declare enum Meaning {
|
| 162 |
+
Class = "class",// SymbolFlags.Class
|
| 163 |
+
Interface = "interface",// SymbolFlags.Interface
|
| 164 |
+
TypeAlias = "type",// SymbolFlags.TypeAlias
|
| 165 |
+
Enum = "enum",// SymbolFlags.Enum
|
| 166 |
+
Namespace = "namespace",// SymbolFlags.Module
|
| 167 |
+
Function = "function",// SymbolFlags.Function
|
| 168 |
+
Variable = "var",// SymbolFlags.Variable
|
| 169 |
+
Constructor = "constructor",// SymbolFlags.Constructor
|
| 170 |
+
Member = "member",// SymbolFlags.ClassMember | SymbolFlags.EnumMember
|
| 171 |
+
Event = "event",//
|
| 172 |
+
CallSignature = "call",// SymbolFlags.Signature (for __call)
|
| 173 |
+
ConstructSignature = "new",// SymbolFlags.Signature (for __new)
|
| 174 |
+
IndexSignature = "index",// SymbolFlags.Signature (for __index)
|
| 175 |
+
ComplexType = "complex"
|
| 176 |
+
}
|
| 177 |
+
/**
|
| 178 |
+
* @beta
|
| 179 |
+
*/
|
| 180 |
+
export interface ISymbolReferenceOptions {
|
| 181 |
+
meaning?: Meaning;
|
| 182 |
+
overloadIndex?: number;
|
| 183 |
+
}
|
| 184 |
+
/**
|
| 185 |
+
* Represents a reference to a TypeScript symbol.
|
| 186 |
+
* @beta
|
| 187 |
+
*/
|
| 188 |
+
export declare class SymbolReference {
|
| 189 |
+
readonly componentPath: ComponentPath | undefined;
|
| 190 |
+
readonly meaning: Meaning | undefined;
|
| 191 |
+
readonly overloadIndex: number | undefined;
|
| 192 |
+
constructor(component: ComponentPath | undefined, { meaning, overloadIndex }?: ISymbolReferenceOptions);
|
| 193 |
+
static empty(): SymbolReference;
|
| 194 |
+
withComponentPath(componentPath: ComponentPath | undefined): SymbolReference;
|
| 195 |
+
withMeaning(meaning: Meaning | undefined): SymbolReference;
|
| 196 |
+
withOverloadIndex(overloadIndex: number | undefined): SymbolReference;
|
| 197 |
+
addNavigationStep(navigation: Navigation, component: ComponentLike): SymbolReference;
|
| 198 |
+
toString(): string;
|
| 199 |
+
}
|
| 200 |
+
//# sourceMappingURL=DeclarationReference.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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,EACp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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
/* eslint-disable @typescript-eslint/no-use-before-define */
|
| 4 |
+
/* eslint-disable @typescript-eslint/naming-convention */
|
| 5 |
+
// NOTE: See DeclarationReference.grammarkdown for information on the underlying grammar.
|
| 6 |
+
import { StringChecks } from '../parser/StringChecks';
|
| 7 |
+
/**
|
| 8 |
+
* Represents a reference to a declaration.
|
| 9 |
+
* @beta
|
| 10 |
+
*/
|
| 11 |
+
export class DeclarationReference {
|
| 12 |
+
constructor(source, navigation, symbol) {
|
| 13 |
+
this._source = source;
|
| 14 |
+
this._navigation = navigation;
|
| 15 |
+
this._symbol = symbol;
|
| 16 |
+
}
|
| 17 |
+
get source() {
|
| 18 |
+
return this._source;
|
| 19 |
+
}
|
| 20 |
+
get navigation() {
|
| 21 |
+
if (!this._source || !this._symbol) {
|
| 22 |
+
return undefined;
|
| 23 |
+
}
|
| 24 |
+
if (this._source === GlobalSource.instance) {
|
| 25 |
+
return Navigation.Locals;
|
| 26 |
+
}
|
| 27 |
+
if (this._navigation === undefined) {
|
| 28 |
+
return Navigation.Exports;
|
| 29 |
+
}
|
| 30 |
+
return this._navigation;
|
| 31 |
+
}
|
| 32 |
+
get symbol() {
|
| 33 |
+
return this._symbol;
|
| 34 |
+
}
|
| 35 |
+
get isEmpty() {
|
| 36 |
+
return this.source === undefined && this.symbol === undefined;
|
| 37 |
+
}
|
| 38 |
+
static parse(text) {
|
| 39 |
+
const parser = new Parser(text);
|
| 40 |
+
const reference = parser.parseDeclarationReference();
|
| 41 |
+
if (parser.errors.length) {
|
| 42 |
+
throw new SyntaxError(`Invalid DeclarationReference '${text}':\n ${parser.errors.join('\n ')}`);
|
| 43 |
+
}
|
| 44 |
+
if (!parser.eof) {
|
| 45 |
+
throw new SyntaxError(`Invalid DeclarationReference '${text}'`);
|
| 46 |
+
}
|
| 47 |
+
return reference;
|
| 48 |
+
}
|
| 49 |
+
static parseComponent(text) {
|
| 50 |
+
if (text[0] === '[') {
|
| 51 |
+
return ComponentReference.parse(text);
|
| 52 |
+
}
|
| 53 |
+
else {
|
| 54 |
+
return new ComponentString(text, true);
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
/**
|
| 58 |
+
* Determines whether the provided string is a well-formed symbol navigation component string.
|
| 59 |
+
*/
|
| 60 |
+
static isWellFormedComponentString(text) {
|
| 61 |
+
const scanner = new Scanner(text);
|
| 62 |
+
return scanner.scan() === Token.String
|
| 63 |
+
? scanner.scan() === Token.EofToken
|
| 64 |
+
: scanner.token() === Token.Text
|
| 65 |
+
? scanner.scan() === Token.EofToken
|
| 66 |
+
: scanner.token() === Token.EofToken;
|
| 67 |
+
}
|
| 68 |
+
/**
|
| 69 |
+
* Escapes a string for use as a symbol navigation component. If the string contains any of `!.#~:,"{}()@` or starts
|
| 70 |
+
* with `[`, it is enclosed in quotes.
|
| 71 |
+
*/
|
| 72 |
+
static escapeComponentString(text) {
|
| 73 |
+
if (text.length === 0) {
|
| 74 |
+
return '""';
|
| 75 |
+
}
|
| 76 |
+
const ch = text.charAt(0);
|
| 77 |
+
if (ch === '[' || ch === '"' || !this.isWellFormedComponentString(text)) {
|
| 78 |
+
return JSON.stringify(text);
|
| 79 |
+
}
|
| 80 |
+
return text;
|
| 81 |
+
}
|
| 82 |
+
/**
|
| 83 |
+
* Unescapes a string used as a symbol navigation component.
|
| 84 |
+
*/
|
| 85 |
+
static unescapeComponentString(text) {
|
| 86 |
+
if (text.length >= 2 && text.charAt(0) === '"' && text.charAt(text.length - 1) === '"') {
|
| 87 |
+
try {
|
| 88 |
+
return JSON.parse(text);
|
| 89 |
+
}
|
| 90 |
+
catch (_a) {
|
| 91 |
+
throw new SyntaxError(`Invalid Component '${text}'`);
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
if (!this.isWellFormedComponentString(text)) {
|
| 95 |
+
throw new SyntaxError(`Invalid Component '${text}'`);
|
| 96 |
+
}
|
| 97 |
+
return text;
|
| 98 |
+
}
|
| 99 |
+
/**
|
| 100 |
+
* Determines whether the provided string is a well-formed module source string. The string may not
|
| 101 |
+
* have a trailing `!` character.
|
| 102 |
+
*/
|
| 103 |
+
static isWellFormedModuleSourceString(text) {
|
| 104 |
+
const scanner = new Scanner(text + '!');
|
| 105 |
+
return (scanner.rescanModuleSource() === Token.ModuleSource &&
|
| 106 |
+
!scanner.stringIsUnterminated &&
|
| 107 |
+
scanner.scan() === Token.ExclamationToken &&
|
| 108 |
+
scanner.scan() === Token.EofToken);
|
| 109 |
+
}
|
| 110 |
+
/**
|
| 111 |
+
* Escapes a string for use as a module source. If the string contains any of `!"` it is enclosed in quotes.
|
| 112 |
+
*/
|
| 113 |
+
static escapeModuleSourceString(text) {
|
| 114 |
+
if (text.length === 0) {
|
| 115 |
+
return '""';
|
| 116 |
+
}
|
| 117 |
+
const ch = text.charAt(0);
|
| 118 |
+
if (ch === '"' || !this.isWellFormedModuleSourceString(text)) {
|
| 119 |
+
return JSON.stringify(text);
|
| 120 |
+
}
|
| 121 |
+
return text;
|
| 122 |
+
}
|
| 123 |
+
/**
|
| 124 |
+
* Unescapes a string used as a module source. The string may not have a trailing `!` character.
|
| 125 |
+
*/
|
| 126 |
+
static unescapeModuleSourceString(text) {
|
| 127 |
+
if (text.length >= 2 && text.charAt(0) === '"' && text.charAt(text.length - 1) === '"') {
|
| 128 |
+
try {
|
| 129 |
+
return JSON.parse(text);
|
| 130 |
+
}
|
| 131 |
+
catch (_a) {
|
| 132 |
+
throw new SyntaxError(`Invalid Module source '${text}'`);
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
if (!this.isWellFormedModuleSourceString(text)) {
|
| 136 |
+
throw new SyntaxError(`Invalid Module source '${text}'`);
|
| 137 |
+
}
|
| 138 |
+
return text;
|
| 139 |
+
}
|
| 140 |
+
static empty() {
|
| 141 |
+
return new DeclarationReference();
|
| 142 |
+
}
|
| 143 |
+
static package(packageName, importPath) {
|
| 144 |
+
return new DeclarationReference(ModuleSource.fromPackage(packageName, importPath));
|
| 145 |
+
}
|
| 146 |
+
static module(path, userEscaped) {
|
| 147 |
+
return new DeclarationReference(new ModuleSource(path, userEscaped));
|
| 148 |
+
}
|
| 149 |
+
static global() {
|
| 150 |
+
return new DeclarationReference(GlobalSource.instance);
|
| 151 |
+
}
|
| 152 |
+
static from(base) {
|
| 153 |
+
return base || this.empty();
|
| 154 |
+
}
|
| 155 |
+
withSource(source) {
|
| 156 |
+
return this._source === source ? this : new DeclarationReference(source, this._navigation, this._symbol);
|
| 157 |
+
}
|
| 158 |
+
withNavigation(navigation) {
|
| 159 |
+
return this._navigation === navigation
|
| 160 |
+
? this
|
| 161 |
+
: new DeclarationReference(this._source, navigation, this._symbol);
|
| 162 |
+
}
|
| 163 |
+
withSymbol(symbol) {
|
| 164 |
+
return this._symbol === symbol ? this : new DeclarationReference(this._source, this._navigation, symbol);
|
| 165 |
+
}
|
| 166 |
+
withComponentPath(componentPath) {
|
| 167 |
+
return this.withSymbol(this.symbol ? this.symbol.withComponentPath(componentPath) : new SymbolReference(componentPath));
|
| 168 |
+
}
|
| 169 |
+
withMeaning(meaning) {
|
| 170 |
+
if (!this.symbol) {
|
| 171 |
+
if (meaning === undefined) {
|
| 172 |
+
return this;
|
| 173 |
+
}
|
| 174 |
+
return this.withSymbol(SymbolReference.empty().withMeaning(meaning));
|
| 175 |
+
}
|
| 176 |
+
return this.withSymbol(this.symbol.withMeaning(meaning));
|
| 177 |
+
}
|
| 178 |
+
withOverloadIndex(overloadIndex) {
|
| 179 |
+
if (!this.symbol) {
|
| 180 |
+
if (overloadIndex === undefined) {
|
| 181 |
+
return this;
|
| 182 |
+
}
|
| 183 |
+
return this.withSymbol(SymbolReference.empty().withOverloadIndex(overloadIndex));
|
| 184 |
+
}
|
| 185 |
+
return this.withSymbol(this.symbol.withOverloadIndex(overloadIndex));
|
| 186 |
+
}
|
| 187 |
+
addNavigationStep(navigation, component) {
|
| 188 |
+
if (this.symbol) {
|
| 189 |
+
return this.withSymbol(this.symbol.addNavigationStep(navigation, component));
|
| 190 |
+
}
|
| 191 |
+
if (navigation === Navigation.Members) {
|
| 192 |
+
navigation = Navigation.Exports;
|
| 193 |
+
}
|
| 194 |
+
const symbol = new SymbolReference(new ComponentRoot(Component.from(component)));
|
| 195 |
+
return new DeclarationReference(this.source, navigation, symbol);
|
| 196 |
+
}
|
| 197 |
+
toString() {
|
| 198 |
+
const navigation = this._source instanceof ModuleSource && this._symbol && this.navigation === Navigation.Locals
|
| 199 |
+
? '~'
|
| 200 |
+
: '';
|
| 201 |
+
return `${this.source || ''}${navigation}${this.symbol || ''}`;
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
/**
|
| 205 |
+
* Indicates the symbol table from which to resolve the next symbol component.
|
| 206 |
+
* @beta
|
| 207 |
+
*/
|
| 208 |
+
export var Navigation;
|
| 209 |
+
(function (Navigation) {
|
| 210 |
+
Navigation["Exports"] = ".";
|
| 211 |
+
Navigation["Members"] = "#";
|
| 212 |
+
Navigation["Locals"] = "~";
|
| 213 |
+
})(Navigation || (Navigation = {}));
|
| 214 |
+
/**
|
| 215 |
+
* Represents a module.
|
| 216 |
+
* @beta
|
| 217 |
+
*/
|
| 218 |
+
export class ModuleSource {
|
| 219 |
+
constructor(path, userEscaped = true) {
|
| 220 |
+
this.escapedPath =
|
| 221 |
+
this instanceof ParsedModuleSource ? path : escapeModuleSourceIfNeeded(path, userEscaped);
|
| 222 |
+
}
|
| 223 |
+
get path() {
|
| 224 |
+
return this._path || (this._path = DeclarationReference.unescapeModuleSourceString(this.escapedPath));
|
| 225 |
+
}
|
| 226 |
+
get packageName() {
|
| 227 |
+
return this._getOrParsePathComponents().packageName;
|
| 228 |
+
}
|
| 229 |
+
get scopeName() {
|
| 230 |
+
const scopeName = this._getOrParsePathComponents().scopeName;
|
| 231 |
+
return scopeName ? '@' + scopeName : '';
|
| 232 |
+
}
|
| 233 |
+
get unscopedPackageName() {
|
| 234 |
+
return this._getOrParsePathComponents().unscopedPackageName;
|
| 235 |
+
}
|
| 236 |
+
get importPath() {
|
| 237 |
+
return this._getOrParsePathComponents().importPath || '';
|
| 238 |
+
}
|
| 239 |
+
static fromScopedPackage(scopeName, unscopedPackageName, importPath) {
|
| 240 |
+
let packageName = unscopedPackageName;
|
| 241 |
+
if (scopeName) {
|
| 242 |
+
if (scopeName.charAt(0) === '@') {
|
| 243 |
+
scopeName = scopeName.slice(1);
|
| 244 |
+
}
|
| 245 |
+
packageName = `@${scopeName}/${unscopedPackageName}`;
|
| 246 |
+
}
|
| 247 |
+
const parsed = { packageName, scopeName: scopeName || '', unscopedPackageName };
|
| 248 |
+
return this._fromPackageName(parsed, packageName, importPath);
|
| 249 |
+
}
|
| 250 |
+
static fromPackage(packageName, importPath) {
|
| 251 |
+
return this._fromPackageName(parsePackageName(packageName), packageName, importPath);
|
| 252 |
+
}
|
| 253 |
+
static _fromPackageName(parsed, packageName, importPath) {
|
| 254 |
+
if (!parsed) {
|
| 255 |
+
throw new Error('Parsed package must be provided.');
|
| 256 |
+
}
|
| 257 |
+
const packageNameError = StringChecks.explainIfInvalidPackageName(packageName);
|
| 258 |
+
if (packageNameError) {
|
| 259 |
+
throw new SyntaxError(`Invalid NPM package name: ${packageNameError}`);
|
| 260 |
+
}
|
| 261 |
+
let path = packageName;
|
| 262 |
+
if (importPath) {
|
| 263 |
+
if (invalidImportPathRegExp.test(importPath)) {
|
| 264 |
+
throw new SyntaxError(`Invalid import path '${importPath}`);
|
| 265 |
+
}
|
| 266 |
+
path += '/' + importPath;
|
| 267 |
+
parsed.importPath = importPath;
|
| 268 |
+
}
|
| 269 |
+
const source = new ModuleSource(path);
|
| 270 |
+
source._pathComponents = parsed;
|
| 271 |
+
return source;
|
| 272 |
+
}
|
| 273 |
+
toString() {
|
| 274 |
+
return `${this.escapedPath}!`;
|
| 275 |
+
}
|
| 276 |
+
_getOrParsePathComponents() {
|
| 277 |
+
if (!this._pathComponents) {
|
| 278 |
+
const path = this.path;
|
| 279 |
+
const parsed = parsePackageName(path);
|
| 280 |
+
if (parsed && !StringChecks.explainIfInvalidPackageName(parsed.packageName)) {
|
| 281 |
+
this._pathComponents = parsed;
|
| 282 |
+
}
|
| 283 |
+
else {
|
| 284 |
+
this._pathComponents = {
|
| 285 |
+
packageName: '',
|
| 286 |
+
scopeName: '',
|
| 287 |
+
unscopedPackageName: '',
|
| 288 |
+
importPath: path
|
| 289 |
+
};
|
| 290 |
+
}
|
| 291 |
+
}
|
| 292 |
+
return this._pathComponents;
|
| 293 |
+
}
|
| 294 |
+
}
|
| 295 |
+
class ParsedModuleSource extends ModuleSource {
|
| 296 |
+
}
|
| 297 |
+
// matches the following:
|
| 298 |
+
// 'foo' -> ["foo", "foo", undefined, "foo", undefined]
|
| 299 |
+
// 'foo/bar' -> ["foo/bar", "foo", undefined, "foo", "bar"]
|
| 300 |
+
// '@scope/foo' -> ["@scope/foo", "@scope/foo", "scope", "foo", undefined]
|
| 301 |
+
// '@scope/foo/bar' -> ["@scope/foo/bar", "@scope/foo", "scope", "foo", "bar"]
|
| 302 |
+
// does not match:
|
| 303 |
+
// '/'
|
| 304 |
+
// '@/'
|
| 305 |
+
// '@scope/'
|
| 306 |
+
// capture groups:
|
| 307 |
+
// 1. The package name (including scope)
|
| 308 |
+
// 2. The scope name (excluding the leading '@')
|
| 309 |
+
// 3. The unscoped package name
|
| 310 |
+
// 4. The package-relative import path
|
| 311 |
+
const packageNameRegExp = /^((?:@([^/]+?)\/)?([^/]+?))(?:\/(.+))?$/;
|
| 312 |
+
// no leading './' or '.\'
|
| 313 |
+
// no leading '../' or '..\'
|
| 314 |
+
// no leading '/' or '\'
|
| 315 |
+
// not '.' or '..'
|
| 316 |
+
const invalidImportPathRegExp = /^(\.\.?([\\/]|$)|[\\/])/;
|
| 317 |
+
// eslint-disable-next-line @rushstack/no-new-null
|
| 318 |
+
function parsePackageName(text) {
|
| 319 |
+
const match = packageNameRegExp.exec(text);
|
| 320 |
+
if (!match) {
|
| 321 |
+
return match;
|
| 322 |
+
}
|
| 323 |
+
const [, packageName = '', scopeName = '', unscopedPackageName = '', importPath] = match;
|
| 324 |
+
return { packageName, scopeName, unscopedPackageName, importPath };
|
| 325 |
+
}
|
| 326 |
+
/**
|
| 327 |
+
* Represents the global scope.
|
| 328 |
+
* @beta
|
| 329 |
+
*/
|
| 330 |
+
export class GlobalSource {
|
| 331 |
+
constructor() { }
|
| 332 |
+
toString() {
|
| 333 |
+
return '!';
|
| 334 |
+
}
|
| 335 |
+
}
|
| 336 |
+
GlobalSource.instance = new GlobalSource();
|
| 337 |
+
/**
|
| 338 |
+
* @beta
|
| 339 |
+
*/
|
| 340 |
+
// eslint-disable-next-line @typescript-eslint/no-namespace,@typescript-eslint/no-redeclare
|
| 341 |
+
export var Component;
|
| 342 |
+
(function (Component) {
|
| 343 |
+
function from(value) {
|
| 344 |
+
if (typeof value === 'string') {
|
| 345 |
+
return new ComponentString(value);
|
| 346 |
+
}
|
| 347 |
+
if (value instanceof DeclarationReference) {
|
| 348 |
+
return new ComponentReference(value);
|
| 349 |
+
}
|
| 350 |
+
return value;
|
| 351 |
+
}
|
| 352 |
+
Component.from = from;
|
| 353 |
+
})(Component || (Component = {}));
|
| 354 |
+
/**
|
| 355 |
+
* @beta
|
| 356 |
+
*/
|
| 357 |
+
export class ComponentString {
|
| 358 |
+
constructor(text, userEscaped) {
|
| 359 |
+
this.text = this instanceof ParsedComponentString ? text : escapeComponentIfNeeded(text, userEscaped);
|
| 360 |
+
}
|
| 361 |
+
toString() {
|
| 362 |
+
return this.text;
|
| 363 |
+
}
|
| 364 |
+
}
|
| 365 |
+
class ParsedComponentString extends ComponentString {
|
| 366 |
+
}
|
| 367 |
+
/**
|
| 368 |
+
* @beta
|
| 369 |
+
*/
|
| 370 |
+
export class ComponentReference {
|
| 371 |
+
constructor(reference) {
|
| 372 |
+
this.reference = reference;
|
| 373 |
+
}
|
| 374 |
+
static parse(text) {
|
| 375 |
+
if (text.length > 2 && text.charAt(0) === '[' && text.charAt(text.length - 1) === ']') {
|
| 376 |
+
return new ComponentReference(DeclarationReference.parse(text.slice(1, -1)));
|
| 377 |
+
}
|
| 378 |
+
throw new SyntaxError(`Invalid component reference: '${text}'`);
|
| 379 |
+
}
|
| 380 |
+
withReference(reference) {
|
| 381 |
+
return this.reference === reference ? this : new ComponentReference(reference);
|
| 382 |
+
}
|
| 383 |
+
toString() {
|
| 384 |
+
return `[${this.reference}]`;
|
| 385 |
+
}
|
| 386 |
+
}
|
| 387 |
+
/**
|
| 388 |
+
* @beta
|
| 389 |
+
*/
|
| 390 |
+
export class ComponentPathBase {
|
| 391 |
+
constructor(component) {
|
| 392 |
+
this.component = component;
|
| 393 |
+
}
|
| 394 |
+
addNavigationStep(navigation, component) {
|
| 395 |
+
// tslint:disable-next-line:no-use-before-declare
|
| 396 |
+
return new ComponentNavigation(this, navigation, Component.from(component));
|
| 397 |
+
}
|
| 398 |
+
}
|
| 399 |
+
/**
|
| 400 |
+
* @beta
|
| 401 |
+
*/
|
| 402 |
+
export class ComponentRoot extends ComponentPathBase {
|
| 403 |
+
withComponent(component) {
|
| 404 |
+
return this.component === component ? this : new ComponentRoot(Component.from(component));
|
| 405 |
+
}
|
| 406 |
+
toString() {
|
| 407 |
+
return this.component.toString();
|
| 408 |
+
}
|
| 409 |
+
}
|
| 410 |
+
/**
|
| 411 |
+
* @beta
|
| 412 |
+
*/
|
| 413 |
+
export class ComponentNavigation extends ComponentPathBase {
|
| 414 |
+
constructor(parent, navigation, component) {
|
| 415 |
+
super(component);
|
| 416 |
+
this.parent = parent;
|
| 417 |
+
this.navigation = navigation;
|
| 418 |
+
}
|
| 419 |
+
withParent(parent) {
|
| 420 |
+
return this.parent === parent ? this : new ComponentNavigation(parent, this.navigation, this.component);
|
| 421 |
+
}
|
| 422 |
+
withNavigation(navigation) {
|
| 423 |
+
return this.navigation === navigation
|
| 424 |
+
? this
|
| 425 |
+
: new ComponentNavigation(this.parent, navigation, this.component);
|
| 426 |
+
}
|
| 427 |
+
withComponent(component) {
|
| 428 |
+
return this.component === component
|
| 429 |
+
? this
|
| 430 |
+
: new ComponentNavigation(this.parent, this.navigation, Component.from(component));
|
| 431 |
+
}
|
| 432 |
+
toString() {
|
| 433 |
+
return `${this.parent}${formatNavigation(this.navigation)}${this.component}`;
|
| 434 |
+
}
|
| 435 |
+
}
|
| 436 |
+
/**
|
| 437 |
+
* @beta
|
| 438 |
+
*/
|
| 439 |
+
export var Meaning;
|
| 440 |
+
(function (Meaning) {
|
| 441 |
+
Meaning["Class"] = "class";
|
| 442 |
+
Meaning["Interface"] = "interface";
|
| 443 |
+
Meaning["TypeAlias"] = "type";
|
| 444 |
+
Meaning["Enum"] = "enum";
|
| 445 |
+
Meaning["Namespace"] = "namespace";
|
| 446 |
+
Meaning["Function"] = "function";
|
| 447 |
+
Meaning["Variable"] = "var";
|
| 448 |
+
Meaning["Constructor"] = "constructor";
|
| 449 |
+
Meaning["Member"] = "member";
|
| 450 |
+
Meaning["Event"] = "event";
|
| 451 |
+
Meaning["CallSignature"] = "call";
|
| 452 |
+
Meaning["ConstructSignature"] = "new";
|
| 453 |
+
Meaning["IndexSignature"] = "index";
|
| 454 |
+
Meaning["ComplexType"] = "complex"; // Any complex type
|
| 455 |
+
})(Meaning || (Meaning = {}));
|
| 456 |
+
/**
|
| 457 |
+
* Represents a reference to a TypeScript symbol.
|
| 458 |
+
* @beta
|
| 459 |
+
*/
|
| 460 |
+
export class SymbolReference {
|
| 461 |
+
constructor(component, { meaning, overloadIndex } = {}) {
|
| 462 |
+
this.componentPath = component;
|
| 463 |
+
this.overloadIndex = overloadIndex;
|
| 464 |
+
this.meaning = meaning;
|
| 465 |
+
}
|
| 466 |
+
static empty() {
|
| 467 |
+
return new SymbolReference(/*component*/ undefined);
|
| 468 |
+
}
|
| 469 |
+
withComponentPath(componentPath) {
|
| 470 |
+
return this.componentPath === componentPath
|
| 471 |
+
? this
|
| 472 |
+
: new SymbolReference(componentPath, {
|
| 473 |
+
meaning: this.meaning,
|
| 474 |
+
overloadIndex: this.overloadIndex
|
| 475 |
+
});
|
| 476 |
+
}
|
| 477 |
+
withMeaning(meaning) {
|
| 478 |
+
return this.meaning === meaning
|
| 479 |
+
? this
|
| 480 |
+
: new SymbolReference(this.componentPath, {
|
| 481 |
+
meaning,
|
| 482 |
+
overloadIndex: this.overloadIndex
|
| 483 |
+
});
|
| 484 |
+
}
|
| 485 |
+
withOverloadIndex(overloadIndex) {
|
| 486 |
+
return this.overloadIndex === overloadIndex
|
| 487 |
+
? this
|
| 488 |
+
: new SymbolReference(this.componentPath, {
|
| 489 |
+
meaning: this.meaning,
|
| 490 |
+
overloadIndex
|
| 491 |
+
});
|
| 492 |
+
}
|
| 493 |
+
addNavigationStep(navigation, component) {
|
| 494 |
+
if (!this.componentPath) {
|
| 495 |
+
throw new Error('Cannot add a navigation step to an empty symbol reference.');
|
| 496 |
+
}
|
| 497 |
+
return new SymbolReference(this.componentPath.addNavigationStep(navigation, component));
|
| 498 |
+
}
|
| 499 |
+
toString() {
|
| 500 |
+
let result = `${this.componentPath || ''}`;
|
| 501 |
+
if (this.meaning && this.overloadIndex !== undefined) {
|
| 502 |
+
result += `:${this.meaning}(${this.overloadIndex})`;
|
| 503 |
+
}
|
| 504 |
+
else if (this.meaning) {
|
| 505 |
+
result += `:${this.meaning}`;
|
| 506 |
+
}
|
| 507 |
+
else if (this.overloadIndex !== undefined) {
|
| 508 |
+
result += `:${this.overloadIndex}`;
|
| 509 |
+
}
|
| 510 |
+
return result;
|
| 511 |
+
}
|
| 512 |
+
}
|
| 513 |
+
var Token;
|
| 514 |
+
(function (Token) {
|
| 515 |
+
Token[Token["None"] = 0] = "None";
|
| 516 |
+
Token[Token["EofToken"] = 1] = "EofToken";
|
| 517 |
+
// Punctuator
|
| 518 |
+
Token[Token["OpenBraceToken"] = 2] = "OpenBraceToken";
|
| 519 |
+
Token[Token["CloseBraceToken"] = 3] = "CloseBraceToken";
|
| 520 |
+
Token[Token["OpenParenToken"] = 4] = "OpenParenToken";
|
| 521 |
+
Token[Token["CloseParenToken"] = 5] = "CloseParenToken";
|
| 522 |
+
Token[Token["OpenBracketToken"] = 6] = "OpenBracketToken";
|
| 523 |
+
Token[Token["CloseBracketToken"] = 7] = "CloseBracketToken";
|
| 524 |
+
Token[Token["ExclamationToken"] = 8] = "ExclamationToken";
|
| 525 |
+
Token[Token["DotToken"] = 9] = "DotToken";
|
| 526 |
+
Token[Token["HashToken"] = 10] = "HashToken";
|
| 527 |
+
Token[Token["TildeToken"] = 11] = "TildeToken";
|
| 528 |
+
Token[Token["ColonToken"] = 12] = "ColonToken";
|
| 529 |
+
Token[Token["CommaToken"] = 13] = "CommaToken";
|
| 530 |
+
Token[Token["AtToken"] = 14] = "AtToken";
|
| 531 |
+
Token[Token["DecimalDigits"] = 15] = "DecimalDigits";
|
| 532 |
+
Token[Token["String"] = 16] = "String";
|
| 533 |
+
Token[Token["Text"] = 17] = "Text";
|
| 534 |
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
| 535 |
+
Token[Token["ModuleSource"] = 18] = "ModuleSource";
|
| 536 |
+
// Keywords
|
| 537 |
+
Token[Token["ClassKeyword"] = 19] = "ClassKeyword";
|
| 538 |
+
Token[Token["InterfaceKeyword"] = 20] = "InterfaceKeyword";
|
| 539 |
+
Token[Token["TypeKeyword"] = 21] = "TypeKeyword";
|
| 540 |
+
Token[Token["EnumKeyword"] = 22] = "EnumKeyword";
|
| 541 |
+
Token[Token["NamespaceKeyword"] = 23] = "NamespaceKeyword";
|
| 542 |
+
Token[Token["FunctionKeyword"] = 24] = "FunctionKeyword";
|
| 543 |
+
Token[Token["VarKeyword"] = 25] = "VarKeyword";
|
| 544 |
+
Token[Token["ConstructorKeyword"] = 26] = "ConstructorKeyword";
|
| 545 |
+
Token[Token["MemberKeyword"] = 27] = "MemberKeyword";
|
| 546 |
+
Token[Token["EventKeyword"] = 28] = "EventKeyword";
|
| 547 |
+
Token[Token["CallKeyword"] = 29] = "CallKeyword";
|
| 548 |
+
Token[Token["NewKeyword"] = 30] = "NewKeyword";
|
| 549 |
+
Token[Token["IndexKeyword"] = 31] = "IndexKeyword";
|
| 550 |
+
Token[Token["ComplexKeyword"] = 32] = "ComplexKeyword"; // 'complex'
|
| 551 |
+
})(Token || (Token = {}));
|
| 552 |
+
function tokenToString(token) {
|
| 553 |
+
switch (token) {
|
| 554 |
+
case Token.OpenBraceToken:
|
| 555 |
+
return '{';
|
| 556 |
+
case Token.CloseBraceToken:
|
| 557 |
+
return '}';
|
| 558 |
+
case Token.OpenParenToken:
|
| 559 |
+
return '(';
|
| 560 |
+
case Token.CloseParenToken:
|
| 561 |
+
return ')';
|
| 562 |
+
case Token.OpenBracketToken:
|
| 563 |
+
return '[';
|
| 564 |
+
case Token.CloseBracketToken:
|
| 565 |
+
return ']';
|
| 566 |
+
case Token.ExclamationToken:
|
| 567 |
+
return '!';
|
| 568 |
+
case Token.DotToken:
|
| 569 |
+
return '.';
|
| 570 |
+
case Token.HashToken:
|
| 571 |
+
return '#';
|
| 572 |
+
case Token.TildeToken:
|
| 573 |
+
return '~';
|
| 574 |
+
case Token.ColonToken:
|
| 575 |
+
return ':';
|
| 576 |
+
case Token.CommaToken:
|
| 577 |
+
return ',';
|
| 578 |
+
case Token.AtToken:
|
| 579 |
+
return '@';
|
| 580 |
+
case Token.ClassKeyword:
|
| 581 |
+
return 'class';
|
| 582 |
+
case Token.InterfaceKeyword:
|
| 583 |
+
return 'interface';
|
| 584 |
+
case Token.TypeKeyword:
|
| 585 |
+
return 'type';
|
| 586 |
+
case Token.EnumKeyword:
|
| 587 |
+
return 'enum';
|
| 588 |
+
case Token.NamespaceKeyword:
|
| 589 |
+
return 'namespace';
|
| 590 |
+
case Token.FunctionKeyword:
|
| 591 |
+
return 'function';
|
| 592 |
+
case Token.VarKeyword:
|
| 593 |
+
return 'var';
|
| 594 |
+
case Token.ConstructorKeyword:
|
| 595 |
+
return 'constructor';
|
| 596 |
+
case Token.MemberKeyword:
|
| 597 |
+
return 'member';
|
| 598 |
+
case Token.EventKeyword:
|
| 599 |
+
return 'event';
|
| 600 |
+
case Token.CallKeyword:
|
| 601 |
+
return 'call';
|
| 602 |
+
case Token.NewKeyword:
|
| 603 |
+
return 'new';
|
| 604 |
+
case Token.IndexKeyword:
|
| 605 |
+
return 'index';
|
| 606 |
+
case Token.ComplexKeyword:
|
| 607 |
+
return 'complex';
|
| 608 |
+
case Token.None:
|
| 609 |
+
return '<none>';
|
| 610 |
+
case Token.EofToken:
|
| 611 |
+
return '<eof>';
|
| 612 |
+
case Token.DecimalDigits:
|
| 613 |
+
return '<decimal digits>';
|
| 614 |
+
case Token.String:
|
| 615 |
+
return '<string>';
|
| 616 |
+
case Token.Text:
|
| 617 |
+
return '<text>';
|
| 618 |
+
case Token.ModuleSource:
|
| 619 |
+
return '<module source>';
|
| 620 |
+
}
|
| 621 |
+
}
|
| 622 |
+
class Scanner {
|
| 623 |
+
constructor(text) {
|
| 624 |
+
this._pos = 0;
|
| 625 |
+
this._tokenPos = 0;
|
| 626 |
+
this._stringIsUnterminated = false;
|
| 627 |
+
this._token = Token.None;
|
| 628 |
+
this._text = text;
|
| 629 |
+
}
|
| 630 |
+
get stringIsUnterminated() {
|
| 631 |
+
return this._stringIsUnterminated;
|
| 632 |
+
}
|
| 633 |
+
get text() {
|
| 634 |
+
return this._text;
|
| 635 |
+
}
|
| 636 |
+
get tokenText() {
|
| 637 |
+
return this._text.slice(this._tokenPos, this._pos);
|
| 638 |
+
}
|
| 639 |
+
get eof() {
|
| 640 |
+
return this._pos >= this._text.length;
|
| 641 |
+
}
|
| 642 |
+
token() {
|
| 643 |
+
return this._token;
|
| 644 |
+
}
|
| 645 |
+
speculate(cb) {
|
| 646 |
+
const tokenPos = this._tokenPos;
|
| 647 |
+
const pos = this._pos;
|
| 648 |
+
const text = this._text;
|
| 649 |
+
const token = this._token;
|
| 650 |
+
const stringIsUnterminated = this._stringIsUnterminated;
|
| 651 |
+
let accepted = false;
|
| 652 |
+
try {
|
| 653 |
+
const accept = () => {
|
| 654 |
+
accepted = true;
|
| 655 |
+
};
|
| 656 |
+
return cb(accept);
|
| 657 |
+
}
|
| 658 |
+
finally {
|
| 659 |
+
if (!accepted) {
|
| 660 |
+
this._tokenPos = tokenPos;
|
| 661 |
+
this._pos = pos;
|
| 662 |
+
this._text = text;
|
| 663 |
+
this._token = token;
|
| 664 |
+
this._stringIsUnterminated = stringIsUnterminated;
|
| 665 |
+
}
|
| 666 |
+
}
|
| 667 |
+
}
|
| 668 |
+
scan() {
|
| 669 |
+
if (!this.eof) {
|
| 670 |
+
this._tokenPos = this._pos;
|
| 671 |
+
this._stringIsUnterminated = false;
|
| 672 |
+
while (!this.eof) {
|
| 673 |
+
const ch = this._text.charAt(this._pos++);
|
| 674 |
+
switch (ch) {
|
| 675 |
+
case '{':
|
| 676 |
+
return (this._token = Token.OpenBraceToken);
|
| 677 |
+
case '}':
|
| 678 |
+
return (this._token = Token.CloseBraceToken);
|
| 679 |
+
case '(':
|
| 680 |
+
return (this._token = Token.OpenParenToken);
|
| 681 |
+
case ')':
|
| 682 |
+
return (this._token = Token.CloseParenToken);
|
| 683 |
+
case '[':
|
| 684 |
+
return (this._token = Token.OpenBracketToken);
|
| 685 |
+
case ']':
|
| 686 |
+
return (this._token = Token.CloseBracketToken);
|
| 687 |
+
case '!':
|
| 688 |
+
return (this._token = Token.ExclamationToken);
|
| 689 |
+
case '.':
|
| 690 |
+
return (this._token = Token.DotToken);
|
| 691 |
+
case '#':
|
| 692 |
+
return (this._token = Token.HashToken);
|
| 693 |
+
case '~':
|
| 694 |
+
return (this._token = Token.TildeToken);
|
| 695 |
+
case ':':
|
| 696 |
+
return (this._token = Token.ColonToken);
|
| 697 |
+
case ',':
|
| 698 |
+
return (this._token = Token.CommaToken);
|
| 699 |
+
case '@':
|
| 700 |
+
return (this._token = Token.AtToken);
|
| 701 |
+
case '"':
|
| 702 |
+
this.scanString();
|
| 703 |
+
return (this._token = Token.String);
|
| 704 |
+
default:
|
| 705 |
+
this.scanText();
|
| 706 |
+
return (this._token = Token.Text);
|
| 707 |
+
}
|
| 708 |
+
}
|
| 709 |
+
}
|
| 710 |
+
return (this._token = Token.EofToken);
|
| 711 |
+
}
|
| 712 |
+
rescanModuleSource() {
|
| 713 |
+
switch (this._token) {
|
| 714 |
+
case Token.ModuleSource:
|
| 715 |
+
case Token.ExclamationToken:
|
| 716 |
+
case Token.EofToken:
|
| 717 |
+
return this._token;
|
| 718 |
+
}
|
| 719 |
+
return this.speculate((accept) => {
|
| 720 |
+
if (!this.eof) {
|
| 721 |
+
this._pos = this._tokenPos;
|
| 722 |
+
this._stringIsUnterminated = false;
|
| 723 |
+
let scanned = 'none';
|
| 724 |
+
while (!this.eof) {
|
| 725 |
+
const ch = this._text[this._pos];
|
| 726 |
+
if (ch === '!') {
|
| 727 |
+
if (scanned === 'none') {
|
| 728 |
+
return this._token;
|
| 729 |
+
}
|
| 730 |
+
accept();
|
| 731 |
+
return (this._token = Token.ModuleSource);
|
| 732 |
+
}
|
| 733 |
+
this._pos++;
|
| 734 |
+
if (ch === '"') {
|
| 735 |
+
if (scanned === 'other') {
|
| 736 |
+
// strings not allowed after scanning any other characters
|
| 737 |
+
return this._token;
|
| 738 |
+
}
|
| 739 |
+
scanned = 'string';
|
| 740 |
+
this.scanString();
|
| 741 |
+
}
|
| 742 |
+
else {
|
| 743 |
+
if (scanned === 'string') {
|
| 744 |
+
// no other tokens allowed after string
|
| 745 |
+
return this._token;
|
| 746 |
+
}
|
| 747 |
+
scanned = 'other';
|
| 748 |
+
if (!isPunctuator(ch)) {
|
| 749 |
+
this.scanText();
|
| 750 |
+
}
|
| 751 |
+
}
|
| 752 |
+
}
|
| 753 |
+
}
|
| 754 |
+
return this._token;
|
| 755 |
+
});
|
| 756 |
+
}
|
| 757 |
+
rescanMeaning() {
|
| 758 |
+
if (this._token === Token.Text) {
|
| 759 |
+
const tokenText = this.tokenText;
|
| 760 |
+
switch (tokenText) {
|
| 761 |
+
case 'class':
|
| 762 |
+
return (this._token = Token.ClassKeyword);
|
| 763 |
+
case 'interface':
|
| 764 |
+
return (this._token = Token.InterfaceKeyword);
|
| 765 |
+
case 'type':
|
| 766 |
+
return (this._token = Token.TypeKeyword);
|
| 767 |
+
case 'enum':
|
| 768 |
+
return (this._token = Token.EnumKeyword);
|
| 769 |
+
case 'namespace':
|
| 770 |
+
return (this._token = Token.NamespaceKeyword);
|
| 771 |
+
case 'function':
|
| 772 |
+
return (this._token = Token.FunctionKeyword);
|
| 773 |
+
case 'var':
|
| 774 |
+
return (this._token = Token.VarKeyword);
|
| 775 |
+
case 'constructor':
|
| 776 |
+
return (this._token = Token.ConstructorKeyword);
|
| 777 |
+
case 'member':
|
| 778 |
+
return (this._token = Token.MemberKeyword);
|
| 779 |
+
case 'event':
|
| 780 |
+
return (this._token = Token.EventKeyword);
|
| 781 |
+
case 'call':
|
| 782 |
+
return (this._token = Token.CallKeyword);
|
| 783 |
+
case 'new':
|
| 784 |
+
return (this._token = Token.NewKeyword);
|
| 785 |
+
case 'index':
|
| 786 |
+
return (this._token = Token.IndexKeyword);
|
| 787 |
+
case 'complex':
|
| 788 |
+
return (this._token = Token.ComplexKeyword);
|
| 789 |
+
}
|
| 790 |
+
}
|
| 791 |
+
return this._token;
|
| 792 |
+
}
|
| 793 |
+
rescanDecimalDigits() {
|
| 794 |
+
if (this._token === Token.Text) {
|
| 795 |
+
const tokenText = this.tokenText;
|
| 796 |
+
if (/^\d+$/.test(tokenText)) {
|
| 797 |
+
return (this._token = Token.DecimalDigits);
|
| 798 |
+
}
|
| 799 |
+
}
|
| 800 |
+
return this._token;
|
| 801 |
+
}
|
| 802 |
+
scanString() {
|
| 803 |
+
while (!this.eof) {
|
| 804 |
+
const ch = this._text.charAt(this._pos++);
|
| 805 |
+
switch (ch) {
|
| 806 |
+
case '"':
|
| 807 |
+
return;
|
| 808 |
+
case '\\':
|
| 809 |
+
this.scanEscapeSequence();
|
| 810 |
+
break;
|
| 811 |
+
default:
|
| 812 |
+
if (isLineTerminator(ch)) {
|
| 813 |
+
this._stringIsUnterminated = true;
|
| 814 |
+
return;
|
| 815 |
+
}
|
| 816 |
+
}
|
| 817 |
+
}
|
| 818 |
+
this._stringIsUnterminated = true;
|
| 819 |
+
}
|
| 820 |
+
scanEscapeSequence() {
|
| 821 |
+
if (this.eof) {
|
| 822 |
+
this._stringIsUnterminated = true;
|
| 823 |
+
return;
|
| 824 |
+
}
|
| 825 |
+
const ch = this._text.charAt(this._pos);
|
| 826 |
+
// EscapeSequence:: CharacterEscapeSequence
|
| 827 |
+
if (isCharacterEscapeSequence(ch)) {
|
| 828 |
+
this._pos++;
|
| 829 |
+
return;
|
| 830 |
+
}
|
| 831 |
+
// EscapeSequence:: `0` [lookahead != DecimalDigit]
|
| 832 |
+
if (ch === '0' &&
|
| 833 |
+
(this._pos + 1 === this._text.length || !isDecimalDigit(this._text.charAt(this._pos + 1)))) {
|
| 834 |
+
this._pos++;
|
| 835 |
+
return;
|
| 836 |
+
}
|
| 837 |
+
// EscapeSequence:: HexEscapeSequence
|
| 838 |
+
if (ch === 'x' &&
|
| 839 |
+
this._pos + 3 <= this._text.length &&
|
| 840 |
+
isHexDigit(this._text.charAt(this._pos + 1)) &&
|
| 841 |
+
isHexDigit(this._text.charAt(this._pos + 2))) {
|
| 842 |
+
this._pos += 3;
|
| 843 |
+
return;
|
| 844 |
+
}
|
| 845 |
+
// EscapeSequence:: UnicodeEscapeSequence
|
| 846 |
+
// UnicodeEscapeSequence:: `u` Hex4Digits
|
| 847 |
+
if (ch === 'u' &&
|
| 848 |
+
this._pos + 5 <= this._text.length &&
|
| 849 |
+
isHexDigit(this._text.charAt(this._pos + 1)) &&
|
| 850 |
+
isHexDigit(this._text.charAt(this._pos + 2)) &&
|
| 851 |
+
isHexDigit(this._text.charAt(this._pos + 3)) &&
|
| 852 |
+
isHexDigit(this._text.charAt(this._pos + 4))) {
|
| 853 |
+
this._pos += 5;
|
| 854 |
+
return;
|
| 855 |
+
}
|
| 856 |
+
// EscapeSequence:: UnicodeEscapeSequence
|
| 857 |
+
// UnicodeEscapeSequence:: `u` `{` CodePoint `}`
|
| 858 |
+
if (ch === 'u' && this._pos + 4 <= this._text.length && this._text.charAt(this._pos + 1) === '{') {
|
| 859 |
+
let hexDigits = this._text.charAt(this._pos + 2);
|
| 860 |
+
if (isHexDigit(hexDigits)) {
|
| 861 |
+
for (let i = this._pos + 3; i < this._text.length; i++) {
|
| 862 |
+
const ch2 = this._text.charAt(i);
|
| 863 |
+
if (ch2 === '}') {
|
| 864 |
+
const mv = parseInt(hexDigits, 16);
|
| 865 |
+
if (mv <= 0x10ffff) {
|
| 866 |
+
this._pos = i + 1;
|
| 867 |
+
return;
|
| 868 |
+
}
|
| 869 |
+
break;
|
| 870 |
+
}
|
| 871 |
+
if (!isHexDigit(ch2)) {
|
| 872 |
+
hexDigits += ch2;
|
| 873 |
+
break;
|
| 874 |
+
}
|
| 875 |
+
}
|
| 876 |
+
}
|
| 877 |
+
}
|
| 878 |
+
this._stringIsUnterminated = true;
|
| 879 |
+
}
|
| 880 |
+
scanText() {
|
| 881 |
+
while (this._pos < this._text.length) {
|
| 882 |
+
const ch = this._text.charAt(this._pos);
|
| 883 |
+
if (isPunctuator(ch) || ch === '"') {
|
| 884 |
+
return;
|
| 885 |
+
}
|
| 886 |
+
this._pos++;
|
| 887 |
+
}
|
| 888 |
+
}
|
| 889 |
+
}
|
| 890 |
+
class Parser {
|
| 891 |
+
constructor(text) {
|
| 892 |
+
this._errors = [];
|
| 893 |
+
this._scanner = new Scanner(text);
|
| 894 |
+
this._scanner.scan();
|
| 895 |
+
}
|
| 896 |
+
get eof() {
|
| 897 |
+
return this.token() === Token.EofToken;
|
| 898 |
+
}
|
| 899 |
+
get errors() {
|
| 900 |
+
return this._errors;
|
| 901 |
+
}
|
| 902 |
+
parseDeclarationReference() {
|
| 903 |
+
let source;
|
| 904 |
+
let navigation;
|
| 905 |
+
let symbol;
|
| 906 |
+
if (this.optionalToken(Token.ExclamationToken)) {
|
| 907 |
+
// Reference to global symbol
|
| 908 |
+
source = GlobalSource.instance;
|
| 909 |
+
}
|
| 910 |
+
else if (this._scanner.rescanModuleSource() === Token.ModuleSource) {
|
| 911 |
+
source = this.parseModuleSource();
|
| 912 |
+
// Check for optional `~` navigation token.
|
| 913 |
+
if (this.optionalToken(Token.TildeToken)) {
|
| 914 |
+
navigation = Navigation.Locals;
|
| 915 |
+
}
|
| 916 |
+
}
|
| 917 |
+
if (this.isStartOfComponent()) {
|
| 918 |
+
symbol = this.parseSymbol();
|
| 919 |
+
}
|
| 920 |
+
else if (this.token() === Token.ColonToken) {
|
| 921 |
+
symbol = this.parseSymbolRest(new ComponentRoot(new ComponentString('', /*userEscaped*/ true)));
|
| 922 |
+
}
|
| 923 |
+
return new DeclarationReference(source, navigation, symbol);
|
| 924 |
+
}
|
| 925 |
+
parseModuleSourceString() {
|
| 926 |
+
this._scanner.rescanModuleSource();
|
| 927 |
+
return this.parseTokenString(Token.ModuleSource, 'Module source');
|
| 928 |
+
}
|
| 929 |
+
parseComponentString() {
|
| 930 |
+
switch (this._scanner.token()) {
|
| 931 |
+
case Token.String:
|
| 932 |
+
return this.parseString();
|
| 933 |
+
default:
|
| 934 |
+
return this.parseComponentCharacters();
|
| 935 |
+
}
|
| 936 |
+
}
|
| 937 |
+
token() {
|
| 938 |
+
return this._scanner.token();
|
| 939 |
+
}
|
| 940 |
+
parseModuleSource() {
|
| 941 |
+
const source = this.parseModuleSourceString();
|
| 942 |
+
this.expectToken(Token.ExclamationToken);
|
| 943 |
+
return new ParsedModuleSource(source, /*userEscaped*/ true);
|
| 944 |
+
}
|
| 945 |
+
parseSymbol() {
|
| 946 |
+
const component = this.parseComponentRest(this.parseRootComponent());
|
| 947 |
+
return this.parseSymbolRest(component);
|
| 948 |
+
}
|
| 949 |
+
parseSymbolRest(component) {
|
| 950 |
+
let meaning;
|
| 951 |
+
let overloadIndex;
|
| 952 |
+
if (this.optionalToken(Token.ColonToken)) {
|
| 953 |
+
meaning = this.tryParseMeaning();
|
| 954 |
+
overloadIndex = this.tryParseOverloadIndex(!!meaning);
|
| 955 |
+
}
|
| 956 |
+
return new SymbolReference(component, { meaning, overloadIndex });
|
| 957 |
+
}
|
| 958 |
+
parseRootComponent() {
|
| 959 |
+
if (!this.isStartOfComponent()) {
|
| 960 |
+
return this.fail('Component expected', new ComponentRoot(new ComponentString('', /*userEscaped*/ true)));
|
| 961 |
+
}
|
| 962 |
+
const component = this.parseComponent();
|
| 963 |
+
return new ComponentRoot(component);
|
| 964 |
+
}
|
| 965 |
+
parseComponentRest(component) {
|
| 966 |
+
for (;;) {
|
| 967 |
+
switch (this.token()) {
|
| 968 |
+
case Token.DotToken:
|
| 969 |
+
case Token.HashToken:
|
| 970 |
+
case Token.TildeToken:
|
| 971 |
+
const navigation = this.parseNavigation();
|
| 972 |
+
const right = this.parseComponent();
|
| 973 |
+
component = new ComponentNavigation(component, navigation, right);
|
| 974 |
+
break;
|
| 975 |
+
default:
|
| 976 |
+
return component;
|
| 977 |
+
}
|
| 978 |
+
}
|
| 979 |
+
}
|
| 980 |
+
parseNavigation() {
|
| 981 |
+
switch (this._scanner.token()) {
|
| 982 |
+
case Token.DotToken: {
|
| 983 |
+
this._scanner.scan();
|
| 984 |
+
return Navigation.Exports;
|
| 985 |
+
}
|
| 986 |
+
case Token.HashToken: {
|
| 987 |
+
this._scanner.scan();
|
| 988 |
+
return Navigation.Members;
|
| 989 |
+
}
|
| 990 |
+
case Token.TildeToken: {
|
| 991 |
+
this._scanner.scan();
|
| 992 |
+
return Navigation.Locals;
|
| 993 |
+
}
|
| 994 |
+
default: {
|
| 995 |
+
return this.fail("Expected '.', '#', or '~'", Navigation.Exports);
|
| 996 |
+
}
|
| 997 |
+
}
|
| 998 |
+
}
|
| 999 |
+
tryParseMeaning() {
|
| 1000 |
+
switch (this._scanner.rescanMeaning()) {
|
| 1001 |
+
case Token.ClassKeyword: {
|
| 1002 |
+
this._scanner.scan();
|
| 1003 |
+
return Meaning.Class;
|
| 1004 |
+
}
|
| 1005 |
+
case Token.InterfaceKeyword: {
|
| 1006 |
+
this._scanner.scan();
|
| 1007 |
+
return Meaning.Interface;
|
| 1008 |
+
}
|
| 1009 |
+
case Token.TypeKeyword: {
|
| 1010 |
+
this._scanner.scan();
|
| 1011 |
+
return Meaning.TypeAlias;
|
| 1012 |
+
}
|
| 1013 |
+
case Token.EnumKeyword: {
|
| 1014 |
+
this._scanner.scan();
|
| 1015 |
+
return Meaning.Enum;
|
| 1016 |
+
}
|
| 1017 |
+
case Token.NamespaceKeyword: {
|
| 1018 |
+
this._scanner.scan();
|
| 1019 |
+
return Meaning.Namespace;
|
| 1020 |
+
}
|
| 1021 |
+
case Token.FunctionKeyword: {
|
| 1022 |
+
this._scanner.scan();
|
| 1023 |
+
return Meaning.Function;
|
| 1024 |
+
}
|
| 1025 |
+
case Token.VarKeyword: {
|
| 1026 |
+
this._scanner.scan();
|
| 1027 |
+
return Meaning.Variable;
|
| 1028 |
+
}
|
| 1029 |
+
case Token.ConstructorKeyword: {
|
| 1030 |
+
this._scanner.scan();
|
| 1031 |
+
return Meaning.Constructor;
|
| 1032 |
+
}
|
| 1033 |
+
case Token.MemberKeyword: {
|
| 1034 |
+
this._scanner.scan();
|
| 1035 |
+
return Meaning.Member;
|
| 1036 |
+
}
|
| 1037 |
+
case Token.EventKeyword: {
|
| 1038 |
+
this._scanner.scan();
|
| 1039 |
+
return Meaning.Event;
|
| 1040 |
+
}
|
| 1041 |
+
case Token.CallKeyword: {
|
| 1042 |
+
this._scanner.scan();
|
| 1043 |
+
return Meaning.CallSignature;
|
| 1044 |
+
}
|
| 1045 |
+
case Token.NewKeyword: {
|
| 1046 |
+
this._scanner.scan();
|
| 1047 |
+
return Meaning.ConstructSignature;
|
| 1048 |
+
}
|
| 1049 |
+
case Token.IndexKeyword: {
|
| 1050 |
+
this._scanner.scan();
|
| 1051 |
+
return Meaning.IndexSignature;
|
| 1052 |
+
}
|
| 1053 |
+
case Token.ComplexKeyword: {
|
| 1054 |
+
this._scanner.scan();
|
| 1055 |
+
return Meaning.ComplexType;
|
| 1056 |
+
}
|
| 1057 |
+
}
|
| 1058 |
+
}
|
| 1059 |
+
tryParseOverloadIndex(hasMeaning) {
|
| 1060 |
+
if (this.optionalToken(Token.OpenParenToken)) {
|
| 1061 |
+
const overloadIndex = this.parseDecimalDigits();
|
| 1062 |
+
this.expectToken(Token.CloseParenToken);
|
| 1063 |
+
return overloadIndex;
|
| 1064 |
+
}
|
| 1065 |
+
else if (!hasMeaning) {
|
| 1066 |
+
return this.parseDecimalDigits();
|
| 1067 |
+
}
|
| 1068 |
+
return undefined;
|
| 1069 |
+
}
|
| 1070 |
+
parseDecimalDigits() {
|
| 1071 |
+
switch (this._scanner.rescanDecimalDigits()) {
|
| 1072 |
+
case Token.DecimalDigits:
|
| 1073 |
+
const value = +this._scanner.tokenText;
|
| 1074 |
+
this._scanner.scan();
|
| 1075 |
+
return value;
|
| 1076 |
+
default:
|
| 1077 |
+
return this.fail('Decimal digit expected', 0);
|
| 1078 |
+
}
|
| 1079 |
+
}
|
| 1080 |
+
isStartOfComponent() {
|
| 1081 |
+
switch (this.token()) {
|
| 1082 |
+
case Token.Text:
|
| 1083 |
+
case Token.String:
|
| 1084 |
+
case Token.OpenBracketToken:
|
| 1085 |
+
return true;
|
| 1086 |
+
default:
|
| 1087 |
+
return false;
|
| 1088 |
+
}
|
| 1089 |
+
}
|
| 1090 |
+
parseComponentCharacters() {
|
| 1091 |
+
let text = '';
|
| 1092 |
+
for (;;) {
|
| 1093 |
+
switch (this._scanner.token()) {
|
| 1094 |
+
case Token.Text:
|
| 1095 |
+
text += this.parseText();
|
| 1096 |
+
break;
|
| 1097 |
+
default:
|
| 1098 |
+
return text;
|
| 1099 |
+
}
|
| 1100 |
+
}
|
| 1101 |
+
}
|
| 1102 |
+
parseTokenString(token, tokenString) {
|
| 1103 |
+
if (this._scanner.token() === token) {
|
| 1104 |
+
const text = this._scanner.tokenText;
|
| 1105 |
+
const stringIsUnterminated = this._scanner.stringIsUnterminated;
|
| 1106 |
+
this._scanner.scan();
|
| 1107 |
+
if (stringIsUnterminated) {
|
| 1108 |
+
return this.fail(`${tokenString || tokenToString(token)} is unterminated`, text);
|
| 1109 |
+
}
|
| 1110 |
+
return text;
|
| 1111 |
+
}
|
| 1112 |
+
return this.fail(`${tokenString || tokenToString(token)} expected`, '');
|
| 1113 |
+
}
|
| 1114 |
+
parseText() {
|
| 1115 |
+
return this.parseTokenString(Token.Text, 'Text');
|
| 1116 |
+
}
|
| 1117 |
+
parseString() {
|
| 1118 |
+
return this.parseTokenString(Token.String, 'String');
|
| 1119 |
+
}
|
| 1120 |
+
parseComponent() {
|
| 1121 |
+
switch (this._scanner.token()) {
|
| 1122 |
+
case Token.OpenBracketToken:
|
| 1123 |
+
return this.parseBracketedComponent();
|
| 1124 |
+
default:
|
| 1125 |
+
return new ParsedComponentString(this.parseComponentString(), /*userEscaped*/ true);
|
| 1126 |
+
}
|
| 1127 |
+
}
|
| 1128 |
+
parseBracketedComponent() {
|
| 1129 |
+
this.expectToken(Token.OpenBracketToken);
|
| 1130 |
+
const reference = this.parseDeclarationReference();
|
| 1131 |
+
this.expectToken(Token.CloseBracketToken);
|
| 1132 |
+
return new ComponentReference(reference);
|
| 1133 |
+
}
|
| 1134 |
+
optionalToken(token) {
|
| 1135 |
+
if (this._scanner.token() === token) {
|
| 1136 |
+
this._scanner.scan();
|
| 1137 |
+
return true;
|
| 1138 |
+
}
|
| 1139 |
+
return false;
|
| 1140 |
+
}
|
| 1141 |
+
expectToken(token, message) {
|
| 1142 |
+
if (this._scanner.token() !== token) {
|
| 1143 |
+
const expected = tokenToString(token);
|
| 1144 |
+
const actual = tokenToString(this._scanner.token());
|
| 1145 |
+
return this.fail(message || `Expected token '${expected}', received '${actual}' instead.`, undefined);
|
| 1146 |
+
}
|
| 1147 |
+
this._scanner.scan();
|
| 1148 |
+
}
|
| 1149 |
+
fail(message, fallback) {
|
| 1150 |
+
this._errors.push(message);
|
| 1151 |
+
return fallback;
|
| 1152 |
+
}
|
| 1153 |
+
}
|
| 1154 |
+
function formatNavigation(navigation) {
|
| 1155 |
+
switch (navigation) {
|
| 1156 |
+
case Navigation.Exports:
|
| 1157 |
+
return '.';
|
| 1158 |
+
case Navigation.Members:
|
| 1159 |
+
return '#';
|
| 1160 |
+
case Navigation.Locals:
|
| 1161 |
+
return '~';
|
| 1162 |
+
default:
|
| 1163 |
+
return '';
|
| 1164 |
+
}
|
| 1165 |
+
}
|
| 1166 |
+
function isCharacterEscapeSequence(ch) {
|
| 1167 |
+
return isSingleEscapeCharacter(ch) || isNonEscapeCharacter(ch);
|
| 1168 |
+
}
|
| 1169 |
+
function isSingleEscapeCharacter(ch) {
|
| 1170 |
+
switch (ch) {
|
| 1171 |
+
case "'":
|
| 1172 |
+
case '"':
|
| 1173 |
+
case '\\':
|
| 1174 |
+
case 'b':
|
| 1175 |
+
case 'f':
|
| 1176 |
+
case 'n':
|
| 1177 |
+
case 'r':
|
| 1178 |
+
case 't':
|
| 1179 |
+
case 'v':
|
| 1180 |
+
return true;
|
| 1181 |
+
default:
|
| 1182 |
+
return false;
|
| 1183 |
+
}
|
| 1184 |
+
}
|
| 1185 |
+
function isNonEscapeCharacter(ch) {
|
| 1186 |
+
return !isEscapeCharacter(ch) && !isLineTerminator(ch);
|
| 1187 |
+
}
|
| 1188 |
+
function isEscapeCharacter(ch) {
|
| 1189 |
+
switch (ch) {
|
| 1190 |
+
case 'x':
|
| 1191 |
+
case 'u':
|
| 1192 |
+
return true;
|
| 1193 |
+
default:
|
| 1194 |
+
return isSingleEscapeCharacter(ch) || isDecimalDigit(ch);
|
| 1195 |
+
}
|
| 1196 |
+
}
|
| 1197 |
+
function isLineTerminator(ch) {
|
| 1198 |
+
switch (ch) {
|
| 1199 |
+
case '\r':
|
| 1200 |
+
case '\n':
|
| 1201 |
+
// TODO: <LS>, <PS>
|
| 1202 |
+
return true;
|
| 1203 |
+
default:
|
| 1204 |
+
return false;
|
| 1205 |
+
}
|
| 1206 |
+
}
|
| 1207 |
+
function isDecimalDigit(ch) {
|
| 1208 |
+
switch (ch) {
|
| 1209 |
+
case '0':
|
| 1210 |
+
case '1':
|
| 1211 |
+
case '2':
|
| 1212 |
+
case '3':
|
| 1213 |
+
case '4':
|
| 1214 |
+
case '5':
|
| 1215 |
+
case '6':
|
| 1216 |
+
case '7':
|
| 1217 |
+
case '8':
|
| 1218 |
+
case '9':
|
| 1219 |
+
return true;
|
| 1220 |
+
default:
|
| 1221 |
+
return false;
|
| 1222 |
+
}
|
| 1223 |
+
}
|
| 1224 |
+
function isHexDigit(ch) {
|
| 1225 |
+
switch (ch) {
|
| 1226 |
+
case 'a':
|
| 1227 |
+
case 'b':
|
| 1228 |
+
case 'c':
|
| 1229 |
+
case 'd':
|
| 1230 |
+
case 'e':
|
| 1231 |
+
case 'f':
|
| 1232 |
+
case 'A':
|
| 1233 |
+
case 'B':
|
| 1234 |
+
case 'C':
|
| 1235 |
+
case 'D':
|
| 1236 |
+
case 'E':
|
| 1237 |
+
case 'F':
|
| 1238 |
+
return true;
|
| 1239 |
+
default:
|
| 1240 |
+
return isDecimalDigit(ch);
|
| 1241 |
+
}
|
| 1242 |
+
}
|
| 1243 |
+
function isPunctuator(ch) {
|
| 1244 |
+
switch (ch) {
|
| 1245 |
+
case '{':
|
| 1246 |
+
case '}':
|
| 1247 |
+
case '(':
|
| 1248 |
+
case ')':
|
| 1249 |
+
case '[':
|
| 1250 |
+
case ']':
|
| 1251 |
+
case '!':
|
| 1252 |
+
case '.':
|
| 1253 |
+
case '#':
|
| 1254 |
+
case '~':
|
| 1255 |
+
case ':':
|
| 1256 |
+
case ',':
|
| 1257 |
+
case '@':
|
| 1258 |
+
return true;
|
| 1259 |
+
default:
|
| 1260 |
+
return false;
|
| 1261 |
+
}
|
| 1262 |
+
}
|
| 1263 |
+
function escapeComponentIfNeeded(text, userEscaped) {
|
| 1264 |
+
if (userEscaped) {
|
| 1265 |
+
if (!DeclarationReference.isWellFormedComponentString(text)) {
|
| 1266 |
+
throw new SyntaxError(`Invalid Component '${text}'`);
|
| 1267 |
+
}
|
| 1268 |
+
return text;
|
| 1269 |
+
}
|
| 1270 |
+
return DeclarationReference.escapeComponentString(text);
|
| 1271 |
+
}
|
| 1272 |
+
function escapeModuleSourceIfNeeded(text, userEscaped) {
|
| 1273 |
+
if (userEscaped) {
|
| 1274 |
+
if (!DeclarationReference.isWellFormedModuleSourceString(text)) {
|
| 1275 |
+
throw new SyntaxError(`Invalid Module source '${text}'`);
|
| 1276 |
+
}
|
| 1277 |
+
return text;
|
| 1278 |
+
}
|
| 1279 |
+
return DeclarationReference.escapeModuleSourceString(text);
|
| 1280 |
+
}
|
| 1281 |
+
//# sourceMappingURL=DeclarationReference.js.map
|
node_modules/@microsoft/tsdoc/lib/beta/DeclarationReference.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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,IAA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,CAAC,CAAC;AAC7D,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\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 '<none>';\r\n case Token.EofToken:\r\n return '<eof>';\r\n case Token.DecimalDigits:\r\n return '<decimal digits>';\r\n case Token.String:\r\n return '<string>';\r\n case Token.Text:\r\n return '<text>';\r\n case Token.ModuleSource:\r\n return '<module source>';\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<T>(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<T>(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: <LS>, <PS>\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"]}
|
node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { DocNode } from '../nodes/DocNode';
|
| 2 |
+
export type DocNodeConstructor = new (...args: any[]) => DocNode;
|
| 3 |
+
export interface IDocNodeDefinition {
|
| 4 |
+
docNodeKind: string;
|
| 5 |
+
constructor: DocNodeConstructor;
|
| 6 |
+
}
|
| 7 |
+
/**
|
| 8 |
+
* Part of the {@link TSDocConfiguration} object.
|
| 9 |
+
*
|
| 10 |
+
* @remarks
|
| 11 |
+
* If you define your own custom subclasses of `DocNode`, they must be registered with the `DocNodeManager`.
|
| 12 |
+
* Use {@link DocNodeManager.registerAllowableChildren} to specify which {@link DocNodeContainer} subclasses
|
| 13 |
+
* are allowed to contain your nodes.
|
| 14 |
+
*/
|
| 15 |
+
export declare class DocNodeManager {
|
| 16 |
+
private static readonly _nodeKindRegExp;
|
| 17 |
+
private readonly _docNodeDefinitionsByKind;
|
| 18 |
+
private readonly _docNodeDefinitionsByConstructor;
|
| 19 |
+
/**
|
| 20 |
+
* Registers a list of {@link IDocNodeDefinition} objects to be used with the associated
|
| 21 |
+
* {@link TSDocConfiguration} object.
|
| 22 |
+
*/
|
| 23 |
+
registerDocNodes(packageName: string, definitions: ReadonlyArray<IDocNodeDefinition>): void;
|
| 24 |
+
/**
|
| 25 |
+
* Reports an error if the specified DocNode kind has not been registered.
|
| 26 |
+
*/
|
| 27 |
+
throwIfNotRegisteredKind(docNodeKind: string): void;
|
| 28 |
+
/**
|
| 29 |
+
* For the given parent DocNode kind, registers the specified DocNode kinds as being allowable children of
|
| 30 |
+
* the parent.
|
| 31 |
+
*
|
| 32 |
+
* @remarks
|
| 33 |
+
* To prevent mistakes, `DocNodeContainer` will report an error if you try to add node that was not registered
|
| 34 |
+
* as an allowable child of the container.
|
| 35 |
+
*/
|
| 36 |
+
registerAllowableChildren(parentKind: string, childKinds: ReadonlyArray<string>): void;
|
| 37 |
+
/**
|
| 38 |
+
* Returns true if the specified DocNode kind has been registered as an allowable child of the specified
|
| 39 |
+
* parent DocNode kind.
|
| 40 |
+
*/
|
| 41 |
+
isAllowedChild(parentKind: string, childKind: string): boolean;
|
| 42 |
+
private _getDefinition;
|
| 43 |
+
}
|
| 44 |
+
//# sourceMappingURL=DocNodeManager.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { StringChecks } from '../parser/StringChecks';
|
| 4 |
+
/**
|
| 5 |
+
* Part of the {@link TSDocConfiguration} object.
|
| 6 |
+
*
|
| 7 |
+
* @remarks
|
| 8 |
+
* If you define your own custom subclasses of `DocNode`, they must be registered with the `DocNodeManager`.
|
| 9 |
+
* Use {@link DocNodeManager.registerAllowableChildren} to specify which {@link DocNodeContainer} subclasses
|
| 10 |
+
* are allowed to contain your nodes.
|
| 11 |
+
*/
|
| 12 |
+
export class DocNodeManager {
|
| 13 |
+
constructor() {
|
| 14 |
+
this._docNodeDefinitionsByKind = new Map();
|
| 15 |
+
this._docNodeDefinitionsByConstructor = new Map();
|
| 16 |
+
}
|
| 17 |
+
/**
|
| 18 |
+
* Registers a list of {@link IDocNodeDefinition} objects to be used with the associated
|
| 19 |
+
* {@link TSDocConfiguration} object.
|
| 20 |
+
*/
|
| 21 |
+
registerDocNodes(packageName, definitions) {
|
| 22 |
+
const packageNameError = StringChecks.explainIfInvalidPackageName(packageName);
|
| 23 |
+
if (packageNameError) {
|
| 24 |
+
throw new Error('Invalid NPM package name: ' + packageNameError);
|
| 25 |
+
}
|
| 26 |
+
for (const definition of definitions) {
|
| 27 |
+
if (!DocNodeManager._nodeKindRegExp.test(definition.docNodeKind)) {
|
| 28 |
+
throw new Error(`The DocNode kind ${JSON.stringify(definition.docNodeKind)} is not a valid identifier.` +
|
| 29 |
+
` It must start with an underscore or letter, and be comprised of letters, numbers, and underscores`);
|
| 30 |
+
}
|
| 31 |
+
let existingDefinition = this._docNodeDefinitionsByKind.get(definition.docNodeKind);
|
| 32 |
+
if (existingDefinition !== undefined) {
|
| 33 |
+
throw new Error(`The DocNode kind "${definition.docNodeKind}" was already registered` +
|
| 34 |
+
` by ${existingDefinition.packageName}`);
|
| 35 |
+
}
|
| 36 |
+
existingDefinition = this._docNodeDefinitionsByConstructor.get(definition.constructor);
|
| 37 |
+
if (existingDefinition !== undefined) {
|
| 38 |
+
throw new Error(`This DocNode constructor was already registered by ${existingDefinition.packageName}` +
|
| 39 |
+
` as ${existingDefinition.docNodeKind}`);
|
| 40 |
+
}
|
| 41 |
+
const newDefinition = {
|
| 42 |
+
docNodeKind: definition.docNodeKind,
|
| 43 |
+
constructor: definition.constructor,
|
| 44 |
+
packageName,
|
| 45 |
+
allowedChildKinds: new Set()
|
| 46 |
+
};
|
| 47 |
+
this._docNodeDefinitionsByKind.set(definition.docNodeKind, newDefinition);
|
| 48 |
+
this._docNodeDefinitionsByConstructor.set(definition.constructor, newDefinition);
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
/**
|
| 52 |
+
* Reports an error if the specified DocNode kind has not been registered.
|
| 53 |
+
*/
|
| 54 |
+
throwIfNotRegisteredKind(docNodeKind) {
|
| 55 |
+
if (!this._docNodeDefinitionsByKind.has(docNodeKind)) {
|
| 56 |
+
throw new Error(`The DocNode kind "${docNodeKind}" was not registered with this TSDocConfiguration`);
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
/**
|
| 60 |
+
* For the given parent DocNode kind, registers the specified DocNode kinds as being allowable children of
|
| 61 |
+
* the parent.
|
| 62 |
+
*
|
| 63 |
+
* @remarks
|
| 64 |
+
* To prevent mistakes, `DocNodeContainer` will report an error if you try to add node that was not registered
|
| 65 |
+
* as an allowable child of the container.
|
| 66 |
+
*/
|
| 67 |
+
registerAllowableChildren(parentKind, childKinds) {
|
| 68 |
+
const parentDefinition = this._getDefinition(parentKind);
|
| 69 |
+
for (const childKind of childKinds) {
|
| 70 |
+
this._getDefinition(childKind);
|
| 71 |
+
parentDefinition.allowedChildKinds.add(childKind);
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
/**
|
| 75 |
+
* Returns true if the specified DocNode kind has been registered as an allowable child of the specified
|
| 76 |
+
* parent DocNode kind.
|
| 77 |
+
*/
|
| 78 |
+
isAllowedChild(parentKind, childKind) {
|
| 79 |
+
const parentDefinition = this._getDefinition(parentKind);
|
| 80 |
+
return parentDefinition.allowedChildKinds.has(childKind);
|
| 81 |
+
}
|
| 82 |
+
_getDefinition(docNodeKind) {
|
| 83 |
+
const definition = this._docNodeDefinitionsByKind.get(docNodeKind);
|
| 84 |
+
if (definition === undefined) {
|
| 85 |
+
throw new Error(`The DocNode kind "${docNodeKind}" was not registered with this TSDocConfiguration`);
|
| 86 |
+
}
|
| 87 |
+
return definition;
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
// Matches an ASCII TypeScript-style identifier.
|
| 91 |
+
//
|
| 92 |
+
// Example: "_myIdentifier99"
|
| 93 |
+
DocNodeManager._nodeKindRegExp = /^[_a-z][_a-z0-9]*$/i;
|
| 94 |
+
//# sourceMappingURL=DocNodeManager.js.map
|
node_modules/@microsoft/tsdoc/lib/configuration/DocNodeManager.js.map
ADDED
|
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AAC,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<string>;\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<string, IRegisteredDocNodeDefinition> = new Map<\r\n string,\r\n IRegisteredDocNodeDefinition\r\n >();\r\n private readonly _docNodeDefinitionsByConstructor: Map<DocNodeConstructor, IRegisteredDocNodeDefinition> =\r\n new Map<DocNodeConstructor, IRegisteredDocNodeDefinition>();\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<IDocNodeDefinition>): 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<string>()\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<string>): 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"]}
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { TSDocTagDefinition } from './TSDocTagDefinition';
|
| 2 |
+
import { TSDocValidationConfiguration } from './TSDocValidationConfiguration';
|
| 3 |
+
import { DocNodeManager } from './DocNodeManager';
|
| 4 |
+
import { type TSDocMessageId } from '../parser/TSDocMessageId';
|
| 5 |
+
/**
|
| 6 |
+
* Configuration for the TSDocParser.
|
| 7 |
+
*/
|
| 8 |
+
export declare class TSDocConfiguration {
|
| 9 |
+
private readonly _tagDefinitions;
|
| 10 |
+
private readonly _tagDefinitionsByName;
|
| 11 |
+
private readonly _supportedTagDefinitions;
|
| 12 |
+
private readonly _validation;
|
| 13 |
+
private readonly _docNodeManager;
|
| 14 |
+
private readonly _supportedHtmlElements;
|
| 15 |
+
constructor();
|
| 16 |
+
/**
|
| 17 |
+
* Resets the `TSDocConfiguration` object to its initial empty state.
|
| 18 |
+
* @param noStandardTags - The `TSDocConfiguration` constructor normally adds definitions for the
|
| 19 |
+
* standard TSDoc tags. Set `noStandardTags` to true for a completely empty `tagDefinitions` collection.
|
| 20 |
+
*/
|
| 21 |
+
clear(noStandardTags?: boolean): void;
|
| 22 |
+
/**
|
| 23 |
+
* The TSDoc tags that are defined in this configuration.
|
| 24 |
+
*
|
| 25 |
+
* @remarks
|
| 26 |
+
* The subset of "supported" tags is tracked by {@link TSDocConfiguration.supportedTagDefinitions}.
|
| 27 |
+
*/
|
| 28 |
+
get tagDefinitions(): ReadonlyArray<TSDocTagDefinition>;
|
| 29 |
+
/**
|
| 30 |
+
* Returns the subset of {@link TSDocConfiguration.tagDefinitions}
|
| 31 |
+
* that are supported in this configuration.
|
| 32 |
+
*
|
| 33 |
+
* @remarks
|
| 34 |
+
* This property is only used when
|
| 35 |
+
* {@link TSDocValidationConfiguration.reportUnsupportedTags} is enabled.
|
| 36 |
+
*/
|
| 37 |
+
get supportedTagDefinitions(): ReadonlyArray<TSDocTagDefinition>;
|
| 38 |
+
/**
|
| 39 |
+
* Enable/disable validation checks performed by the parser.
|
| 40 |
+
*/
|
| 41 |
+
get validation(): TSDocValidationConfiguration;
|
| 42 |
+
/**
|
| 43 |
+
* The HTML element names that are supported in this configuration. Used in conjunction with the `reportUnsupportedHtmlElements` setting.
|
| 44 |
+
*/
|
| 45 |
+
get supportedHtmlElements(): string[];
|
| 46 |
+
/**
|
| 47 |
+
* Register custom DocNode subclasses.
|
| 48 |
+
*/
|
| 49 |
+
get docNodeManager(): DocNodeManager;
|
| 50 |
+
/**
|
| 51 |
+
* Return the tag that was defined with the specified name, or undefined
|
| 52 |
+
* if not found.
|
| 53 |
+
*/
|
| 54 |
+
tryGetTagDefinition(tagName: string): TSDocTagDefinition | undefined;
|
| 55 |
+
/**
|
| 56 |
+
* Return the tag that was defined with the specified name, or undefined
|
| 57 |
+
* if not found.
|
| 58 |
+
*/
|
| 59 |
+
tryGetTagDefinitionWithUpperCase(alreadyUpperCaseTagName: string): TSDocTagDefinition | undefined;
|
| 60 |
+
/**
|
| 61 |
+
* Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported.
|
| 62 |
+
* Use {@link TSDocConfiguration.setSupportForTag} to mark it as supported.
|
| 63 |
+
*
|
| 64 |
+
* @remarks
|
| 65 |
+
* If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
| 66 |
+
* Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
| 67 |
+
*/
|
| 68 |
+
addTagDefinition(tagDefinition: TSDocTagDefinition): void;
|
| 69 |
+
/**
|
| 70 |
+
* Calls {@link TSDocConfiguration.addTagDefinition} for a list of definitions,
|
| 71 |
+
* and optionally marks them as supported.
|
| 72 |
+
* @param tagDefinitions - the definitions to be added
|
| 73 |
+
* @param supported - if specified, calls the {@link TSDocConfiguration.setSupportForTag}
|
| 74 |
+
* method to mark the definitions as supported or unsupported
|
| 75 |
+
*/
|
| 76 |
+
addTagDefinitions(tagDefinitions: ReadonlyArray<TSDocTagDefinition>, supported?: boolean | undefined): void;
|
| 77 |
+
/**
|
| 78 |
+
* Returns true if the tag is supported in this configuration.
|
| 79 |
+
*/
|
| 80 |
+
isTagSupported(tagDefinition: TSDocTagDefinition): boolean;
|
| 81 |
+
/**
|
| 82 |
+
* Specifies whether the tag definition is supported in this configuration.
|
| 83 |
+
* The parser may issue warnings for unsupported tags.
|
| 84 |
+
*
|
| 85 |
+
* @remarks
|
| 86 |
+
* If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
| 87 |
+
* Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
| 88 |
+
*
|
| 89 |
+
* This function automatically sets {@link TSDocValidationConfiguration.reportUnsupportedTags}
|
| 90 |
+
* to true.
|
| 91 |
+
*/
|
| 92 |
+
setSupportForTag(tagDefinition: TSDocTagDefinition, supported: boolean): void;
|
| 93 |
+
/**
|
| 94 |
+
* Specifies whether the tag definition is supported in this configuration.
|
| 95 |
+
* This operation sets {@link TSDocValidationConfiguration.reportUnsupportedTags} to `true`.
|
| 96 |
+
*
|
| 97 |
+
* @remarks
|
| 98 |
+
* The parser may issue warnings for unsupported tags.
|
| 99 |
+
* If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
| 100 |
+
* Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
| 101 |
+
*/
|
| 102 |
+
setSupportForTags(tagDefinitions: ReadonlyArray<TSDocTagDefinition>, supported: boolean): void;
|
| 103 |
+
/**
|
| 104 |
+
* Assigns the `supportedHtmlElements` property, replacing any previous elements.
|
| 105 |
+
* This operation sets {@link TSDocValidationConfiguration.reportUnsupportedHtmlElements} to `true`.
|
| 106 |
+
*/
|
| 107 |
+
setSupportedHtmlElements(htmlTags: string[]): void;
|
| 108 |
+
/**
|
| 109 |
+
* Returns true if the html element is supported in this configuration.
|
| 110 |
+
*/
|
| 111 |
+
isHtmlElementSupported(htmlTag: string): boolean;
|
| 112 |
+
/**
|
| 113 |
+
* Returns true if the specified {@link TSDocMessageId} string is implemented by this release of the TSDoc parser.
|
| 114 |
+
* This can be used to detect misspelled identifiers.
|
| 115 |
+
*
|
| 116 |
+
* @privateRemarks
|
| 117 |
+
*
|
| 118 |
+
* Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions
|
| 119 |
+
* of the TSDoc parser, we may provide a way to register custom message identifiers.
|
| 120 |
+
*/
|
| 121 |
+
isKnownMessageId(messageId: TSDocMessageId | string): boolean;
|
| 122 |
+
/**
|
| 123 |
+
* Returns the list of {@link TSDocMessageId} strings that are implemented by this release of the TSDoc parser.
|
| 124 |
+
*
|
| 125 |
+
* @privateRemarks
|
| 126 |
+
*
|
| 127 |
+
* Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions
|
| 128 |
+
* of the TSDoc parser, we may provide a way to register custom message identifiers.
|
| 129 |
+
*/
|
| 130 |
+
get allTsdocMessageIds(): ReadonlyArray<TSDocMessageId>;
|
| 131 |
+
private _requireTagToBeDefined;
|
| 132 |
+
}
|
| 133 |
+
//# sourceMappingURL=TSDocConfiguration.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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,IAAI,aAAa,CAAC,kBAAkB,CAAC,CAEtE;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,4BAA4B,CAEpD;IAED;;OAEG;IACH,IAAW,qBAAqB,IAAI,MAAM,EAAE,CAE3C;IAED;;OAEG;IACH,IAAW,cAAc,IAAI,cAAc,CAE1C;IAED;;;OAGG;IACI,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAI3E;;;OAGG;IACI,gCAAgC,CAAC,uBAAuB,EAAE,MAAM,GAAG,kB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
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { StandardTags } from '../details/StandardTags';
|
| 4 |
+
import { TSDocValidationConfiguration } from './TSDocValidationConfiguration';
|
| 5 |
+
import { DocNodeManager } from './DocNodeManager';
|
| 6 |
+
import { BuiltInDocNodes } from '../nodes/BuiltInDocNodes';
|
| 7 |
+
import { allTsdocMessageIds, allTsdocMessageIdsSet } from '../parser/TSDocMessageId';
|
| 8 |
+
/**
|
| 9 |
+
* Configuration for the TSDocParser.
|
| 10 |
+
*/
|
| 11 |
+
export class TSDocConfiguration {
|
| 12 |
+
constructor() {
|
| 13 |
+
this._tagDefinitions = [];
|
| 14 |
+
this._tagDefinitionsByName = new Map();
|
| 15 |
+
this._supportedTagDefinitions = new Set();
|
| 16 |
+
this._validation = new TSDocValidationConfiguration();
|
| 17 |
+
this._docNodeManager = new DocNodeManager();
|
| 18 |
+
this._supportedHtmlElements = new Set();
|
| 19 |
+
this.clear(false);
|
| 20 |
+
// Register the built-in node kinds
|
| 21 |
+
BuiltInDocNodes.register(this);
|
| 22 |
+
}
|
| 23 |
+
/**
|
| 24 |
+
* Resets the `TSDocConfiguration` object to its initial empty state.
|
| 25 |
+
* @param noStandardTags - The `TSDocConfiguration` constructor normally adds definitions for the
|
| 26 |
+
* standard TSDoc tags. Set `noStandardTags` to true for a completely empty `tagDefinitions` collection.
|
| 27 |
+
*/
|
| 28 |
+
clear(noStandardTags = false) {
|
| 29 |
+
this._tagDefinitions.length = 0;
|
| 30 |
+
this._tagDefinitionsByName.clear();
|
| 31 |
+
this._supportedTagDefinitions.clear();
|
| 32 |
+
this._validation.ignoreUndefinedTags = false;
|
| 33 |
+
this._validation.reportUnsupportedTags = false;
|
| 34 |
+
this._validation.reportUnsupportedHtmlElements = false;
|
| 35 |
+
this._supportedHtmlElements.clear();
|
| 36 |
+
if (!noStandardTags) {
|
| 37 |
+
// Define all the standard tags
|
| 38 |
+
this.addTagDefinitions(StandardTags.allDefinitions);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
/**
|
| 42 |
+
* The TSDoc tags that are defined in this configuration.
|
| 43 |
+
*
|
| 44 |
+
* @remarks
|
| 45 |
+
* The subset of "supported" tags is tracked by {@link TSDocConfiguration.supportedTagDefinitions}.
|
| 46 |
+
*/
|
| 47 |
+
get tagDefinitions() {
|
| 48 |
+
return this._tagDefinitions;
|
| 49 |
+
}
|
| 50 |
+
/**
|
| 51 |
+
* Returns the subset of {@link TSDocConfiguration.tagDefinitions}
|
| 52 |
+
* that are supported in this configuration.
|
| 53 |
+
*
|
| 54 |
+
* @remarks
|
| 55 |
+
* This property is only used when
|
| 56 |
+
* {@link TSDocValidationConfiguration.reportUnsupportedTags} is enabled.
|
| 57 |
+
*/
|
| 58 |
+
get supportedTagDefinitions() {
|
| 59 |
+
return this.tagDefinitions.filter((x) => this.isTagSupported(x));
|
| 60 |
+
}
|
| 61 |
+
/**
|
| 62 |
+
* Enable/disable validation checks performed by the parser.
|
| 63 |
+
*/
|
| 64 |
+
get validation() {
|
| 65 |
+
return this._validation;
|
| 66 |
+
}
|
| 67 |
+
/**
|
| 68 |
+
* The HTML element names that are supported in this configuration. Used in conjunction with the `reportUnsupportedHtmlElements` setting.
|
| 69 |
+
*/
|
| 70 |
+
get supportedHtmlElements() {
|
| 71 |
+
return Array.from(this._supportedHtmlElements.values());
|
| 72 |
+
}
|
| 73 |
+
/**
|
| 74 |
+
* Register custom DocNode subclasses.
|
| 75 |
+
*/
|
| 76 |
+
get docNodeManager() {
|
| 77 |
+
return this._docNodeManager;
|
| 78 |
+
}
|
| 79 |
+
/**
|
| 80 |
+
* Return the tag that was defined with the specified name, or undefined
|
| 81 |
+
* if not found.
|
| 82 |
+
*/
|
| 83 |
+
tryGetTagDefinition(tagName) {
|
| 84 |
+
return this._tagDefinitionsByName.get(tagName.toUpperCase());
|
| 85 |
+
}
|
| 86 |
+
/**
|
| 87 |
+
* Return the tag that was defined with the specified name, or undefined
|
| 88 |
+
* if not found.
|
| 89 |
+
*/
|
| 90 |
+
tryGetTagDefinitionWithUpperCase(alreadyUpperCaseTagName) {
|
| 91 |
+
return this._tagDefinitionsByName.get(alreadyUpperCaseTagName);
|
| 92 |
+
}
|
| 93 |
+
/**
|
| 94 |
+
* Define a new TSDoc tag to be recognized by the TSDocParser, and mark it as unsupported.
|
| 95 |
+
* Use {@link TSDocConfiguration.setSupportForTag} to mark it as supported.
|
| 96 |
+
*
|
| 97 |
+
* @remarks
|
| 98 |
+
* If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
| 99 |
+
* Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
| 100 |
+
*/
|
| 101 |
+
addTagDefinition(tagDefinition) {
|
| 102 |
+
const existingDefinition = this._tagDefinitionsByName.get(tagDefinition.tagNameWithUpperCase);
|
| 103 |
+
if (existingDefinition === tagDefinition) {
|
| 104 |
+
return;
|
| 105 |
+
}
|
| 106 |
+
if (existingDefinition) {
|
| 107 |
+
throw new Error(`A tag is already defined using the name ${existingDefinition.tagName}`);
|
| 108 |
+
}
|
| 109 |
+
this._tagDefinitions.push(tagDefinition);
|
| 110 |
+
this._tagDefinitionsByName.set(tagDefinition.tagNameWithUpperCase, tagDefinition);
|
| 111 |
+
}
|
| 112 |
+
/**
|
| 113 |
+
* Calls {@link TSDocConfiguration.addTagDefinition} for a list of definitions,
|
| 114 |
+
* and optionally marks them as supported.
|
| 115 |
+
* @param tagDefinitions - the definitions to be added
|
| 116 |
+
* @param supported - if specified, calls the {@link TSDocConfiguration.setSupportForTag}
|
| 117 |
+
* method to mark the definitions as supported or unsupported
|
| 118 |
+
*/
|
| 119 |
+
addTagDefinitions(tagDefinitions, supported) {
|
| 120 |
+
for (const tagDefinition of tagDefinitions) {
|
| 121 |
+
this.addTagDefinition(tagDefinition);
|
| 122 |
+
if (supported !== undefined) {
|
| 123 |
+
this.setSupportForTag(tagDefinition, supported);
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
+
/**
|
| 128 |
+
* Returns true if the tag is supported in this configuration.
|
| 129 |
+
*/
|
| 130 |
+
isTagSupported(tagDefinition) {
|
| 131 |
+
this._requireTagToBeDefined(tagDefinition);
|
| 132 |
+
return this._supportedTagDefinitions.has(tagDefinition);
|
| 133 |
+
}
|
| 134 |
+
/**
|
| 135 |
+
* Specifies whether the tag definition is supported in this configuration.
|
| 136 |
+
* The parser may issue warnings for unsupported tags.
|
| 137 |
+
*
|
| 138 |
+
* @remarks
|
| 139 |
+
* If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
| 140 |
+
* Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
| 141 |
+
*
|
| 142 |
+
* This function automatically sets {@link TSDocValidationConfiguration.reportUnsupportedTags}
|
| 143 |
+
* to true.
|
| 144 |
+
*/
|
| 145 |
+
setSupportForTag(tagDefinition, supported) {
|
| 146 |
+
this._requireTagToBeDefined(tagDefinition);
|
| 147 |
+
if (supported) {
|
| 148 |
+
this._supportedTagDefinitions.add(tagDefinition);
|
| 149 |
+
}
|
| 150 |
+
else {
|
| 151 |
+
this._supportedTagDefinitions.delete(tagDefinition);
|
| 152 |
+
}
|
| 153 |
+
this.validation.reportUnsupportedTags = true;
|
| 154 |
+
}
|
| 155 |
+
/**
|
| 156 |
+
* Specifies whether the tag definition is supported in this configuration.
|
| 157 |
+
* This operation sets {@link TSDocValidationConfiguration.reportUnsupportedTags} to `true`.
|
| 158 |
+
*
|
| 159 |
+
* @remarks
|
| 160 |
+
* The parser may issue warnings for unsupported tags.
|
| 161 |
+
* If a tag is "defined" this means that the parser recognizes it and understands its syntax.
|
| 162 |
+
* Whereas if a tag is "supported", this means it is defined AND the application implements the tag.
|
| 163 |
+
*/
|
| 164 |
+
setSupportForTags(tagDefinitions, supported) {
|
| 165 |
+
for (const tagDefinition of tagDefinitions) {
|
| 166 |
+
this.setSupportForTag(tagDefinition, supported);
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
/**
|
| 170 |
+
* Assigns the `supportedHtmlElements` property, replacing any previous elements.
|
| 171 |
+
* This operation sets {@link TSDocValidationConfiguration.reportUnsupportedHtmlElements} to `true`.
|
| 172 |
+
*/
|
| 173 |
+
setSupportedHtmlElements(htmlTags) {
|
| 174 |
+
this._supportedHtmlElements.clear();
|
| 175 |
+
this._validation.reportUnsupportedHtmlElements = true;
|
| 176 |
+
for (const htmlTag of htmlTags) {
|
| 177 |
+
this._supportedHtmlElements.add(htmlTag);
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
/**
|
| 181 |
+
* Returns true if the html element is supported in this configuration.
|
| 182 |
+
*/
|
| 183 |
+
isHtmlElementSupported(htmlTag) {
|
| 184 |
+
return this._supportedHtmlElements.has(htmlTag);
|
| 185 |
+
}
|
| 186 |
+
/**
|
| 187 |
+
* Returns true if the specified {@link TSDocMessageId} string is implemented by this release of the TSDoc parser.
|
| 188 |
+
* This can be used to detect misspelled identifiers.
|
| 189 |
+
*
|
| 190 |
+
* @privateRemarks
|
| 191 |
+
*
|
| 192 |
+
* Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions
|
| 193 |
+
* of the TSDoc parser, we may provide a way to register custom message identifiers.
|
| 194 |
+
*/
|
| 195 |
+
isKnownMessageId(messageId) {
|
| 196 |
+
return allTsdocMessageIdsSet.has(messageId);
|
| 197 |
+
}
|
| 198 |
+
/**
|
| 199 |
+
* Returns the list of {@link TSDocMessageId} strings that are implemented by this release of the TSDoc parser.
|
| 200 |
+
*
|
| 201 |
+
* @privateRemarks
|
| 202 |
+
*
|
| 203 |
+
* Why this API is associated with TSDocConfiguration: In the future, if we enable support for custom extensions
|
| 204 |
+
* of the TSDoc parser, we may provide a way to register custom message identifiers.
|
| 205 |
+
*/
|
| 206 |
+
get allTsdocMessageIds() {
|
| 207 |
+
return allTsdocMessageIds;
|
| 208 |
+
}
|
| 209 |
+
_requireTagToBeDefined(tagDefinition) {
|
| 210 |
+
const matching = this._tagDefinitionsByName.get(tagDefinition.tagNameWithUpperCase);
|
| 211 |
+
if (matching) {
|
| 212 |
+
if (matching === tagDefinition) {
|
| 213 |
+
return;
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
throw new Error('The specified TSDocTagDefinition is not defined for this TSDocConfiguration');
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
+
//# sourceMappingURL=TSDocConfiguration.js.map
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocConfiguration.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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,eAAe,GAAG,IAAI,cAAc,EAAE,CAAC;QAC5C,IAAI,CAAC,sBAAsB,GAAG,IAAI,GAAG,EAAE,CAAC;QAExC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAElB,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,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<string, TSDocTagDefinition>;\r\n private readonly _supportedTagDefinitions: Set<TSDocTagDefinition>;\r\n private readonly _validation: TSDocValidationConfiguration;\r\n private readonly _docNodeManager: DocNodeManager;\r\n private readonly _supportedHtmlElements: Set<string>;\r\n\r\n public constructor() {\r\n this._tagDefinitions = [];\r\n this._tagDefinitionsByName = new Map<string, TSDocTagDefinition>();\r\n this._supportedTagDefinitions = new Set<TSDocTagDefinition>();\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<TSDocTagDefinition> {\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<TSDocTagDefinition> {\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<TSDocTagDefinition>,\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<TSDocTagDefinition>, 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<TSDocMessageId> {\r\n return allTsdocMessageIds as ReadonlyArray<TSDocMessageId>;\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"]}
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Standardization } from '../details/Standardization';
|
| 2 |
+
/**
|
| 3 |
+
* Determines the type of syntax for a TSDocTagDefinition
|
| 4 |
+
*/
|
| 5 |
+
export declare enum TSDocTagSyntaxKind {
|
| 6 |
+
/**
|
| 7 |
+
* The tag is intended to be an inline tag. For example: `{@link}`.
|
| 8 |
+
*/
|
| 9 |
+
InlineTag = 0,
|
| 10 |
+
/**
|
| 11 |
+
* The tag is intended to be a block tag that starts a new documentation
|
| 12 |
+
* section. For example: `@remarks`
|
| 13 |
+
*/
|
| 14 |
+
BlockTag = 1,
|
| 15 |
+
/**
|
| 16 |
+
* The tag is intended to be a modifier tag whose presence indicates
|
| 17 |
+
* an aspect of the associated API item. For example: `@internal`
|
| 18 |
+
*/
|
| 19 |
+
ModifierTag = 2
|
| 20 |
+
}
|
| 21 |
+
/**
|
| 22 |
+
* Constructor parameters for {@link TSDocTagDefinition}
|
| 23 |
+
*/
|
| 24 |
+
export interface ITSDocTagDefinitionParameters {
|
| 25 |
+
tagName: string;
|
| 26 |
+
syntaxKind: TSDocTagSyntaxKind;
|
| 27 |
+
allowMultiple?: boolean;
|
| 28 |
+
}
|
| 29 |
+
/**
|
| 30 |
+
* @internal
|
| 31 |
+
*/
|
| 32 |
+
export interface ITSDocTagDefinitionInternalParameters extends ITSDocTagDefinitionParameters {
|
| 33 |
+
standardization: Standardization;
|
| 34 |
+
}
|
| 35 |
+
/**
|
| 36 |
+
* Defines a TSDoc tag that will be understood by the TSDocParser.
|
| 37 |
+
*/
|
| 38 |
+
export declare class TSDocTagDefinition {
|
| 39 |
+
/**
|
| 40 |
+
* The TSDoc tag name. TSDoc tag names start with an at-sign (`@`) followed
|
| 41 |
+
* by ASCII letters using "camelCase" capitalization.
|
| 42 |
+
*/
|
| 43 |
+
readonly tagName: string;
|
| 44 |
+
/**
|
| 45 |
+
* The TSDoc tag name in all capitals, which is used for performing
|
| 46 |
+
* case-insensitive comparisons or lookups.
|
| 47 |
+
*/
|
| 48 |
+
readonly tagNameWithUpperCase: string;
|
| 49 |
+
/**
|
| 50 |
+
* Specifies the expected syntax for this tag.
|
| 51 |
+
*/
|
| 52 |
+
readonly syntaxKind: TSDocTagSyntaxKind;
|
| 53 |
+
/**
|
| 54 |
+
* Indicates the level of support expected from documentation tools that implement
|
| 55 |
+
* the standard.
|
| 56 |
+
*/
|
| 57 |
+
readonly standardization: Standardization;
|
| 58 |
+
/**
|
| 59 |
+
* If true, then this TSDoc tag may appear multiple times in a doc comment.
|
| 60 |
+
* By default, a tag may only appear once.
|
| 61 |
+
*/
|
| 62 |
+
readonly allowMultiple: boolean;
|
| 63 |
+
constructor(parameters: ITSDocTagDefinitionParameters);
|
| 64 |
+
/**
|
| 65 |
+
* Throws an exception if `tagName` is not a valid TSDoc tag name.
|
| 66 |
+
*/
|
| 67 |
+
static validateTSDocTagName(tagName: string): void;
|
| 68 |
+
}
|
| 69 |
+
//# sourceMappingURL=TSDocTagDefinition.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { StringChecks } from '../parser/StringChecks';
|
| 4 |
+
import { Standardization } from '../details/Standardization';
|
| 5 |
+
/**
|
| 6 |
+
* Determines the type of syntax for a TSDocTagDefinition
|
| 7 |
+
*/
|
| 8 |
+
export var TSDocTagSyntaxKind;
|
| 9 |
+
(function (TSDocTagSyntaxKind) {
|
| 10 |
+
/**
|
| 11 |
+
* The tag is intended to be an inline tag. For example: `{@link}`.
|
| 12 |
+
*/
|
| 13 |
+
TSDocTagSyntaxKind[TSDocTagSyntaxKind["InlineTag"] = 0] = "InlineTag";
|
| 14 |
+
/**
|
| 15 |
+
* The tag is intended to be a block tag that starts a new documentation
|
| 16 |
+
* section. For example: `@remarks`
|
| 17 |
+
*/
|
| 18 |
+
TSDocTagSyntaxKind[TSDocTagSyntaxKind["BlockTag"] = 1] = "BlockTag";
|
| 19 |
+
/**
|
| 20 |
+
* The tag is intended to be a modifier tag whose presence indicates
|
| 21 |
+
* an aspect of the associated API item. For example: `@internal`
|
| 22 |
+
*/
|
| 23 |
+
TSDocTagSyntaxKind[TSDocTagSyntaxKind["ModifierTag"] = 2] = "ModifierTag";
|
| 24 |
+
})(TSDocTagSyntaxKind || (TSDocTagSyntaxKind = {}));
|
| 25 |
+
/**
|
| 26 |
+
* Defines a TSDoc tag that will be understood by the TSDocParser.
|
| 27 |
+
*/
|
| 28 |
+
export class TSDocTagDefinition {
|
| 29 |
+
constructor(parameters) {
|
| 30 |
+
StringChecks.validateTSDocTagName(parameters.tagName);
|
| 31 |
+
this.tagName = parameters.tagName;
|
| 32 |
+
this.tagNameWithUpperCase = parameters.tagName.toUpperCase();
|
| 33 |
+
this.syntaxKind = parameters.syntaxKind;
|
| 34 |
+
this.standardization =
|
| 35 |
+
parameters.standardization || Standardization.None;
|
| 36 |
+
this.allowMultiple = !!parameters.allowMultiple;
|
| 37 |
+
}
|
| 38 |
+
/**
|
| 39 |
+
* Throws an exception if `tagName` is not a valid TSDoc tag name.
|
| 40 |
+
*/
|
| 41 |
+
static validateTSDocTagName(tagName) {
|
| 42 |
+
StringChecks.validateTSDocTagName(tagName);
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
//# sourceMappingURL=TSDocTagDefinition.js.map
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocTagDefinition.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"]}
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Part of the {@link TSDocConfiguration} object.
|
| 3 |
+
*/
|
| 4 |
+
export declare class TSDocValidationConfiguration {
|
| 5 |
+
/**
|
| 6 |
+
* Set `ignoreUndefinedTags` to true to silently ignore unrecognized tags,
|
| 7 |
+
* instead of reporting a warning.
|
| 8 |
+
*
|
| 9 |
+
* @remarks
|
| 10 |
+
* Normally the parser will issue errors when it encounters tag names that do not
|
| 11 |
+
* have a corresponding definition in {@link TSDocConfiguration.tagDefinitions}.
|
| 12 |
+
* This helps to catch common mistakes such as a misspelled tag.
|
| 13 |
+
*
|
| 14 |
+
* @defaultValue `false`
|
| 15 |
+
*/
|
| 16 |
+
ignoreUndefinedTags: boolean;
|
| 17 |
+
/**
|
| 18 |
+
* Set `reportUnsupportedTags` to true to issue a warning for tags that are not
|
| 19 |
+
* supported by your tool.
|
| 20 |
+
*
|
| 21 |
+
* @remarks
|
| 22 |
+
* The TSDoc standard defines may tags. By default it assumes that if your tool does
|
| 23 |
+
* not implement one of these tags, then it will simply ignore it. But sometimes this
|
| 24 |
+
* may be misleading for developers. (For example, they might write an `@example` block
|
| 25 |
+
* and then be surprised if it doesn't appear in the documentation output.).
|
| 26 |
+
*
|
| 27 |
+
* For a better experience, you can tell the parser which tags you support, and then it
|
| 28 |
+
* will issue warnings wherever unsupported tags are used. This is done using
|
| 29 |
+
* {@link TSDocConfiguration.setSupportForTag}. Note that calling that function
|
| 30 |
+
* automatically sets `reportUnsupportedTags` to true.
|
| 31 |
+
*
|
| 32 |
+
* @defaultValue `false`
|
| 33 |
+
*/
|
| 34 |
+
reportUnsupportedTags: boolean;
|
| 35 |
+
/**
|
| 36 |
+
* Set `reportUnsupportedHtmlElements` to true to issue a warning for HTML elements which
|
| 37 |
+
* are not defined in your TSDoc configuration's `supportedHtmlElements` field.
|
| 38 |
+
*
|
| 39 |
+
* @defaultValue `false`
|
| 40 |
+
*/
|
| 41 |
+
reportUnsupportedHtmlElements: boolean;
|
| 42 |
+
}
|
| 43 |
+
//# sourceMappingURL=TSDocValidationConfiguration.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
/**
|
| 4 |
+
* Part of the {@link TSDocConfiguration} object.
|
| 5 |
+
*/
|
| 6 |
+
export class TSDocValidationConfiguration {
|
| 7 |
+
constructor() {
|
| 8 |
+
/**
|
| 9 |
+
* Set `ignoreUndefinedTags` to true to silently ignore unrecognized tags,
|
| 10 |
+
* instead of reporting a warning.
|
| 11 |
+
*
|
| 12 |
+
* @remarks
|
| 13 |
+
* Normally the parser will issue errors when it encounters tag names that do not
|
| 14 |
+
* have a corresponding definition in {@link TSDocConfiguration.tagDefinitions}.
|
| 15 |
+
* This helps to catch common mistakes such as a misspelled tag.
|
| 16 |
+
*
|
| 17 |
+
* @defaultValue `false`
|
| 18 |
+
*/
|
| 19 |
+
this.ignoreUndefinedTags = false;
|
| 20 |
+
/**
|
| 21 |
+
* Set `reportUnsupportedTags` to true to issue a warning for tags that are not
|
| 22 |
+
* supported by your tool.
|
| 23 |
+
*
|
| 24 |
+
* @remarks
|
| 25 |
+
* The TSDoc standard defines may tags. By default it assumes that if your tool does
|
| 26 |
+
* not implement one of these tags, then it will simply ignore it. But sometimes this
|
| 27 |
+
* may be misleading for developers. (For example, they might write an `@example` block
|
| 28 |
+
* and then be surprised if it doesn't appear in the documentation output.).
|
| 29 |
+
*
|
| 30 |
+
* For a better experience, you can tell the parser which tags you support, and then it
|
| 31 |
+
* will issue warnings wherever unsupported tags are used. This is done using
|
| 32 |
+
* {@link TSDocConfiguration.setSupportForTag}. Note that calling that function
|
| 33 |
+
* automatically sets `reportUnsupportedTags` to true.
|
| 34 |
+
*
|
| 35 |
+
* @defaultValue `false`
|
| 36 |
+
*/
|
| 37 |
+
this.reportUnsupportedTags = false;
|
| 38 |
+
/**
|
| 39 |
+
* Set `reportUnsupportedHtmlElements` to true to issue a warning for HTML elements which
|
| 40 |
+
* are not defined in your TSDoc configuration's `supportedHtmlElements` field.
|
| 41 |
+
*
|
| 42 |
+
* @defaultValue `false`
|
| 43 |
+
*/
|
| 44 |
+
this.reportUnsupportedHtmlElements = false;
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
//# sourceMappingURL=TSDocValidationConfiguration.js.map
|
node_modules/@microsoft/tsdoc/lib/configuration/TSDocValidationConfiguration.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"]}
|
node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { DocBlockTag } from '../nodes/DocBlockTag';
|
| 2 |
+
import { type TSDocTagDefinition } from '../configuration/TSDocTagDefinition';
|
| 3 |
+
/**
|
| 4 |
+
* Represents a set of modifier tags that were extracted from a doc comment.
|
| 5 |
+
*
|
| 6 |
+
* @remarks
|
| 7 |
+
* TSDoc modifier tags are block tags that do not have any associated rich text content.
|
| 8 |
+
* Instead, their presence or absence acts as an on/off switch, indicating some aspect
|
| 9 |
+
* of the underlying API item. For example, the `@internal` modifier indicates that a
|
| 10 |
+
* signature is internal (i.e. not part of the public API contract).
|
| 11 |
+
*/
|
| 12 |
+
export declare class ModifierTagSet {
|
| 13 |
+
private readonly _nodes;
|
| 14 |
+
private readonly _nodesByName;
|
| 15 |
+
/**
|
| 16 |
+
* The original block tag nodes that defined the modifiers in this set, excluding duplicates.
|
| 17 |
+
*/
|
| 18 |
+
get nodes(): ReadonlyArray<DocBlockTag>;
|
| 19 |
+
/**
|
| 20 |
+
* Returns true if the set contains a DocBlockTag with the specified tag name.
|
| 21 |
+
* Note that synonyms are not considered. The comparison is case-insensitive.
|
| 22 |
+
* @param modifierTagName - The name of the tag, including the `@` prefix For example, `@internal`
|
| 23 |
+
*/
|
| 24 |
+
hasTagName(modifierTagName: string): boolean;
|
| 25 |
+
/**
|
| 26 |
+
* Returns true if the set contains a DocBlockTag matching the specified tag definition.
|
| 27 |
+
* Note that synonyms are not considered. The comparison is case-insensitive.
|
| 28 |
+
* The TSDocTagDefinition must be a modifier tag.
|
| 29 |
+
* @param tagName - The name of the tag, including the `@` prefix For example, `@internal`
|
| 30 |
+
*/
|
| 31 |
+
hasTag(modifierTagDefinition: TSDocTagDefinition): boolean;
|
| 32 |
+
/**
|
| 33 |
+
* Returns a DocBlockTag matching the specified tag definition, or undefined if no such
|
| 34 |
+
* tag was added to the set. If there were multiple instances, returned object will be
|
| 35 |
+
* the first one to be added.
|
| 36 |
+
*/
|
| 37 |
+
tryGetTag(modifierTagDefinition: TSDocTagDefinition): DocBlockTag | undefined;
|
| 38 |
+
/**
|
| 39 |
+
* Adds a new modifier tag to the set. If a tag already exists with the same name,
|
| 40 |
+
* then no change is made, and the return value is false.
|
| 41 |
+
*/
|
| 42 |
+
addTag(blockTag: DocBlockTag): boolean;
|
| 43 |
+
}
|
| 44 |
+
//# sourceMappingURL=ModifierTagSet.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |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
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { TSDocTagSyntaxKind } from '../configuration/TSDocTagDefinition';
|
| 4 |
+
/**
|
| 5 |
+
* Represents a set of modifier tags that were extracted from a doc comment.
|
| 6 |
+
*
|
| 7 |
+
* @remarks
|
| 8 |
+
* TSDoc modifier tags are block tags that do not have any associated rich text content.
|
| 9 |
+
* Instead, their presence or absence acts as an on/off switch, indicating some aspect
|
| 10 |
+
* of the underlying API item. For example, the `@internal` modifier indicates that a
|
| 11 |
+
* signature is internal (i.e. not part of the public API contract).
|
| 12 |
+
*/
|
| 13 |
+
export class ModifierTagSet {
|
| 14 |
+
constructor() {
|
| 15 |
+
this._nodes = [];
|
| 16 |
+
// NOTE: To implement case insensitivity, the keys in this set are always upper-case.
|
| 17 |
+
// This convention makes the normalization more obvious (and as a general practice handles
|
| 18 |
+
// the Turkish "i" character correctly).
|
| 19 |
+
this._nodesByName = new Map();
|
| 20 |
+
}
|
| 21 |
+
/**
|
| 22 |
+
* The original block tag nodes that defined the modifiers in this set, excluding duplicates.
|
| 23 |
+
*/
|
| 24 |
+
get nodes() {
|
| 25 |
+
return this._nodes;
|
| 26 |
+
}
|
| 27 |
+
/**
|
| 28 |
+
* Returns true if the set contains a DocBlockTag with the specified tag name.
|
| 29 |
+
* Note that synonyms are not considered. The comparison is case-insensitive.
|
| 30 |
+
* @param modifierTagName - The name of the tag, including the `@` prefix For example, `@internal`
|
| 31 |
+
*/
|
| 32 |
+
hasTagName(modifierTagName) {
|
| 33 |
+
return this._nodesByName.has(modifierTagName.toUpperCase());
|
| 34 |
+
}
|
| 35 |
+
/**
|
| 36 |
+
* Returns true if the set contains a DocBlockTag matching the specified tag definition.
|
| 37 |
+
* Note that synonyms are not considered. The comparison is case-insensitive.
|
| 38 |
+
* The TSDocTagDefinition must be a modifier tag.
|
| 39 |
+
* @param tagName - The name of the tag, including the `@` prefix For example, `@internal`
|
| 40 |
+
*/
|
| 41 |
+
hasTag(modifierTagDefinition) {
|
| 42 |
+
return !!this.tryGetTag(modifierTagDefinition);
|
| 43 |
+
}
|
| 44 |
+
/**
|
| 45 |
+
* Returns a DocBlockTag matching the specified tag definition, or undefined if no such
|
| 46 |
+
* tag was added to the set. If there were multiple instances, returned object will be
|
| 47 |
+
* the first one to be added.
|
| 48 |
+
*/
|
| 49 |
+
tryGetTag(modifierTagDefinition) {
|
| 50 |
+
if (modifierTagDefinition.syntaxKind !== TSDocTagSyntaxKind.ModifierTag) {
|
| 51 |
+
throw new Error('The tag definition is not a modifier tag');
|
| 52 |
+
}
|
| 53 |
+
return this._nodesByName.get(modifierTagDefinition.tagNameWithUpperCase);
|
| 54 |
+
}
|
| 55 |
+
/**
|
| 56 |
+
* Adds a new modifier tag to the set. If a tag already exists with the same name,
|
| 57 |
+
* then no change is made, and the return value is false.
|
| 58 |
+
*/
|
| 59 |
+
addTag(blockTag) {
|
| 60 |
+
if (this._nodesByName.has(blockTag.tagNameWithUpperCase)) {
|
| 61 |
+
return false;
|
| 62 |
+
}
|
| 63 |
+
this._nodesByName.set(blockTag.tagNameWithUpperCase, blockTag);
|
| 64 |
+
this._nodes.push(blockTag);
|
| 65 |
+
return true;
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
//# sourceMappingURL=ModifierTagSet.js.map
|
node_modules/@microsoft/tsdoc/lib/details/ModifierTagSet.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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<string, DocBlockTag> = new Map<string, DocBlockTag>();\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<DocBlockTag> {\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"]}
|
node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { ModifierTagSet } from './ModifierTagSet';
|
| 2 |
+
/**
|
| 3 |
+
* Extends the ModifierTagSet base class with getters for modifiers that
|
| 4 |
+
* are part of the standardized core tags for TSDoc.
|
| 5 |
+
*/
|
| 6 |
+
export declare class StandardModifierTagSet extends ModifierTagSet {
|
| 7 |
+
/**
|
| 8 |
+
* Returns true if the `@alpha` modifier tag was specified.
|
| 9 |
+
*/
|
| 10 |
+
isAlpha(): boolean;
|
| 11 |
+
/**
|
| 12 |
+
* Returns true if the `@beta` modifier tag was specified.
|
| 13 |
+
*/
|
| 14 |
+
isBeta(): boolean;
|
| 15 |
+
/**
|
| 16 |
+
* Returns true if the `@eventProperty` modifier tag was specified.
|
| 17 |
+
*/
|
| 18 |
+
isEventProperty(): boolean;
|
| 19 |
+
/**
|
| 20 |
+
* Returns true if the `@experimental` modifier tag was specified.
|
| 21 |
+
*/
|
| 22 |
+
isExperimental(): boolean;
|
| 23 |
+
/**
|
| 24 |
+
* Returns true if the `@internal` modifier tag was specified.
|
| 25 |
+
*/
|
| 26 |
+
isInternal(): boolean;
|
| 27 |
+
/**
|
| 28 |
+
* Returns true if the `@override` modifier tag was specified.
|
| 29 |
+
*/
|
| 30 |
+
isOverride(): boolean;
|
| 31 |
+
/**
|
| 32 |
+
* Returns true if the `@packageDocumentation` modifier tag was specified.
|
| 33 |
+
*/
|
| 34 |
+
isPackageDocumentation(): boolean;
|
| 35 |
+
/**
|
| 36 |
+
* Returns true if the `@public` modifier tag was specified.
|
| 37 |
+
*/
|
| 38 |
+
isPublic(): boolean;
|
| 39 |
+
/**
|
| 40 |
+
* Returns true if the `@readonly` modifier tag was specified.
|
| 41 |
+
*/
|
| 42 |
+
isReadonly(): boolean;
|
| 43 |
+
/**
|
| 44 |
+
* Returns true if the `@sealed` modifier tag was specified.
|
| 45 |
+
*/
|
| 46 |
+
isSealed(): boolean;
|
| 47 |
+
/**
|
| 48 |
+
* Returns true if the `@virtual` modifier tag was specified.
|
| 49 |
+
*/
|
| 50 |
+
isVirtual(): boolean;
|
| 51 |
+
}
|
| 52 |
+
//# sourceMappingURL=StandardModifierTagSet.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { ModifierTagSet } from './ModifierTagSet';
|
| 4 |
+
import { StandardTags } from './StandardTags';
|
| 5 |
+
/**
|
| 6 |
+
* Extends the ModifierTagSet base class with getters for modifiers that
|
| 7 |
+
* are part of the standardized core tags for TSDoc.
|
| 8 |
+
*/
|
| 9 |
+
export class StandardModifierTagSet extends ModifierTagSet {
|
| 10 |
+
/**
|
| 11 |
+
* Returns true if the `@alpha` modifier tag was specified.
|
| 12 |
+
*/
|
| 13 |
+
isAlpha() {
|
| 14 |
+
return this.hasTag(StandardTags.alpha);
|
| 15 |
+
}
|
| 16 |
+
/**
|
| 17 |
+
* Returns true if the `@beta` modifier tag was specified.
|
| 18 |
+
*/
|
| 19 |
+
isBeta() {
|
| 20 |
+
return this.hasTag(StandardTags.beta);
|
| 21 |
+
}
|
| 22 |
+
/**
|
| 23 |
+
* Returns true if the `@eventProperty` modifier tag was specified.
|
| 24 |
+
*/
|
| 25 |
+
isEventProperty() {
|
| 26 |
+
return this.hasTag(StandardTags.eventProperty);
|
| 27 |
+
}
|
| 28 |
+
/**
|
| 29 |
+
* Returns true if the `@experimental` modifier tag was specified.
|
| 30 |
+
*/
|
| 31 |
+
isExperimental() {
|
| 32 |
+
return this.hasTag(StandardTags.experimental);
|
| 33 |
+
}
|
| 34 |
+
/**
|
| 35 |
+
* Returns true if the `@internal` modifier tag was specified.
|
| 36 |
+
*/
|
| 37 |
+
isInternal() {
|
| 38 |
+
return this.hasTag(StandardTags.internal);
|
| 39 |
+
}
|
| 40 |
+
/**
|
| 41 |
+
* Returns true if the `@override` modifier tag was specified.
|
| 42 |
+
*/
|
| 43 |
+
isOverride() {
|
| 44 |
+
return this.hasTag(StandardTags.override);
|
| 45 |
+
}
|
| 46 |
+
/**
|
| 47 |
+
* Returns true if the `@packageDocumentation` modifier tag was specified.
|
| 48 |
+
*/
|
| 49 |
+
isPackageDocumentation() {
|
| 50 |
+
return this.hasTag(StandardTags.packageDocumentation);
|
| 51 |
+
}
|
| 52 |
+
/**
|
| 53 |
+
* Returns true if the `@public` modifier tag was specified.
|
| 54 |
+
*/
|
| 55 |
+
isPublic() {
|
| 56 |
+
return this.hasTag(StandardTags.public);
|
| 57 |
+
}
|
| 58 |
+
/**
|
| 59 |
+
* Returns true if the `@readonly` modifier tag was specified.
|
| 60 |
+
*/
|
| 61 |
+
isReadonly() {
|
| 62 |
+
return this.hasTag(StandardTags.readonly);
|
| 63 |
+
}
|
| 64 |
+
/**
|
| 65 |
+
* Returns true if the `@sealed` modifier tag was specified.
|
| 66 |
+
*/
|
| 67 |
+
isSealed() {
|
| 68 |
+
return this.hasTag(StandardTags.sealed);
|
| 69 |
+
}
|
| 70 |
+
/**
|
| 71 |
+
* Returns true if the `@virtual` modifier tag was specified.
|
| 72 |
+
*/
|
| 73 |
+
isVirtual() {
|
| 74 |
+
return this.hasTag(StandardTags.virtual);
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
//# sourceMappingURL=StandardModifierTagSet.js.map
|
node_modules/@microsoft/tsdoc/lib/details/StandardModifierTagSet.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"]}
|
node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { TSDocTagDefinition } from '../configuration/TSDocTagDefinition';
|
| 2 |
+
/**
|
| 3 |
+
* Tags whose meaning is defined by the TSDoc standard.
|
| 4 |
+
*/
|
| 5 |
+
export declare class StandardTags {
|
| 6 |
+
/**
|
| 7 |
+
* (Discretionary)
|
| 8 |
+
*
|
| 9 |
+
* Suggested meaning: Designates that an API item's release stage is "alpha".
|
| 10 |
+
* It is intended to be used by third-party developers eventually, but has not
|
| 11 |
+
* yet been released. The tooling may trim the declaration from a public release.
|
| 12 |
+
*
|
| 13 |
+
* @remarks
|
| 14 |
+
* Example implementations: API Extractor
|
| 15 |
+
*/
|
| 16 |
+
static readonly alpha: TSDocTagDefinition;
|
| 17 |
+
/**
|
| 18 |
+
* (Discretionary)
|
| 19 |
+
*
|
| 20 |
+
* Suggested meaning: Designates that an API item's release stage is "beta".
|
| 21 |
+
* It has been released to third-party developers experimentally for the purpose of
|
| 22 |
+
* collecting feedback. The API should not be used in production, because its contract may
|
| 23 |
+
* change without notice. The tooling may trim the declaration from a public release,
|
| 24 |
+
* but may include it in a developer preview release.
|
| 25 |
+
*
|
| 26 |
+
* @remarks
|
| 27 |
+
* Example implementations: API Extractor
|
| 28 |
+
*
|
| 29 |
+
* Synonyms: `@experimental`
|
| 30 |
+
*/
|
| 31 |
+
static readonly beta: TSDocTagDefinition;
|
| 32 |
+
/**
|
| 33 |
+
* (Extended)
|
| 34 |
+
*
|
| 35 |
+
* ECMAScript decorators are sometimes an important part of an API contract.
|
| 36 |
+
* However, today the TypeScript compiler does not represent decorators in the
|
| 37 |
+
* .d.ts output files used by API consumers. The `@decorator` tag provides a workaround,
|
| 38 |
+
* enabling a decorator expressions to be quoted in a doc comment.
|
| 39 |
+
*
|
| 40 |
+
* @example
|
| 41 |
+
* ```ts
|
| 42 |
+
* class Book {
|
| 43 |
+
* /**
|
| 44 |
+
* * The title of the book.
|
| 45 |
+
* * @decorator `@jsonSerialized`
|
| 46 |
+
* * @decorator `@jsonFormat(JsonFormats.Url)`
|
| 47 |
+
* *
|
| 48 |
+
*+/
|
| 49 |
+
* @jsonSerialized
|
| 50 |
+
* @jsonFormat(JsonFormats.Url)
|
| 51 |
+
* public website: string;
|
| 52 |
+
* }
|
| 53 |
+
* ```
|
| 54 |
+
*/
|
| 55 |
+
static readonly decorator: TSDocTagDefinition;
|
| 56 |
+
/**
|
| 57 |
+
* (Extended)
|
| 58 |
+
*
|
| 59 |
+
* This block tag is used to document the default value for a field or property,
|
| 60 |
+
* if a value is not assigned explicitly.
|
| 61 |
+
*
|
| 62 |
+
* @remarks
|
| 63 |
+
* This tag should only be used with fields or properties that are members of a class or interface.
|
| 64 |
+
*/
|
| 65 |
+
static readonly defaultValue: TSDocTagDefinition;
|
| 66 |
+
/**
|
| 67 |
+
* (Core)
|
| 68 |
+
*
|
| 69 |
+
* This block tag communicates that an API item is no longer supported and may be removed
|
| 70 |
+
* in a future release. The `@deprecated` tag is followed by a sentence describing
|
| 71 |
+
* the recommended alternative. It recursively applies to members of the container.
|
| 72 |
+
* For example, if a class is deprecated, then so are all of its members.
|
| 73 |
+
*/
|
| 74 |
+
static readonly deprecated: TSDocTagDefinition;
|
| 75 |
+
/**
|
| 76 |
+
* (Extended)
|
| 77 |
+
*
|
| 78 |
+
* When applied to a class or interface property, this indicates that the property
|
| 79 |
+
* returns an event object that event handlers can be attached to. The event-handling
|
| 80 |
+
* API is implementation-defined, but typically the property return type would be a class
|
| 81 |
+
* with members such as `addHandler()` and `removeHandler()`. A documentation tool can
|
| 82 |
+
* display such properties under an "Events" heading instead of the usual "Properties" heading.
|
| 83 |
+
*/
|
| 84 |
+
static readonly eventProperty: TSDocTagDefinition;
|
| 85 |
+
/**
|
| 86 |
+
* (Extended)
|
| 87 |
+
*
|
| 88 |
+
* Indicates a documentation section that should be presented as an example
|
| 89 |
+
* illustrating how to use the API. It may include a code sample.
|
| 90 |
+
*/
|
| 91 |
+
static readonly example: TSDocTagDefinition;
|
| 92 |
+
/**
|
| 93 |
+
* (Discretionary)
|
| 94 |
+
*
|
| 95 |
+
* Suggested meaning: Same semantics as `@beta`, but used by tools that don't support
|
| 96 |
+
* an `@alpha` release stage.
|
| 97 |
+
*
|
| 98 |
+
* @remarks
|
| 99 |
+
* Example implementations: Angular API documenter
|
| 100 |
+
*
|
| 101 |
+
* Synonyms: `@beta`
|
| 102 |
+
*/
|
| 103 |
+
static readonly experimental: TSDocTagDefinition;
|
| 104 |
+
/**
|
| 105 |
+
* (Extended)
|
| 106 |
+
*
|
| 107 |
+
* This inline tag is used to automatically generate an API item's documentation by
|
| 108 |
+
* copying it from another API item. The inline tag parameter contains a reference
|
| 109 |
+
* to the other item, which may be an unrelated class, or even an import from a
|
| 110 |
+
* separate NPM package.
|
| 111 |
+
*
|
| 112 |
+
* @remarks
|
| 113 |
+
* What gets copied
|
| 114 |
+
*
|
| 115 |
+
* The `@inheritDoc` tag does not copy the entire comment body. Only the following
|
| 116 |
+
* components are copied:
|
| 117 |
+
* - summary section
|
| 118 |
+
* - `@remarks` block
|
| 119 |
+
* - `@params` blocks
|
| 120 |
+
* - `@typeParam` blocks
|
| 121 |
+
* - `@returns` block
|
| 122 |
+
* Other tags such as `@defaultValue` or `@example` are not copied, and need to be
|
| 123 |
+
* explicitly included after the `@inheritDoc` tag.
|
| 124 |
+
*
|
| 125 |
+
* TODO: The notation for API item references is still being standardized. See this issue:
|
| 126 |
+
* https://github.com/microsoft/tsdoc/issues/9
|
| 127 |
+
*/
|
| 128 |
+
static readonly inheritDoc: TSDocTagDefinition;
|
| 129 |
+
/**
|
| 130 |
+
* (Discretionary)
|
| 131 |
+
*
|
| 132 |
+
* Suggested meaning: Designates that an API item is not planned to be used by
|
| 133 |
+
* third-party developers. The tooling may trim the declaration from a public release.
|
| 134 |
+
* In some implementations, certain designated packages may be allowed to consume
|
| 135 |
+
* internal API items, e.g. because the packages are components of the same product.
|
| 136 |
+
*
|
| 137 |
+
* @remarks
|
| 138 |
+
* Example implementations: API Extractor
|
| 139 |
+
*/
|
| 140 |
+
static readonly internal: TSDocTagDefinition;
|
| 141 |
+
/**
|
| 142 |
+
* (Core)
|
| 143 |
+
*
|
| 144 |
+
* The `{@label}` inline tag is used to label a declaration, so that it can be referenced
|
| 145 |
+
* using a selector in the TSDoc declaration reference notation.
|
| 146 |
+
*
|
| 147 |
+
* @remarks
|
| 148 |
+
* TODO: The `{@label}` notation is still being standardized. See this issue:
|
| 149 |
+
* https://github.com/microsoft/tsdoc/issues/9
|
| 150 |
+
*/
|
| 151 |
+
static readonly label: TSDocTagDefinition;
|
| 152 |
+
/**
|
| 153 |
+
* (Core)
|
| 154 |
+
*
|
| 155 |
+
* The `{@link}` inline tag is used to create hyperlinks to other pages in a
|
| 156 |
+
* documentation system or general internet URLs. In particular, it supports
|
| 157 |
+
* expressions for referencing API items.
|
| 158 |
+
*
|
| 159 |
+
* @remarks
|
| 160 |
+
* TODO: The `{@link}` notation is still being standardized. See this issue:
|
| 161 |
+
* https://github.com/microsoft/tsdoc/issues/9
|
| 162 |
+
*/
|
| 163 |
+
static readonly link: TSDocTagDefinition;
|
| 164 |
+
/**
|
| 165 |
+
* (Extended)
|
| 166 |
+
*
|
| 167 |
+
* This modifier has similar semantics to the `override` keyword in C# or Java.
|
| 168 |
+
* For a member function or property, explicitly indicates that this definition
|
| 169 |
+
* is overriding (i.e. redefining) the definition inherited from the base class.
|
| 170 |
+
* The base class definition would normally be marked as `virtual`.
|
| 171 |
+
*
|
| 172 |
+
* @remarks
|
| 173 |
+
* A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`
|
| 174 |
+
* modifiers are consistently applied, but this is not required by the TSDoc standard.
|
| 175 |
+
*/
|
| 176 |
+
static readonly override: TSDocTagDefinition;
|
| 177 |
+
/**
|
| 178 |
+
* (Core)
|
| 179 |
+
*
|
| 180 |
+
* Used to indicate a doc comment that describes an entire NPM package (as opposed
|
| 181 |
+
* to an individual API item belonging to that package). The `@packageDocumentation` comment
|
| 182 |
+
* is found in the *.d.ts file that acts as the entry point for the package, and it
|
| 183 |
+
* should be the first `/**` comment encountered in that file. A comment containing a
|
| 184 |
+
* `@packageDocumentation` tag should never be used to describe an individual API item.
|
| 185 |
+
*/
|
| 186 |
+
static readonly packageDocumentation: TSDocTagDefinition;
|
| 187 |
+
/**
|
| 188 |
+
* (Core)
|
| 189 |
+
*
|
| 190 |
+
* Used to document a function parameter. The `@param` tag is followed by a parameter
|
| 191 |
+
* name, followed by a hyphen, followed by a description. The TSDoc parser recognizes
|
| 192 |
+
* this syntax and will extract it into a DocParamBlock node.
|
| 193 |
+
*/
|
| 194 |
+
static readonly param: TSDocTagDefinition;
|
| 195 |
+
/**
|
| 196 |
+
* (Core)
|
| 197 |
+
*
|
| 198 |
+
* Starts a section of additional documentation content that is not intended for a
|
| 199 |
+
* public audience. A tool must omit this entire section from the API reference web site,
|
| 200 |
+
* generated *.d.ts file, and any other outputs incorporating the content.
|
| 201 |
+
*/
|
| 202 |
+
static readonly privateRemarks: TSDocTagDefinition;
|
| 203 |
+
/**
|
| 204 |
+
* (Discretionary)
|
| 205 |
+
*
|
| 206 |
+
* Suggested meaning: Designates that an API item's release stage is "public".
|
| 207 |
+
* It has been officially released to third-party developers, and its signature is
|
| 208 |
+
* guaranteed to be stable (e.g. following Semantic Versioning rules).
|
| 209 |
+
*
|
| 210 |
+
* @remarks
|
| 211 |
+
* Example implementations: API Extractor
|
| 212 |
+
*/
|
| 213 |
+
static readonly public: TSDocTagDefinition;
|
| 214 |
+
/**
|
| 215 |
+
* (Extended)
|
| 216 |
+
*
|
| 217 |
+
* This modifier tag indicates that an API item should be documented as being read-only,
|
| 218 |
+
* even if the TypeScript type system may indicate otherwise. For example, suppose a
|
| 219 |
+
* class property has a setter function that always throws an exception explaining that
|
| 220 |
+
* the property cannot be assigned; in this situation, the `@readonly` modifier can be
|
| 221 |
+
* added so that the property is shown as read-only in the documentation.
|
| 222 |
+
*
|
| 223 |
+
* @remarks
|
| 224 |
+
* Example implementations: API Extractor
|
| 225 |
+
*/
|
| 226 |
+
static readonly readonly: TSDocTagDefinition;
|
| 227 |
+
/**
|
| 228 |
+
* (Core)
|
| 229 |
+
*
|
| 230 |
+
* The main documentation for an API item is separated into a brief "summary" section,
|
| 231 |
+
* optionally followed by a more detailed "remarks" section. On a documentation web site,
|
| 232 |
+
* index pages (e.g. showing members of a class) will show only the brief summaries,
|
| 233 |
+
* whereas a detail pages (e.g. describing a single member) will show the summary followed
|
| 234 |
+
* by the remarks. The `@remarks` block tag ends the summary section, and begins the
|
| 235 |
+
* remarks section for a doc comment.
|
| 236 |
+
*/
|
| 237 |
+
static readonly remarks: TSDocTagDefinition;
|
| 238 |
+
/**
|
| 239 |
+
* (Core)
|
| 240 |
+
*
|
| 241 |
+
* Used to document the return value for a function.
|
| 242 |
+
*/
|
| 243 |
+
static readonly returns: TSDocTagDefinition;
|
| 244 |
+
/**
|
| 245 |
+
* (Extended)
|
| 246 |
+
*
|
| 247 |
+
* This modifier has similar semantics to the `sealed` keyword in C# or Java.
|
| 248 |
+
* For a class, indicates that subclasses must not inherit from the class.
|
| 249 |
+
* For a member function or property, indicates that subclasses must not override
|
| 250 |
+
* (i.e. redefine) the member.
|
| 251 |
+
*
|
| 252 |
+
* @remarks
|
| 253 |
+
* A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`
|
| 254 |
+
* modifiers are consistently applied, but this is not required by the TSDoc standard.
|
| 255 |
+
*/
|
| 256 |
+
static readonly sealed: TSDocTagDefinition;
|
| 257 |
+
/**
|
| 258 |
+
* (Extended)
|
| 259 |
+
*
|
| 260 |
+
* Used to build a list of references to an API item or other resource that may be related to the
|
| 261 |
+
* current item.
|
| 262 |
+
*
|
| 263 |
+
* @remarks
|
| 264 |
+
*
|
| 265 |
+
* For example:
|
| 266 |
+
*
|
| 267 |
+
* ```ts
|
| 268 |
+
* /**
|
| 269 |
+
* * Parses a string containing a Uniform Resource Locator (URL).
|
| 270 |
+
* * @see {@link ParsedUrl} for the returned data structure
|
| 271 |
+
* * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738}
|
| 272 |
+
* * for syntax
|
| 273 |
+
* * @see your developer SDK for code samples
|
| 274 |
+
* * @param url - the string to be parsed
|
| 275 |
+
* * @returns the parsed result
|
| 276 |
+
* */
|
| 277 |
+
* function parseURL(url: string): ParsedUrl;
|
| 278 |
+
* ```
|
| 279 |
+
*
|
| 280 |
+
* `@see` is a block tag. Each block becomes an item in the list of references. For example, a documentation
|
| 281 |
+
* system might render the above blocks as follows:
|
| 282 |
+
*
|
| 283 |
+
* ```markdown
|
| 284 |
+
* `function parseURL(url: string): ParsedUrl;`
|
| 285 |
+
*
|
| 286 |
+
* Parses a string containing a Uniform Resource Locator (URL).
|
| 287 |
+
*
|
| 288 |
+
* ## See Also
|
| 289 |
+
* - ParsedUrl for the returned data structure
|
| 290 |
+
* - RFC 1738 for syntax
|
| 291 |
+
* - your developer SDK for code samples
|
| 292 |
+
* ```
|
| 293 |
+
*
|
| 294 |
+
* NOTE: JSDoc attempts to automatically hyperlink the text immediately after `@see`. Because this is ambiguous
|
| 295 |
+
* with plain text, TSDoc instead requires an explicit `{@link}` tag to make hyperlinks.
|
| 296 |
+
*/
|
| 297 |
+
static readonly see: TSDocTagDefinition;
|
| 298 |
+
/**
|
| 299 |
+
* (Extended)
|
| 300 |
+
*
|
| 301 |
+
* Used to document an exception type that may be thrown by a function or property.
|
| 302 |
+
*
|
| 303 |
+
* @remarks
|
| 304 |
+
*
|
| 305 |
+
* A separate `@throws` block should be used to document each exception type. This tag is for informational
|
| 306 |
+
* purposes only, and does not restrict other types from being thrown. It is suggested, but not required,
|
| 307 |
+
* for the `@throws` block to start with a line containing only the name of the exception.
|
| 308 |
+
*
|
| 309 |
+
* For example:
|
| 310 |
+
*
|
| 311 |
+
* ```ts
|
| 312 |
+
* /**
|
| 313 |
+
* * Retrieves metadata about a book from the catalog.
|
| 314 |
+
* *
|
| 315 |
+
* * @param isbnCode - the ISBN number for the book
|
| 316 |
+
* * @returns the retrieved book object
|
| 317 |
+
* *
|
| 318 |
+
* * @throws {@link IsbnSyntaxError}
|
| 319 |
+
* * This exception is thrown if the input is not a valid ISBN number.
|
| 320 |
+
* *
|
| 321 |
+
* * @throws {@link book-lib#BookNotFoundError}
|
| 322 |
+
* * Thrown if the ISBN number is valid, but no such book exists in the catalog.
|
| 323 |
+
* *
|
| 324 |
+
* * @public
|
| 325 |
+
* */
|
| 326 |
+
* function fetchBookByIsbn(isbnCode: string): Book;
|
| 327 |
+
* ```
|
| 328 |
+
*/
|
| 329 |
+
static readonly throws: TSDocTagDefinition;
|
| 330 |
+
/**
|
| 331 |
+
* (Core)
|
| 332 |
+
*
|
| 333 |
+
* Used to document a generic parameter. The `@typeParam` tag is followed by a parameter
|
| 334 |
+
* name, followed by a hyphen, followed by a description. The TSDoc parser recognizes
|
| 335 |
+
* this syntax and will extract it into a DocParamBlock node.
|
| 336 |
+
*/
|
| 337 |
+
static readonly typeParam: TSDocTagDefinition;
|
| 338 |
+
/**
|
| 339 |
+
* (Extended)
|
| 340 |
+
*
|
| 341 |
+
* This modifier has similar semantics to the `virtual` keyword in C# or Java.
|
| 342 |
+
* For a member function or property, explicitly indicates that subclasses may override
|
| 343 |
+
* (i.e. redefine) the member.
|
| 344 |
+
*
|
| 345 |
+
* @remarks
|
| 346 |
+
* A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`
|
| 347 |
+
* modifiers are consistently applied, but this is not required by the TSDoc standard.
|
| 348 |
+
*/
|
| 349 |
+
static readonly virtual: TSDocTagDefinition;
|
| 350 |
+
/**
|
| 351 |
+
* (Extended)
|
| 352 |
+
*
|
| 353 |
+
* Used to specify the JSX factory function to use when compiling JSX syntax.
|
| 354 |
+
*
|
| 355 |
+
* @remarks
|
| 356 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 357 |
+
*
|
| 358 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 359 |
+
*/
|
| 360 |
+
static readonly jsx: TSDocTagDefinition;
|
| 361 |
+
/**
|
| 362 |
+
* (Extended)
|
| 363 |
+
*
|
| 364 |
+
* Used to specify the JSX runtime to use when compiling JSX syntax.
|
| 365 |
+
*
|
| 366 |
+
* @remarks
|
| 367 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 368 |
+
*
|
| 369 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 370 |
+
*/
|
| 371 |
+
static readonly jsxRuntime: TSDocTagDefinition;
|
| 372 |
+
/**
|
| 373 |
+
* (Extended)
|
| 374 |
+
*
|
| 375 |
+
* Used to specify the JSX fragment factory to use when compiling JSX syntax.
|
| 376 |
+
*
|
| 377 |
+
* @remarks
|
| 378 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 379 |
+
*
|
| 380 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 381 |
+
*/
|
| 382 |
+
static readonly jsxFrag: TSDocTagDefinition;
|
| 383 |
+
/**
|
| 384 |
+
* (Extended)
|
| 385 |
+
*
|
| 386 |
+
* Used to specify the JSX import source when compiling JSX syntax.
|
| 387 |
+
*
|
| 388 |
+
* @remarks
|
| 389 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 390 |
+
*
|
| 391 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 392 |
+
*/
|
| 393 |
+
static readonly jsxImportSource: TSDocTagDefinition;
|
| 394 |
+
/**
|
| 395 |
+
* Returns the full list of all core tags.
|
| 396 |
+
*/
|
| 397 |
+
static allDefinitions: ReadonlyArray<TSDocTagDefinition>;
|
| 398 |
+
private static _defineTag;
|
| 399 |
+
}
|
| 400 |
+
//# sourceMappingURL=StandardTags.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/details/StandardTags.d.ts.map
ADDED
|
@@ -0,0 +1 @@
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { TSDocTagDefinition, TSDocTagSyntaxKind } from '../configuration/TSDocTagDefinition';
|
| 4 |
+
import { Standardization } from './Standardization';
|
| 5 |
+
/**
|
| 6 |
+
* Tags whose meaning is defined by the TSDoc standard.
|
| 7 |
+
*/
|
| 8 |
+
export class StandardTags {
|
| 9 |
+
static _defineTag(parameters) {
|
| 10 |
+
return new TSDocTagDefinition(parameters);
|
| 11 |
+
}
|
| 12 |
+
}
|
| 13 |
+
/**
|
| 14 |
+
* (Discretionary)
|
| 15 |
+
*
|
| 16 |
+
* Suggested meaning: Designates that an API item's release stage is "alpha".
|
| 17 |
+
* It is intended to be used by third-party developers eventually, but has not
|
| 18 |
+
* yet been released. The tooling may trim the declaration from a public release.
|
| 19 |
+
*
|
| 20 |
+
* @remarks
|
| 21 |
+
* Example implementations: API Extractor
|
| 22 |
+
*/
|
| 23 |
+
StandardTags.alpha = StandardTags._defineTag({
|
| 24 |
+
tagName: '@alpha',
|
| 25 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 26 |
+
standardization: Standardization.Discretionary
|
| 27 |
+
});
|
| 28 |
+
/**
|
| 29 |
+
* (Discretionary)
|
| 30 |
+
*
|
| 31 |
+
* Suggested meaning: Designates that an API item's release stage is "beta".
|
| 32 |
+
* It has been released to third-party developers experimentally for the purpose of
|
| 33 |
+
* collecting feedback. The API should not be used in production, because its contract may
|
| 34 |
+
* change without notice. The tooling may trim the declaration from a public release,
|
| 35 |
+
* but may include it in a developer preview release.
|
| 36 |
+
*
|
| 37 |
+
* @remarks
|
| 38 |
+
* Example implementations: API Extractor
|
| 39 |
+
*
|
| 40 |
+
* Synonyms: `@experimental`
|
| 41 |
+
*/
|
| 42 |
+
StandardTags.beta = StandardTags._defineTag({
|
| 43 |
+
tagName: '@beta',
|
| 44 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 45 |
+
standardization: Standardization.Discretionary
|
| 46 |
+
});
|
| 47 |
+
/**
|
| 48 |
+
* (Extended)
|
| 49 |
+
*
|
| 50 |
+
* ECMAScript decorators are sometimes an important part of an API contract.
|
| 51 |
+
* However, today the TypeScript compiler does not represent decorators in the
|
| 52 |
+
* .d.ts output files used by API consumers. The `@decorator` tag provides a workaround,
|
| 53 |
+
* enabling a decorator expressions to be quoted in a doc comment.
|
| 54 |
+
*
|
| 55 |
+
* @example
|
| 56 |
+
* ```ts
|
| 57 |
+
* class Book {
|
| 58 |
+
* /**
|
| 59 |
+
* * The title of the book.
|
| 60 |
+
* * @decorator `@jsonSerialized`
|
| 61 |
+
* * @decorator `@jsonFormat(JsonFormats.Url)`
|
| 62 |
+
* *
|
| 63 |
+
*+/
|
| 64 |
+
* @jsonSerialized
|
| 65 |
+
* @jsonFormat(JsonFormats.Url)
|
| 66 |
+
* public website: string;
|
| 67 |
+
* }
|
| 68 |
+
* ```
|
| 69 |
+
*/
|
| 70 |
+
StandardTags.decorator = StandardTags._defineTag({
|
| 71 |
+
tagName: '@decorator',
|
| 72 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 73 |
+
allowMultiple: true,
|
| 74 |
+
standardization: Standardization.Extended
|
| 75 |
+
});
|
| 76 |
+
/**
|
| 77 |
+
* (Extended)
|
| 78 |
+
*
|
| 79 |
+
* This block tag is used to document the default value for a field or property,
|
| 80 |
+
* if a value is not assigned explicitly.
|
| 81 |
+
*
|
| 82 |
+
* @remarks
|
| 83 |
+
* This tag should only be used with fields or properties that are members of a class or interface.
|
| 84 |
+
*/
|
| 85 |
+
StandardTags.defaultValue = StandardTags._defineTag({
|
| 86 |
+
tagName: '@defaultValue',
|
| 87 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 88 |
+
standardization: Standardization.Extended
|
| 89 |
+
});
|
| 90 |
+
/**
|
| 91 |
+
* (Core)
|
| 92 |
+
*
|
| 93 |
+
* This block tag communicates that an API item is no longer supported and may be removed
|
| 94 |
+
* in a future release. The `@deprecated` tag is followed by a sentence describing
|
| 95 |
+
* the recommended alternative. It recursively applies to members of the container.
|
| 96 |
+
* For example, if a class is deprecated, then so are all of its members.
|
| 97 |
+
*/
|
| 98 |
+
StandardTags.deprecated = StandardTags._defineTag({
|
| 99 |
+
tagName: '@deprecated',
|
| 100 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 101 |
+
standardization: Standardization.Core
|
| 102 |
+
});
|
| 103 |
+
/**
|
| 104 |
+
* (Extended)
|
| 105 |
+
*
|
| 106 |
+
* When applied to a class or interface property, this indicates that the property
|
| 107 |
+
* returns an event object that event handlers can be attached to. The event-handling
|
| 108 |
+
* API is implementation-defined, but typically the property return type would be a class
|
| 109 |
+
* with members such as `addHandler()` and `removeHandler()`. A documentation tool can
|
| 110 |
+
* display such properties under an "Events" heading instead of the usual "Properties" heading.
|
| 111 |
+
*/
|
| 112 |
+
StandardTags.eventProperty = StandardTags._defineTag({
|
| 113 |
+
tagName: '@eventProperty',
|
| 114 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 115 |
+
standardization: Standardization.Extended
|
| 116 |
+
});
|
| 117 |
+
/**
|
| 118 |
+
* (Extended)
|
| 119 |
+
*
|
| 120 |
+
* Indicates a documentation section that should be presented as an example
|
| 121 |
+
* illustrating how to use the API. It may include a code sample.
|
| 122 |
+
*/
|
| 123 |
+
StandardTags.example = StandardTags._defineTag({
|
| 124 |
+
tagName: '@example',
|
| 125 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 126 |
+
allowMultiple: true,
|
| 127 |
+
standardization: Standardization.Extended
|
| 128 |
+
});
|
| 129 |
+
/**
|
| 130 |
+
* (Discretionary)
|
| 131 |
+
*
|
| 132 |
+
* Suggested meaning: Same semantics as `@beta`, but used by tools that don't support
|
| 133 |
+
* an `@alpha` release stage.
|
| 134 |
+
*
|
| 135 |
+
* @remarks
|
| 136 |
+
* Example implementations: Angular API documenter
|
| 137 |
+
*
|
| 138 |
+
* Synonyms: `@beta`
|
| 139 |
+
*/
|
| 140 |
+
StandardTags.experimental = StandardTags._defineTag({
|
| 141 |
+
tagName: '@experimental',
|
| 142 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 143 |
+
standardization: Standardization.Discretionary
|
| 144 |
+
});
|
| 145 |
+
/**
|
| 146 |
+
* (Extended)
|
| 147 |
+
*
|
| 148 |
+
* This inline tag is used to automatically generate an API item's documentation by
|
| 149 |
+
* copying it from another API item. The inline tag parameter contains a reference
|
| 150 |
+
* to the other item, which may be an unrelated class, or even an import from a
|
| 151 |
+
* separate NPM package.
|
| 152 |
+
*
|
| 153 |
+
* @remarks
|
| 154 |
+
* What gets copied
|
| 155 |
+
*
|
| 156 |
+
* The `@inheritDoc` tag does not copy the entire comment body. Only the following
|
| 157 |
+
* components are copied:
|
| 158 |
+
* - summary section
|
| 159 |
+
* - `@remarks` block
|
| 160 |
+
* - `@params` blocks
|
| 161 |
+
* - `@typeParam` blocks
|
| 162 |
+
* - `@returns` block
|
| 163 |
+
* Other tags such as `@defaultValue` or `@example` are not copied, and need to be
|
| 164 |
+
* explicitly included after the `@inheritDoc` tag.
|
| 165 |
+
*
|
| 166 |
+
* TODO: The notation for API item references is still being standardized. See this issue:
|
| 167 |
+
* https://github.com/microsoft/tsdoc/issues/9
|
| 168 |
+
*/
|
| 169 |
+
StandardTags.inheritDoc = StandardTags._defineTag({
|
| 170 |
+
tagName: '@inheritDoc',
|
| 171 |
+
syntaxKind: TSDocTagSyntaxKind.InlineTag,
|
| 172 |
+
standardization: Standardization.Extended
|
| 173 |
+
});
|
| 174 |
+
/**
|
| 175 |
+
* (Discretionary)
|
| 176 |
+
*
|
| 177 |
+
* Suggested meaning: Designates that an API item is not planned to be used by
|
| 178 |
+
* third-party developers. The tooling may trim the declaration from a public release.
|
| 179 |
+
* In some implementations, certain designated packages may be allowed to consume
|
| 180 |
+
* internal API items, e.g. because the packages are components of the same product.
|
| 181 |
+
*
|
| 182 |
+
* @remarks
|
| 183 |
+
* Example implementations: API Extractor
|
| 184 |
+
*/
|
| 185 |
+
StandardTags.internal = StandardTags._defineTag({
|
| 186 |
+
tagName: '@internal',
|
| 187 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 188 |
+
standardization: Standardization.Discretionary
|
| 189 |
+
});
|
| 190 |
+
/**
|
| 191 |
+
* (Core)
|
| 192 |
+
*
|
| 193 |
+
* The `{@label}` inline tag is used to label a declaration, so that it can be referenced
|
| 194 |
+
* using a selector in the TSDoc declaration reference notation.
|
| 195 |
+
*
|
| 196 |
+
* @remarks
|
| 197 |
+
* TODO: The `{@label}` notation is still being standardized. See this issue:
|
| 198 |
+
* https://github.com/microsoft/tsdoc/issues/9
|
| 199 |
+
*/
|
| 200 |
+
StandardTags.label = StandardTags._defineTag({
|
| 201 |
+
tagName: '@label',
|
| 202 |
+
syntaxKind: TSDocTagSyntaxKind.InlineTag,
|
| 203 |
+
standardization: Standardization.Core
|
| 204 |
+
});
|
| 205 |
+
/**
|
| 206 |
+
* (Core)
|
| 207 |
+
*
|
| 208 |
+
* The `{@link}` inline tag is used to create hyperlinks to other pages in a
|
| 209 |
+
* documentation system or general internet URLs. In particular, it supports
|
| 210 |
+
* expressions for referencing API items.
|
| 211 |
+
*
|
| 212 |
+
* @remarks
|
| 213 |
+
* TODO: The `{@link}` notation is still being standardized. See this issue:
|
| 214 |
+
* https://github.com/microsoft/tsdoc/issues/9
|
| 215 |
+
*/
|
| 216 |
+
StandardTags.link = StandardTags._defineTag({
|
| 217 |
+
tagName: '@link',
|
| 218 |
+
syntaxKind: TSDocTagSyntaxKind.InlineTag,
|
| 219 |
+
allowMultiple: true,
|
| 220 |
+
standardization: Standardization.Core
|
| 221 |
+
});
|
| 222 |
+
/**
|
| 223 |
+
* (Extended)
|
| 224 |
+
*
|
| 225 |
+
* This modifier has similar semantics to the `override` keyword in C# or Java.
|
| 226 |
+
* For a member function or property, explicitly indicates that this definition
|
| 227 |
+
* is overriding (i.e. redefining) the definition inherited from the base class.
|
| 228 |
+
* The base class definition would normally be marked as `virtual`.
|
| 229 |
+
*
|
| 230 |
+
* @remarks
|
| 231 |
+
* A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`
|
| 232 |
+
* modifiers are consistently applied, but this is not required by the TSDoc standard.
|
| 233 |
+
*/
|
| 234 |
+
StandardTags.override = StandardTags._defineTag({
|
| 235 |
+
tagName: '@override',
|
| 236 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 237 |
+
standardization: Standardization.Extended
|
| 238 |
+
});
|
| 239 |
+
/**
|
| 240 |
+
* (Core)
|
| 241 |
+
*
|
| 242 |
+
* Used to indicate a doc comment that describes an entire NPM package (as opposed
|
| 243 |
+
* to an individual API item belonging to that package). The `@packageDocumentation` comment
|
| 244 |
+
* is found in the *.d.ts file that acts as the entry point for the package, and it
|
| 245 |
+
* should be the first `/**` comment encountered in that file. A comment containing a
|
| 246 |
+
* `@packageDocumentation` tag should never be used to describe an individual API item.
|
| 247 |
+
*/
|
| 248 |
+
StandardTags.packageDocumentation = StandardTags._defineTag({
|
| 249 |
+
tagName: '@packageDocumentation',
|
| 250 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 251 |
+
standardization: Standardization.Core
|
| 252 |
+
});
|
| 253 |
+
/**
|
| 254 |
+
* (Core)
|
| 255 |
+
*
|
| 256 |
+
* Used to document a function parameter. The `@param` tag is followed by a parameter
|
| 257 |
+
* name, followed by a hyphen, followed by a description. The TSDoc parser recognizes
|
| 258 |
+
* this syntax and will extract it into a DocParamBlock node.
|
| 259 |
+
*/
|
| 260 |
+
StandardTags.param = StandardTags._defineTag({
|
| 261 |
+
tagName: '@param',
|
| 262 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 263 |
+
allowMultiple: true,
|
| 264 |
+
standardization: Standardization.Core
|
| 265 |
+
});
|
| 266 |
+
/**
|
| 267 |
+
* (Core)
|
| 268 |
+
*
|
| 269 |
+
* Starts a section of additional documentation content that is not intended for a
|
| 270 |
+
* public audience. A tool must omit this entire section from the API reference web site,
|
| 271 |
+
* generated *.d.ts file, and any other outputs incorporating the content.
|
| 272 |
+
*/
|
| 273 |
+
StandardTags.privateRemarks = StandardTags._defineTag({
|
| 274 |
+
tagName: '@privateRemarks',
|
| 275 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 276 |
+
standardization: Standardization.Core
|
| 277 |
+
});
|
| 278 |
+
/**
|
| 279 |
+
* (Discretionary)
|
| 280 |
+
*
|
| 281 |
+
* Suggested meaning: Designates that an API item's release stage is "public".
|
| 282 |
+
* It has been officially released to third-party developers, and its signature is
|
| 283 |
+
* guaranteed to be stable (e.g. following Semantic Versioning rules).
|
| 284 |
+
*
|
| 285 |
+
* @remarks
|
| 286 |
+
* Example implementations: API Extractor
|
| 287 |
+
*/
|
| 288 |
+
StandardTags.public = StandardTags._defineTag({
|
| 289 |
+
tagName: '@public',
|
| 290 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 291 |
+
standardization: Standardization.Discretionary
|
| 292 |
+
});
|
| 293 |
+
/**
|
| 294 |
+
* (Extended)
|
| 295 |
+
*
|
| 296 |
+
* This modifier tag indicates that an API item should be documented as being read-only,
|
| 297 |
+
* even if the TypeScript type system may indicate otherwise. For example, suppose a
|
| 298 |
+
* class property has a setter function that always throws an exception explaining that
|
| 299 |
+
* the property cannot be assigned; in this situation, the `@readonly` modifier can be
|
| 300 |
+
* added so that the property is shown as read-only in the documentation.
|
| 301 |
+
*
|
| 302 |
+
* @remarks
|
| 303 |
+
* Example implementations: API Extractor
|
| 304 |
+
*/
|
| 305 |
+
StandardTags.readonly = StandardTags._defineTag({
|
| 306 |
+
tagName: '@readonly',
|
| 307 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 308 |
+
standardization: Standardization.Extended
|
| 309 |
+
});
|
| 310 |
+
/**
|
| 311 |
+
* (Core)
|
| 312 |
+
*
|
| 313 |
+
* The main documentation for an API item is separated into a brief "summary" section,
|
| 314 |
+
* optionally followed by a more detailed "remarks" section. On a documentation web site,
|
| 315 |
+
* index pages (e.g. showing members of a class) will show only the brief summaries,
|
| 316 |
+
* whereas a detail pages (e.g. describing a single member) will show the summary followed
|
| 317 |
+
* by the remarks. The `@remarks` block tag ends the summary section, and begins the
|
| 318 |
+
* remarks section for a doc comment.
|
| 319 |
+
*/
|
| 320 |
+
StandardTags.remarks = StandardTags._defineTag({
|
| 321 |
+
tagName: '@remarks',
|
| 322 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 323 |
+
standardization: Standardization.Core
|
| 324 |
+
});
|
| 325 |
+
/**
|
| 326 |
+
* (Core)
|
| 327 |
+
*
|
| 328 |
+
* Used to document the return value for a function.
|
| 329 |
+
*/
|
| 330 |
+
StandardTags.returns = StandardTags._defineTag({
|
| 331 |
+
tagName: '@returns',
|
| 332 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 333 |
+
standardization: Standardization.Core
|
| 334 |
+
});
|
| 335 |
+
/**
|
| 336 |
+
* (Extended)
|
| 337 |
+
*
|
| 338 |
+
* This modifier has similar semantics to the `sealed` keyword in C# or Java.
|
| 339 |
+
* For a class, indicates that subclasses must not inherit from the class.
|
| 340 |
+
* For a member function or property, indicates that subclasses must not override
|
| 341 |
+
* (i.e. redefine) the member.
|
| 342 |
+
*
|
| 343 |
+
* @remarks
|
| 344 |
+
* A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`
|
| 345 |
+
* modifiers are consistently applied, but this is not required by the TSDoc standard.
|
| 346 |
+
*/
|
| 347 |
+
StandardTags.sealed = StandardTags._defineTag({
|
| 348 |
+
tagName: '@sealed',
|
| 349 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 350 |
+
standardization: Standardization.Extended
|
| 351 |
+
});
|
| 352 |
+
/**
|
| 353 |
+
* (Extended)
|
| 354 |
+
*
|
| 355 |
+
* Used to build a list of references to an API item or other resource that may be related to the
|
| 356 |
+
* current item.
|
| 357 |
+
*
|
| 358 |
+
* @remarks
|
| 359 |
+
*
|
| 360 |
+
* For example:
|
| 361 |
+
*
|
| 362 |
+
* ```ts
|
| 363 |
+
* /**
|
| 364 |
+
* * Parses a string containing a Uniform Resource Locator (URL).
|
| 365 |
+
* * @see {@link ParsedUrl} for the returned data structure
|
| 366 |
+
* * @see {@link https://tools.ietf.org/html/rfc1738|RFC 1738}
|
| 367 |
+
* * for syntax
|
| 368 |
+
* * @see your developer SDK for code samples
|
| 369 |
+
* * @param url - the string to be parsed
|
| 370 |
+
* * @returns the parsed result
|
| 371 |
+
* */
|
| 372 |
+
* function parseURL(url: string): ParsedUrl;
|
| 373 |
+
* ```
|
| 374 |
+
*
|
| 375 |
+
* `@see` is a block tag. Each block becomes an item in the list of references. For example, a documentation
|
| 376 |
+
* system might render the above blocks as follows:
|
| 377 |
+
*
|
| 378 |
+
* ```markdown
|
| 379 |
+
* `function parseURL(url: string): ParsedUrl;`
|
| 380 |
+
*
|
| 381 |
+
* Parses a string containing a Uniform Resource Locator (URL).
|
| 382 |
+
*
|
| 383 |
+
* ## See Also
|
| 384 |
+
* - ParsedUrl for the returned data structure
|
| 385 |
+
* - RFC 1738 for syntax
|
| 386 |
+
* - your developer SDK for code samples
|
| 387 |
+
* ```
|
| 388 |
+
*
|
| 389 |
+
* NOTE: JSDoc attempts to automatically hyperlink the text immediately after `@see`. Because this is ambiguous
|
| 390 |
+
* with plain text, TSDoc instead requires an explicit `{@link}` tag to make hyperlinks.
|
| 391 |
+
*/
|
| 392 |
+
StandardTags.see = StandardTags._defineTag({
|
| 393 |
+
tagName: '@see',
|
| 394 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 395 |
+
standardization: Standardization.Extended
|
| 396 |
+
});
|
| 397 |
+
/**
|
| 398 |
+
* (Extended)
|
| 399 |
+
*
|
| 400 |
+
* Used to document an exception type that may be thrown by a function or property.
|
| 401 |
+
*
|
| 402 |
+
* @remarks
|
| 403 |
+
*
|
| 404 |
+
* A separate `@throws` block should be used to document each exception type. This tag is for informational
|
| 405 |
+
* purposes only, and does not restrict other types from being thrown. It is suggested, but not required,
|
| 406 |
+
* for the `@throws` block to start with a line containing only the name of the exception.
|
| 407 |
+
*
|
| 408 |
+
* For example:
|
| 409 |
+
*
|
| 410 |
+
* ```ts
|
| 411 |
+
* /**
|
| 412 |
+
* * Retrieves metadata about a book from the catalog.
|
| 413 |
+
* *
|
| 414 |
+
* * @param isbnCode - the ISBN number for the book
|
| 415 |
+
* * @returns the retrieved book object
|
| 416 |
+
* *
|
| 417 |
+
* * @throws {@link IsbnSyntaxError}
|
| 418 |
+
* * This exception is thrown if the input is not a valid ISBN number.
|
| 419 |
+
* *
|
| 420 |
+
* * @throws {@link book-lib#BookNotFoundError}
|
| 421 |
+
* * Thrown if the ISBN number is valid, but no such book exists in the catalog.
|
| 422 |
+
* *
|
| 423 |
+
* * @public
|
| 424 |
+
* */
|
| 425 |
+
* function fetchBookByIsbn(isbnCode: string): Book;
|
| 426 |
+
* ```
|
| 427 |
+
*/
|
| 428 |
+
StandardTags.throws = StandardTags._defineTag({
|
| 429 |
+
tagName: '@throws',
|
| 430 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 431 |
+
allowMultiple: true,
|
| 432 |
+
standardization: Standardization.Extended
|
| 433 |
+
});
|
| 434 |
+
/**
|
| 435 |
+
* (Core)
|
| 436 |
+
*
|
| 437 |
+
* Used to document a generic parameter. The `@typeParam` tag is followed by a parameter
|
| 438 |
+
* name, followed by a hyphen, followed by a description. The TSDoc parser recognizes
|
| 439 |
+
* this syntax and will extract it into a DocParamBlock node.
|
| 440 |
+
*/
|
| 441 |
+
StandardTags.typeParam = StandardTags._defineTag({
|
| 442 |
+
tagName: '@typeParam',
|
| 443 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 444 |
+
allowMultiple: true,
|
| 445 |
+
standardization: Standardization.Core
|
| 446 |
+
});
|
| 447 |
+
/**
|
| 448 |
+
* (Extended)
|
| 449 |
+
*
|
| 450 |
+
* This modifier has similar semantics to the `virtual` keyword in C# or Java.
|
| 451 |
+
* For a member function or property, explicitly indicates that subclasses may override
|
| 452 |
+
* (i.e. redefine) the member.
|
| 453 |
+
*
|
| 454 |
+
* @remarks
|
| 455 |
+
* A documentation tool may enforce that the `@virtual`, `@override`, and/or `@sealed`
|
| 456 |
+
* modifiers are consistently applied, but this is not required by the TSDoc standard.
|
| 457 |
+
*/
|
| 458 |
+
StandardTags.virtual = StandardTags._defineTag({
|
| 459 |
+
tagName: '@virtual',
|
| 460 |
+
syntaxKind: TSDocTagSyntaxKind.ModifierTag,
|
| 461 |
+
standardization: Standardization.Extended
|
| 462 |
+
});
|
| 463 |
+
/**
|
| 464 |
+
* (Extended)
|
| 465 |
+
*
|
| 466 |
+
* Used to specify the JSX factory function to use when compiling JSX syntax.
|
| 467 |
+
*
|
| 468 |
+
* @remarks
|
| 469 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 470 |
+
*
|
| 471 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 472 |
+
*/
|
| 473 |
+
StandardTags.jsx = StandardTags._defineTag({
|
| 474 |
+
tagName: '@jsx',
|
| 475 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 476 |
+
standardization: Standardization.Extended
|
| 477 |
+
});
|
| 478 |
+
/**
|
| 479 |
+
* (Extended)
|
| 480 |
+
*
|
| 481 |
+
* Used to specify the JSX runtime to use when compiling JSX syntax.
|
| 482 |
+
*
|
| 483 |
+
* @remarks
|
| 484 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 485 |
+
*
|
| 486 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 487 |
+
*/
|
| 488 |
+
StandardTags.jsxRuntime = StandardTags._defineTag({
|
| 489 |
+
tagName: '@jsxRuntime',
|
| 490 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 491 |
+
standardization: Standardization.Extended
|
| 492 |
+
});
|
| 493 |
+
/**
|
| 494 |
+
* (Extended)
|
| 495 |
+
*
|
| 496 |
+
* Used to specify the JSX fragment factory to use when compiling JSX syntax.
|
| 497 |
+
*
|
| 498 |
+
* @remarks
|
| 499 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 500 |
+
*
|
| 501 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 502 |
+
*/
|
| 503 |
+
StandardTags.jsxFrag = StandardTags._defineTag({
|
| 504 |
+
tagName: '@jsxFrag',
|
| 505 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 506 |
+
standardization: Standardization.Extended
|
| 507 |
+
});
|
| 508 |
+
/**
|
| 509 |
+
* (Extended)
|
| 510 |
+
*
|
| 511 |
+
* Used to specify the JSX import source when compiling JSX syntax.
|
| 512 |
+
*
|
| 513 |
+
* @remarks
|
| 514 |
+
* The TypeScript compiler recognizes this tag and specifies its behavior:
|
| 515 |
+
*
|
| 516 |
+
* @see {@link https://www.typescriptlang.org/tsconfig/#jsx}
|
| 517 |
+
*/
|
| 518 |
+
StandardTags.jsxImportSource = StandardTags._defineTag({
|
| 519 |
+
tagName: '@jsxImportSource',
|
| 520 |
+
syntaxKind: TSDocTagSyntaxKind.BlockTag,
|
| 521 |
+
standardization: Standardization.Extended
|
| 522 |
+
});
|
| 523 |
+
/**
|
| 524 |
+
* Returns the full list of all core tags.
|
| 525 |
+
*/
|
| 526 |
+
StandardTags.allDefinitions = [
|
| 527 |
+
StandardTags.alpha,
|
| 528 |
+
StandardTags.beta,
|
| 529 |
+
StandardTags.defaultValue,
|
| 530 |
+
StandardTags.decorator,
|
| 531 |
+
StandardTags.deprecated,
|
| 532 |
+
StandardTags.eventProperty,
|
| 533 |
+
StandardTags.example,
|
| 534 |
+
StandardTags.experimental,
|
| 535 |
+
StandardTags.inheritDoc,
|
| 536 |
+
StandardTags.internal,
|
| 537 |
+
StandardTags.label,
|
| 538 |
+
StandardTags.link,
|
| 539 |
+
StandardTags.override,
|
| 540 |
+
StandardTags.packageDocumentation,
|
| 541 |
+
StandardTags.param,
|
| 542 |
+
StandardTags.privateRemarks,
|
| 543 |
+
StandardTags.public,
|
| 544 |
+
StandardTags.readonly,
|
| 545 |
+
StandardTags.remarks,
|
| 546 |
+
StandardTags.returns,
|
| 547 |
+
StandardTags.sealed,
|
| 548 |
+
StandardTags.see,
|
| 549 |
+
StandardTags.throws,
|
| 550 |
+
StandardTags.typeParam,
|
| 551 |
+
StandardTags.virtual,
|
| 552 |
+
StandardTags.jsx,
|
| 553 |
+
StandardTags.jsxRuntime,
|
| 554 |
+
StandardTags.jsxFrag,
|
| 555 |
+
StandardTags.jsxImportSource
|
| 556 |
+
];
|
| 557 |
+
//# sourceMappingURL=StandardTags.js.map
|
node_modules/@microsoft/tsdoc/lib/details/StandardTags.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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;I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AAM;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<TSDocTagDefinition> = [\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"]}
|
node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Used to group the {@link StandardTags} definitions according to the level of support
|
| 3 |
+
* expected from documentation tools that implement the standard.
|
| 4 |
+
*/
|
| 5 |
+
export declare enum Standardization {
|
| 6 |
+
/**
|
| 7 |
+
* TSDoc tags in the "Core" standardization group are considered essential.
|
| 8 |
+
* Their meaning is standardized, and every documentation tool is expected
|
| 9 |
+
* to recognize them. The TSDoc parser library typically provides dedicated APIs
|
| 10 |
+
* for accessing these tags.
|
| 11 |
+
*/
|
| 12 |
+
Core = "Core",
|
| 13 |
+
/**
|
| 14 |
+
* TSDoc tags in the "Extended" standardization group are optional. Documentation tools
|
| 15 |
+
* may or may not support them. If they do, the syntax and semantics should conform to
|
| 16 |
+
* the TSDoc standard definitions.
|
| 17 |
+
*/
|
| 18 |
+
Extended = "Extended",
|
| 19 |
+
/**
|
| 20 |
+
* TSDoc tags in the "Discretionary" standardization group are optional. Although the
|
| 21 |
+
* syntax is specified, the semantics for these tags are implementation-specific
|
| 22 |
+
* (and sometimes difficult to describe completely without referring to a specific
|
| 23 |
+
* implementation). Discretionary tags are included in the TSDoc standard to ensure that
|
| 24 |
+
* if two different popular tools use the same tag name, developers can expect the syntax
|
| 25 |
+
* to be the same, and the semantics to be somewhat similar.
|
| 26 |
+
*/
|
| 27 |
+
Discretionary = "Discretionary",
|
| 28 |
+
/**
|
| 29 |
+
* The tag is not part of the TSDoc standard. All user-defined tags are assigned to this group.
|
| 30 |
+
*/
|
| 31 |
+
None = "None"
|
| 32 |
+
}
|
| 33 |
+
//# sourceMappingURL=Standardization.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/details/Standardization.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/details/Standardization.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
/**
|
| 4 |
+
* Used to group the {@link StandardTags} definitions according to the level of support
|
| 5 |
+
* expected from documentation tools that implement the standard.
|
| 6 |
+
*/
|
| 7 |
+
export var Standardization;
|
| 8 |
+
(function (Standardization) {
|
| 9 |
+
/**
|
| 10 |
+
* TSDoc tags in the "Core" standardization group are considered essential.
|
| 11 |
+
* Their meaning is standardized, and every documentation tool is expected
|
| 12 |
+
* to recognize them. The TSDoc parser library typically provides dedicated APIs
|
| 13 |
+
* for accessing these tags.
|
| 14 |
+
*/
|
| 15 |
+
Standardization["Core"] = "Core";
|
| 16 |
+
/**
|
| 17 |
+
* TSDoc tags in the "Extended" standardization group are optional. Documentation tools
|
| 18 |
+
* may or may not support them. If they do, the syntax and semantics should conform to
|
| 19 |
+
* the TSDoc standard definitions.
|
| 20 |
+
*/
|
| 21 |
+
Standardization["Extended"] = "Extended";
|
| 22 |
+
/**
|
| 23 |
+
* TSDoc tags in the "Discretionary" standardization group are optional. Although the
|
| 24 |
+
* syntax is specified, the semantics for these tags are implementation-specific
|
| 25 |
+
* (and sometimes difficult to describe completely without referring to a specific
|
| 26 |
+
* implementation). Discretionary tags are included in the TSDoc standard to ensure that
|
| 27 |
+
* if two different popular tools use the same tag name, developers can expect the syntax
|
| 28 |
+
* to be the same, and the semantics to be somewhat similar.
|
| 29 |
+
*/
|
| 30 |
+
Standardization["Discretionary"] = "Discretionary";
|
| 31 |
+
/**
|
| 32 |
+
* The tag is not part of the TSDoc standard. All user-defined tags are assigned to this group.
|
| 33 |
+
*/
|
| 34 |
+
Standardization["None"] = "None";
|
| 35 |
+
})(Standardization || (Standardization = {}));
|
| 36 |
+
//# sourceMappingURL=Standardization.js.map
|
node_modules/@microsoft/tsdoc/lib/details/Standardization.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"]}
|
node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { DocNode } from '../nodes';
|
| 2 |
+
/**
|
| 3 |
+
* Renders a DocNode tree as plain text, without any rich text formatting or markup.
|
| 4 |
+
*/
|
| 5 |
+
export declare class PlainTextEmitter {
|
| 6 |
+
/**
|
| 7 |
+
* Returns true if the specified node contains any text content.
|
| 8 |
+
*
|
| 9 |
+
* @remarks
|
| 10 |
+
* A documentation tool can use this test to report warnings when a developer neglected to write a code comment
|
| 11 |
+
* for a declaration.
|
| 12 |
+
*
|
| 13 |
+
* @param node - this node and all its children will be considered
|
| 14 |
+
* @param requiredCharacters - The test returns true if at least this many non-spacing characters are found.
|
| 15 |
+
* The default value is 1.
|
| 16 |
+
*/
|
| 17 |
+
static hasAnyTextContent(node: DocNode, requiredCharacters?: number): boolean;
|
| 18 |
+
/**
|
| 19 |
+
* Returns true if the specified collection of nodes contains any text content.
|
| 20 |
+
*
|
| 21 |
+
* @remarks
|
| 22 |
+
* A documentation tool can use this test to report warnings when a developer neglected to write a code comment
|
| 23 |
+
* for a declaration.
|
| 24 |
+
*
|
| 25 |
+
* @param nodes - the collection of nodes to be tested
|
| 26 |
+
* @param requiredCharacters - The test returns true if at least this many non-spacing characters are found.
|
| 27 |
+
* The default value is 1.
|
| 28 |
+
*/
|
| 29 |
+
static hasAnyTextContent(nodes: ReadonlyArray<DocNode>, requiredCharacters?: number): boolean;
|
| 30 |
+
private static _scanTextContent;
|
| 31 |
+
private static _countNonSpaceCharacters;
|
| 32 |
+
}
|
| 33 |
+
//# sourceMappingURL=PlainTextEmitter.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
import { DocNode, DocNodeKind } from '../nodes';
|
| 4 |
+
/**
|
| 5 |
+
* Renders a DocNode tree as plain text, without any rich text formatting or markup.
|
| 6 |
+
*/
|
| 7 |
+
export class PlainTextEmitter {
|
| 8 |
+
static hasAnyTextContent(nodeOrNodes, requiredCharacters) {
|
| 9 |
+
if (requiredCharacters === undefined || requiredCharacters < 1) {
|
| 10 |
+
requiredCharacters = 1; // default
|
| 11 |
+
}
|
| 12 |
+
let nodes;
|
| 13 |
+
if (nodeOrNodes instanceof DocNode) {
|
| 14 |
+
nodes = [nodeOrNodes];
|
| 15 |
+
}
|
| 16 |
+
else {
|
| 17 |
+
nodes = nodeOrNodes;
|
| 18 |
+
}
|
| 19 |
+
const foundCharacters = PlainTextEmitter._scanTextContent(nodes, requiredCharacters, 0);
|
| 20 |
+
return foundCharacters >= requiredCharacters;
|
| 21 |
+
}
|
| 22 |
+
static _scanTextContent(nodes, requiredCharacters, foundCharacters) {
|
| 23 |
+
for (const node of nodes) {
|
| 24 |
+
switch (node.kind) {
|
| 25 |
+
case DocNodeKind.FencedCode:
|
| 26 |
+
const docFencedCode = node;
|
| 27 |
+
foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docFencedCode.code);
|
| 28 |
+
break;
|
| 29 |
+
case DocNodeKind.CodeSpan:
|
| 30 |
+
const docCodeSpan = node;
|
| 31 |
+
foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docCodeSpan.code);
|
| 32 |
+
break;
|
| 33 |
+
case DocNodeKind.EscapedText:
|
| 34 |
+
const docEscapedText = node;
|
| 35 |
+
foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docEscapedText.decodedText);
|
| 36 |
+
break;
|
| 37 |
+
case DocNodeKind.LinkTag:
|
| 38 |
+
const docLinkTag = node;
|
| 39 |
+
foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docLinkTag.linkText || '');
|
| 40 |
+
break;
|
| 41 |
+
case DocNodeKind.PlainText:
|
| 42 |
+
const docPlainText = node;
|
| 43 |
+
foundCharacters += PlainTextEmitter._countNonSpaceCharacters(docPlainText.text);
|
| 44 |
+
break;
|
| 45 |
+
}
|
| 46 |
+
if (foundCharacters >= requiredCharacters) {
|
| 47 |
+
break;
|
| 48 |
+
}
|
| 49 |
+
foundCharacters += PlainTextEmitter._scanTextContent(node.getChildNodes(), requiredCharacters, foundCharacters);
|
| 50 |
+
if (foundCharacters >= requiredCharacters) {
|
| 51 |
+
break;
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
return foundCharacters;
|
| 55 |
+
}
|
| 56 |
+
static _countNonSpaceCharacters(s) {
|
| 57 |
+
let count = 0;
|
| 58 |
+
const length = s.length;
|
| 59 |
+
let i = 0;
|
| 60 |
+
while (i < length) {
|
| 61 |
+
switch (s.charCodeAt(i)) {
|
| 62 |
+
case 32: // space
|
| 63 |
+
case 9: // tab
|
| 64 |
+
case 13: // CR
|
| 65 |
+
case 10: // LF
|
| 66 |
+
break;
|
| 67 |
+
default:
|
| 68 |
+
++count;
|
| 69 |
+
}
|
| 70 |
+
++i;
|
| 71 |
+
}
|
| 72 |
+
return count;
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
//# sourceMappingURL=PlainTextEmitter.js.map
|
node_modules/@microsoft/tsdoc/lib/emitters/PlainTextEmitter.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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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AC1C,MAAM;YACR,CAAC;YAED,eAAe,IAAI,gBAAgB,CAAC,gBAAgB,CAClD,IAAI,CAAC,aAAa,EAAE,EACpB,kBAAkB,EAClB,eAAe,CAChB,CAAC;YAEF,IAAI,eAAe,IAAI,kBAAkB,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<DocNode>, requiredCharacters?: number): boolean;\r\n public static hasAnyTextContent(\r\n nodeOrNodes: DocNode | ReadonlyArray<DocNode>,\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<DocNode>;\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<DocNode>,\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"]}
|
node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* An interface for a builder object that allows a large text string to be constructed incrementally by appending
|
| 3 |
+
* small chunks.
|
| 4 |
+
*
|
| 5 |
+
* @remarks
|
| 6 |
+
*
|
| 7 |
+
* {@link StringBuilder} is the default implementation of this contract.
|
| 8 |
+
*/
|
| 9 |
+
export interface IStringBuilder {
|
| 10 |
+
/**
|
| 11 |
+
* Append the specified text to the buffer.
|
| 12 |
+
*/
|
| 13 |
+
append(text: string): void;
|
| 14 |
+
/**
|
| 15 |
+
* Returns a single string containing all the text that was appended to the buffer so far.
|
| 16 |
+
*
|
| 17 |
+
* @remarks
|
| 18 |
+
*
|
| 19 |
+
* This is a potentially expensive operation.
|
| 20 |
+
*/
|
| 21 |
+
toString(): string;
|
| 22 |
+
}
|
| 23 |
+
/**
|
| 24 |
+
* This class allows a large text string to be constructed incrementally by appending small chunks. The final
|
| 25 |
+
* string can be obtained by calling StringBuilder.toString().
|
| 26 |
+
*
|
| 27 |
+
* @remarks
|
| 28 |
+
* A naive approach might use the `+=` operator to append strings: This would have the downside of copying
|
| 29 |
+
* the entire string each time a chunk is appended, resulting in `O(n^2)` bytes of memory being allocated
|
| 30 |
+
* (and later freed by the garbage collector), and many of the allocations could be very large objects.
|
| 31 |
+
* StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them
|
| 32 |
+
* when `getText()` is finally called.
|
| 33 |
+
*/
|
| 34 |
+
export declare class StringBuilder implements IStringBuilder {
|
| 35 |
+
private _chunks;
|
| 36 |
+
constructor();
|
| 37 |
+
/** {@inheritdoc IStringBuilder.append} */
|
| 38 |
+
append(text: string): void;
|
| 39 |
+
/** {@inheritdoc IStringBuilder.toString} */
|
| 40 |
+
toString(): string;
|
| 41 |
+
}
|
| 42 |
+
//# sourceMappingURL=StringBuilder.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|
node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
| 2 |
+
// See LICENSE in the project root for license information.
|
| 3 |
+
/**
|
| 4 |
+
* This class allows a large text string to be constructed incrementally by appending small chunks. The final
|
| 5 |
+
* string can be obtained by calling StringBuilder.toString().
|
| 6 |
+
*
|
| 7 |
+
* @remarks
|
| 8 |
+
* A naive approach might use the `+=` operator to append strings: This would have the downside of copying
|
| 9 |
+
* the entire string each time a chunk is appended, resulting in `O(n^2)` bytes of memory being allocated
|
| 10 |
+
* (and later freed by the garbage collector), and many of the allocations could be very large objects.
|
| 11 |
+
* StringBuilder avoids this overhead by accumulating the chunks in an array, and efficiently joining them
|
| 12 |
+
* when `getText()` is finally called.
|
| 13 |
+
*/
|
| 14 |
+
export class StringBuilder {
|
| 15 |
+
constructor() {
|
| 16 |
+
this._chunks = [];
|
| 17 |
+
}
|
| 18 |
+
/** {@inheritdoc IStringBuilder.append} */
|
| 19 |
+
append(text) {
|
| 20 |
+
this._chunks.push(text);
|
| 21 |
+
}
|
| 22 |
+
/** {@inheritdoc IStringBuilder.toString} */
|
| 23 |
+
toString() {
|
| 24 |
+
if (this._chunks.length === 0) {
|
| 25 |
+
return '';
|
| 26 |
+
}
|
| 27 |
+
if (this._chunks.length > 1) {
|
| 28 |
+
const joined = this._chunks.join('');
|
| 29 |
+
this._chunks.length = 1;
|
| 30 |
+
this._chunks[0] = joined;
|
| 31 |
+
}
|
| 32 |
+
return this._chunks[0];
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
//# sourceMappingURL=StringBuilder.js.map
|
node_modules/@microsoft/tsdoc/lib/emitters/StringBuilder.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"]}
|
node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { DocComment, DocDeclarationReference, DocHtmlEndTag, DocHtmlStartTag } from '../nodes';
|
| 2 |
+
import type { IStringBuilder } from './StringBuilder';
|
| 3 |
+
/**
|
| 4 |
+
* Renders a DocNode tree as a code comment.
|
| 5 |
+
*/
|
| 6 |
+
export declare class TSDocEmitter {
|
| 7 |
+
readonly eol: string;
|
| 8 |
+
private _emitCommentFraming;
|
| 9 |
+
private _output;
|
| 10 |
+
private _lineState;
|
| 11 |
+
private _previousLineHadContent;
|
| 12 |
+
private _hangingParagraph;
|
| 13 |
+
renderComment(output: IStringBuilder, docComment: DocComment): void;
|
| 14 |
+
renderHtmlTag(output: IStringBuilder, htmlTag: DocHtmlStartTag | DocHtmlEndTag): void;
|
| 15 |
+
renderDeclarationReference(output: IStringBuilder, declarationReference: DocDeclarationReference): void;
|
| 16 |
+
private _renderCompleteObject;
|
| 17 |
+
private _renderNode;
|
| 18 |
+
private _renderInlineTag;
|
| 19 |
+
private _renderNodes;
|
| 20 |
+
private _ensureAtStartOfLine;
|
| 21 |
+
private _ensureLineSkipped;
|
| 22 |
+
private _writeContent;
|
| 23 |
+
private _writeNewline;
|
| 24 |
+
private _writeEnd;
|
| 25 |
+
}
|
| 26 |
+
//# sourceMappingURL=TSDocEmitter.d.ts.map
|
node_modules/@microsoft/tsdoc/lib/emitters/TSDocEmitter.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 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"}
|