@microsoft/api-documenter 7.13.72 → 7.13.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -1,6 +1,78 @@
1
1
  {
2
2
  "name": "@microsoft/api-documenter",
3
3
  "entries": [
4
+ {
5
+ "version": "7.13.76",
6
+ "tag": "@microsoft/api-documenter_v7.13.76",
7
+ "date": "Thu, 09 Dec 2021 20:34:41 GMT",
8
+ "comments": {
9
+ "dependency": [
10
+ {
11
+ "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.15.1`"
12
+ },
13
+ {
14
+ "comment": "Updating dependency \"@rushstack/node-core-library\" to `3.44.2`"
15
+ },
16
+ {
17
+ "comment": "Updating dependency \"@rushstack/heft\" to `0.43.2`"
18
+ },
19
+ {
20
+ "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.4.3`"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "version": "7.13.75",
27
+ "tag": "@microsoft/api-documenter_v7.13.75",
28
+ "date": "Thu, 09 Dec 2021 00:21:54 GMT",
29
+ "comments": {
30
+ "dependency": [
31
+ {
32
+ "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.15.0`"
33
+ },
34
+ {
35
+ "comment": "Updating dependency \"@rushstack/heft\" to `0.43.1`"
36
+ },
37
+ {
38
+ "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.4.2`"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "version": "7.13.74",
45
+ "tag": "@microsoft/api-documenter_v7.13.74",
46
+ "date": "Wed, 08 Dec 2021 19:05:08 GMT",
47
+ "comments": {
48
+ "dependency": [
49
+ {
50
+ "comment": "Updating dependency \"@rushstack/heft\" to `0.43.0`"
51
+ },
52
+ {
53
+ "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.4.1`"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "version": "7.13.73",
60
+ "tag": "@microsoft/api-documenter_v7.13.73",
61
+ "date": "Wed, 08 Dec 2021 16:14:05 GMT",
62
+ "comments": {
63
+ "dependency": [
64
+ {
65
+ "comment": "Updating dependency \"@microsoft/api-extractor-model\" to `7.14.0`"
66
+ },
67
+ {
68
+ "comment": "Updating dependency \"@rushstack/heft\" to `0.42.6`"
69
+ },
70
+ {
71
+ "comment": "Updating dependency \"@rushstack/heft-node-rig\" to `1.4.0`"
72
+ }
73
+ ]
74
+ }
75
+ },
4
76
  {
5
77
  "version": "7.13.72",
6
78
  "tag": "@microsoft/api-documenter_v7.13.72",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  # Change Log - @microsoft/api-documenter
2
2
 
3
- This log was last generated on Mon, 06 Dec 2021 16:08:32 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 09 Dec 2021 20:34:41 GMT and should not be manually modified.
4
+
5
+ ## 7.13.76
6
+ Thu, 09 Dec 2021 20:34:41 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 7.13.75
11
+ Thu, 09 Dec 2021 00:21:54 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 7.13.74
16
+ Wed, 08 Dec 2021 19:05:08 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 7.13.73
21
+ Wed, 08 Dec 2021 16:14:05 GMT
22
+
23
+ _Version update only_
4
24
 
5
25
  ## 7.13.72
6
26
  Mon, 06 Dec 2021 16:08:32 GMT
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.20"
8
+ "packageVersion": "7.19.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -26,7 +26,7 @@ class ExperimentalYamlDocumenter extends YamlDocumenter_1.YamlDocumenter {
26
26
  const tocItems = [];
27
27
  for (const apiItem of apiItems) {
28
28
  let tocItem;
29
- if (apiItem.kind === "Namespace" /* Namespace */ && !this.newDocfxNamespaces) {
29
+ if (apiItem.kind === api_extractor_model_1.ApiItemKind.Namespace && !this.newDocfxNamespaces) {
30
30
  tocItem = {
31
31
  name: this._getTocItemName(apiItem)
32
32
  };
@@ -40,7 +40,7 @@ class ExperimentalYamlDocumenter extends YamlDocumenter_1.YamlDocumenter {
40
40
  name: this._getTocItemName(apiItem),
41
41
  uid: this._getUid(apiItem)
42
42
  };
43
- if (apiItem.kind !== "Package" /* Package */) {
43
+ if (apiItem.kind !== api_extractor_model_1.ApiItemKind.Package) {
44
44
  this._filterItem(apiItem, tocItem);
45
45
  }
46
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExperimentalYamlDocumenter.js","sourceRoot":"","sources":["../../src/documenters/ExperimentalYamlDocumenter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4CAA4D;AAC5D,wEAAmG;AAInG,qDAAkD;AAGlD;;;GAGG;AACH,MAAa,0BAA2B,SAAQ,+BAAc;IAK5D,YAAmB,QAAkB,EAAE,gBAAkC;QACvE,KAAK,CAAC,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,UAAU,CAAC,eAAgB,CAAC;QAE5D,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QAEzB,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IAED,gBAAgB;IACN,gBAAgB,CAAC,QAAgC;QACzD,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;IAChC,CAAC;IAEO,eAAe,CAAC,QAAgC;QACtD,MAAM,QAAQ,GAAmB,EAAE,CAAC;QACpC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,IAAI,OAAqB,CAAC;YAC1B,IAAI,OAAO,CAAC,IAAI,gCAA0B,IAA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AC,CAAC,CAAC;SAC5D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArJD,gEAqJC","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 { DocComment, DocInlineTag } from '@microsoft/tsdoc';\r\nimport { ApiModel, ApiItem, ApiItemKind, ApiDocumentedItem } from '@microsoft/api-extractor-model';\r\n\r\nimport { IConfigTableOfContents } from './IConfigFile';\r\nimport { IYamlTocItem, IYamlTocFile } from '../yaml/IYamlTocFile';\r\nimport { YamlDocumenter } from './YamlDocumenter';\r\nimport { DocumenterConfig } from './DocumenterConfig';\r\n\r\n/**\r\n * EXPERIMENTAL - This documenter is a prototype of a new config file driven mode of operation for\r\n * API Documenter. It is not ready for general usage yet. Its design may change in the future.\r\n */\r\nexport class ExperimentalYamlDocumenter extends YamlDocumenter {\r\n private _config: IConfigTableOfContents;\r\n private _tocPointerMap: { [key: string]: IYamlTocItem };\r\n private _catchAllPointer: IYamlTocItem | undefined;\r\n\r\n public constructor(apiModel: ApiModel, documenterConfig: DocumenterConfig) {\r\n super(apiModel, documenterConfig.configFile.newDocfxNamespaces);\r\n this._config = documenterConfig.configFile.tableOfContents!;\r\n\r\n this._tocPointerMap = {};\r\n\r\n this._generateTocPointersMap(this._config.tocConfig);\r\n }\r\n\r\n /** @override */\r\n protected buildYamlTocFile(apiItems: ReadonlyArray<ApiItem>): IYamlTocFile {\r\n this._buildTocItems2(apiItems);\r\n return this._config.tocConfig;\r\n }\r\n\r\n private _buildTocItems2(apiItems: ReadonlyArray<ApiItem>): IYamlTocItem[] {\r\n const tocItems: IYamlTocItem[] = [];\r\n for (const apiItem of apiItems) {\r\n let tocItem: IYamlTocItem;\r\n if (apiItem.kind === ApiItemKind.Namespace && !this.newDocfxNamespaces) {\r\n tocItem = {\r\n name: this._getTocItemName(apiItem)\r\n };\r\n } else {\r\n if (this._shouldEmbed(apiItem.kind)) {\r\n // Don't generate table of contents items for embedded definitions\r\n continue;\r\n }\r\n\r\n tocItem = {\r\n name: this._getTocItemName(apiItem),\r\n uid: this._getUid(apiItem)\r\n };\r\n\r\n if (apiItem.kind !== ApiItemKind.Package) {\r\n this._filterItem(apiItem, tocItem);\r\n }\r\n }\r\n\r\n tocItems.push(tocItem);\r\n\r\n const children: ApiItem[] = this._getLogicalChildren(apiItem);\r\n const childItems: IYamlTocItem[] = this._buildTocItems2(children);\r\n if (childItems.length > 0) {\r\n tocItem.items = childItems;\r\n }\r\n }\r\n return tocItems;\r\n }\r\n\r\n // Parses the tocConfig object to build a pointers map of nodes where we want to sort out the API items\r\n private _generateTocPointersMap(tocConfig: IYamlTocFile | IYamlTocItem): void {\r\n const { catchAllCategory } = this._config;\r\n\r\n if (tocConfig.items) {\r\n for (const tocItem of tocConfig.items) {\r\n if (tocItem.items && tocItem.items.length > 0 && this._shouldNotIncludeInPointersMap(tocItem)) {\r\n this._generateTocPointersMap(tocItem);\r\n } else {\r\n // check for presence of the `catchAllCategory` config option\r\n if (catchAllCategory && tocItem.name === catchAllCategory) {\r\n this._catchAllPointer = tocItem;\r\n } else {\r\n this._tocPointerMap[tocItem.name] = tocItem;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Filtering out the api-item by inlineTags or category name presence in the item name.\r\n */\r\n private _filterItem(apiItem: ApiItem, tocItem: IYamlTocItem): void {\r\n const { categoryInlineTag, categorizeByName } = this._config;\r\n const { name: itemName } = tocItem;\r\n let filtered: boolean = false;\r\n\r\n // First we attempt to filter by inline tag if provided.\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const docInlineTag: DocInlineTag | undefined = categoryInlineTag\r\n ? this._findInlineTagByName(categoryInlineTag, apiItem.tsdocComment)\r\n : undefined;\r\n\r\n const tagContent: string | undefined =\r\n docInlineTag && docInlineTag.tagContent && docInlineTag.tagContent.trim();\r\n\r\n if (tagContent && this._tocPointerMap[tagContent]) {\r\n // null assertion used because when pointer map was created we checked for presence of empty `items` array\r\n this._tocPointerMap[tagContent].items!.push(tocItem);\r\n filtered = true;\r\n }\r\n }\r\n\r\n // If not filtered by inline tag and `categorizeByName` config is enabled attempt to filter it by category name.\r\n if (!filtered && categorizeByName) {\r\n const pointers: string[] = Object.keys(this._tocPointerMap);\r\n for (let i: number = 0, length: number = pointers.length; i < length; i++) {\r\n if (itemName.indexOf(pointers[i]) !== -1) {\r\n // null assertion used because when pointer map was created we checked for presence of empty `items` array\r\n this._tocPointerMap[pointers[i]].items!.push(tocItem);\r\n filtered = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If item still not filtered and a `catchAllCategory` config provided push it to it.\r\n if (!filtered && this._catchAllPointer && this._catchAllPointer.items) {\r\n this._catchAllPointer.items.push(tocItem);\r\n }\r\n }\r\n\r\n // This is a direct copy of a @docCategory inline tag finder in office-ui-fabric-react,\r\n // but is generic enough to be used for any inline tag\r\n private _findInlineTagByName(\r\n tagName: string,\r\n docComment: DocComment | undefined\r\n ): DocInlineTag | undefined {\r\n const tagNameToCheck: string = `@${tagName}`;\r\n\r\n if (docComment instanceof DocInlineTag) {\r\n if (docComment.tagName === tagNameToCheck) {\r\n return docComment;\r\n }\r\n }\r\n if (docComment) {\r\n for (const childNode of docComment.getChildNodes()) {\r\n const result: DocInlineTag | undefined = this._findInlineTagByName(tagName, childNode as DocComment);\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n private _shouldNotIncludeInPointersMap(item: IYamlTocItem): boolean {\r\n const { nonEmptyCategoryNodeNames } = this._config;\r\n if (nonEmptyCategoryNodeNames && nonEmptyCategoryNodeNames.length) {\r\n return nonEmptyCategoryNodeNames.indexOf(item.name) === -1;\r\n }\r\n return true;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ExperimentalYamlDocumenter.js","sourceRoot":"","sources":["../../src/documenters/ExperimentalYamlDocumenter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;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C,OAAO,CAAC,CAAC;SAC3C;IACH,CAAC;IAED,uFAAuF;IACvF,sDAAsD;IAC9C,oBAAoB,CAC1B,OAAe,EACf,UAAkC;QAElC,MAAM,cAAc,GAAW,IAAI,OAAO,EAAE,CAAC;QAE7C,IAAI,UAAU,YAAY,oBAAY,EAAE;YACtC,IAAI,UAAU,CAAC,OAAO,KAAK,cAAc,EAAE;gBACzC,OAAO,UAAU,CAAC;aACnB;SACF;QACD,IAAI,UAAU,EAAE;YACd,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,aAAa,EAAE,EAAE;gBAClD,MAAM,MAAM,GAA6B,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAuB,CAAC,CAAC;gBACrG,IAAI,MAAM,KAAK,SAAS,EAAE;oBACxB,OAAO,MAAM,CAAC;iBACf;aACF;SACF;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,8BAA8B,CAAC,IAAkB;QACvD,MAAM,EAAE,yBAAyB,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACnD,IAAI,yBAAyB,IAAI,yBAAyB,CAAC,MAAM,EAAE;YACjE,OAAO,yBAAyB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;SAC5D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArJD,gEAqJC","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 { DocComment, DocInlineTag } from '@microsoft/tsdoc';\r\nimport { ApiModel, ApiItem, ApiItemKind, ApiDocumentedItem } from '@microsoft/api-extractor-model';\r\n\r\nimport { IConfigTableOfContents } from './IConfigFile';\r\nimport { IYamlTocItem, IYamlTocFile } from '../yaml/IYamlTocFile';\r\nimport { YamlDocumenter } from './YamlDocumenter';\r\nimport { DocumenterConfig } from './DocumenterConfig';\r\n\r\n/**\r\n * EXPERIMENTAL - This documenter is a prototype of a new config file driven mode of operation for\r\n * API Documenter. It is not ready for general usage yet. Its design may change in the future.\r\n */\r\nexport class ExperimentalYamlDocumenter extends YamlDocumenter {\r\n private _config: IConfigTableOfContents;\r\n private _tocPointerMap: { [key: string]: IYamlTocItem };\r\n private _catchAllPointer: IYamlTocItem | undefined;\r\n\r\n public constructor(apiModel: ApiModel, documenterConfig: DocumenterConfig) {\r\n super(apiModel, documenterConfig.configFile.newDocfxNamespaces);\r\n this._config = documenterConfig.configFile.tableOfContents!;\r\n\r\n this._tocPointerMap = {};\r\n\r\n this._generateTocPointersMap(this._config.tocConfig);\r\n }\r\n\r\n /** @override */\r\n protected buildYamlTocFile(apiItems: ReadonlyArray<ApiItem>): IYamlTocFile {\r\n this._buildTocItems2(apiItems);\r\n return this._config.tocConfig;\r\n }\r\n\r\n private _buildTocItems2(apiItems: ReadonlyArray<ApiItem>): IYamlTocItem[] {\r\n const tocItems: IYamlTocItem[] = [];\r\n for (const apiItem of apiItems) {\r\n let tocItem: IYamlTocItem;\r\n if (apiItem.kind === ApiItemKind.Namespace && !this.newDocfxNamespaces) {\r\n tocItem = {\r\n name: this._getTocItemName(apiItem)\r\n };\r\n } else {\r\n if (this._shouldEmbed(apiItem.kind)) {\r\n // Don't generate table of contents items for embedded definitions\r\n continue;\r\n }\r\n\r\n tocItem = {\r\n name: this._getTocItemName(apiItem),\r\n uid: this._getUid(apiItem)\r\n };\r\n\r\n if (apiItem.kind !== ApiItemKind.Package) {\r\n this._filterItem(apiItem, tocItem);\r\n }\r\n }\r\n\r\n tocItems.push(tocItem);\r\n\r\n const children: ApiItem[] = this._getLogicalChildren(apiItem);\r\n const childItems: IYamlTocItem[] = this._buildTocItems2(children);\r\n if (childItems.length > 0) {\r\n tocItem.items = childItems;\r\n }\r\n }\r\n return tocItems;\r\n }\r\n\r\n // Parses the tocConfig object to build a pointers map of nodes where we want to sort out the API items\r\n private _generateTocPointersMap(tocConfig: IYamlTocFile | IYamlTocItem): void {\r\n const { catchAllCategory } = this._config;\r\n\r\n if (tocConfig.items) {\r\n for (const tocItem of tocConfig.items) {\r\n if (tocItem.items && tocItem.items.length > 0 && this._shouldNotIncludeInPointersMap(tocItem)) {\r\n this._generateTocPointersMap(tocItem);\r\n } else {\r\n // check for presence of the `catchAllCategory` config option\r\n if (catchAllCategory && tocItem.name === catchAllCategory) {\r\n this._catchAllPointer = tocItem;\r\n } else {\r\n this._tocPointerMap[tocItem.name] = tocItem;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Filtering out the api-item by inlineTags or category name presence in the item name.\r\n */\r\n private _filterItem(apiItem: ApiItem, tocItem: IYamlTocItem): void {\r\n const { categoryInlineTag, categorizeByName } = this._config;\r\n const { name: itemName } = tocItem;\r\n let filtered: boolean = false;\r\n\r\n // First we attempt to filter by inline tag if provided.\r\n if (apiItem instanceof ApiDocumentedItem) {\r\n const docInlineTag: DocInlineTag | undefined = categoryInlineTag\r\n ? this._findInlineTagByName(categoryInlineTag, apiItem.tsdocComment)\r\n : undefined;\r\n\r\n const tagContent: string | undefined =\r\n docInlineTag && docInlineTag.tagContent && docInlineTag.tagContent.trim();\r\n\r\n if (tagContent && this._tocPointerMap[tagContent]) {\r\n // null assertion used because when pointer map was created we checked for presence of empty `items` array\r\n this._tocPointerMap[tagContent].items!.push(tocItem);\r\n filtered = true;\r\n }\r\n }\r\n\r\n // If not filtered by inline tag and `categorizeByName` config is enabled attempt to filter it by category name.\r\n if (!filtered && categorizeByName) {\r\n const pointers: string[] = Object.keys(this._tocPointerMap);\r\n for (let i: number = 0, length: number = pointers.length; i < length; i++) {\r\n if (itemName.indexOf(pointers[i]) !== -1) {\r\n // null assertion used because when pointer map was created we checked for presence of empty `items` array\r\n this._tocPointerMap[pointers[i]].items!.push(tocItem);\r\n filtered = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // If item still not filtered and a `catchAllCategory` config provided push it to it.\r\n if (!filtered && this._catchAllPointer && this._catchAllPointer.items) {\r\n this._catchAllPointer.items.push(tocItem);\r\n }\r\n }\r\n\r\n // This is a direct copy of a @docCategory inline tag finder in office-ui-fabric-react,\r\n // but is generic enough to be used for any inline tag\r\n private _findInlineTagByName(\r\n tagName: string,\r\n docComment: DocComment | undefined\r\n ): DocInlineTag | undefined {\r\n const tagNameToCheck: string = `@${tagName}`;\r\n\r\n if (docComment instanceof DocInlineTag) {\r\n if (docComment.tagName === tagNameToCheck) {\r\n return docComment;\r\n }\r\n }\r\n if (docComment) {\r\n for (const childNode of docComment.getChildNodes()) {\r\n const result: DocInlineTag | undefined = this._findInlineTagByName(tagName, childNode as DocComment);\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n private _shouldNotIncludeInPointersMap(item: IYamlTocItem): boolean {\r\n const { nonEmptyCategoryNodeNames } = this._config;\r\n if (nonEmptyCategoryNodeNames && nonEmptyCategoryNodeNames.length) {\r\n return nonEmptyCategoryNodeNames.indexOf(item.name) === -1;\r\n }\r\n return true;\r\n }\r\n}\r\n"]}
@@ -78,45 +78,45 @@ class MarkdownDocumenter {
78
78
  this._writeBreadcrumb(output, apiItem);
79
79
  const scopedName = apiItem.getScopedNameWithinPackage();
80
80
  switch (apiItem.kind) {
81
- case "Class" /* Class */:
81
+ case api_extractor_model_1.ApiItemKind.Class:
82
82
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} class` }));
83
83
  break;
84
- case "Enum" /* Enum */:
84
+ case api_extractor_model_1.ApiItemKind.Enum:
85
85
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} enum` }));
86
86
  break;
87
- case "Interface" /* Interface */:
87
+ case api_extractor_model_1.ApiItemKind.Interface:
88
88
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} interface` }));
89
89
  break;
90
- case "Constructor" /* Constructor */:
91
- case "ConstructSignature" /* ConstructSignature */:
90
+ case api_extractor_model_1.ApiItemKind.Constructor:
91
+ case api_extractor_model_1.ApiItemKind.ConstructSignature:
92
92
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: scopedName }));
93
93
  break;
94
- case "Method" /* Method */:
95
- case "MethodSignature" /* MethodSignature */:
94
+ case api_extractor_model_1.ApiItemKind.Method:
95
+ case api_extractor_model_1.ApiItemKind.MethodSignature:
96
96
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} method` }));
97
97
  break;
98
- case "Function" /* Function */:
98
+ case api_extractor_model_1.ApiItemKind.Function:
99
99
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} function` }));
100
100
  break;
101
- case "Model" /* Model */:
101
+ case api_extractor_model_1.ApiItemKind.Model:
102
102
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `API Reference` }));
103
103
  break;
104
- case "Namespace" /* Namespace */:
104
+ case api_extractor_model_1.ApiItemKind.Namespace:
105
105
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} namespace` }));
106
106
  break;
107
- case "Package" /* Package */:
107
+ case api_extractor_model_1.ApiItemKind.Package:
108
108
  console.log(`Writing ${apiItem.displayName} package`);
109
109
  const unscopedPackageName = node_core_library_1.PackageName.getUnscopedName(apiItem.displayName);
110
110
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${unscopedPackageName} package` }));
111
111
  break;
112
- case "Property" /* Property */:
113
- case "PropertySignature" /* PropertySignature */:
112
+ case api_extractor_model_1.ApiItemKind.Property:
113
+ case api_extractor_model_1.ApiItemKind.PropertySignature:
114
114
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} property` }));
115
115
  break;
116
- case "TypeAlias" /* TypeAlias */:
116
+ case api_extractor_model_1.ApiItemKind.TypeAlias:
117
117
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} type` }));
118
118
  break;
119
- case "Variable" /* Variable */:
119
+ case api_extractor_model_1.ApiItemKind.Variable:
120
120
  output.appendNode(new DocHeading_1.DocHeading({ configuration, title: `${scopedName} variable` }));
121
121
  break;
122
122
  default:
@@ -173,47 +173,47 @@ class MarkdownDocumenter {
173
173
  }
174
174
  let appendRemarks = true;
175
175
  switch (apiItem.kind) {
176
- case "Class" /* Class */:
177
- case "Interface" /* Interface */:
178
- case "Namespace" /* Namespace */:
179
- case "Package" /* Package */:
176
+ case api_extractor_model_1.ApiItemKind.Class:
177
+ case api_extractor_model_1.ApiItemKind.Interface:
178
+ case api_extractor_model_1.ApiItemKind.Namespace:
179
+ case api_extractor_model_1.ApiItemKind.Package:
180
180
  this._writeRemarksSection(output, apiItem);
181
181
  appendRemarks = false;
182
182
  break;
183
183
  }
184
184
  switch (apiItem.kind) {
185
- case "Class" /* Class */:
185
+ case api_extractor_model_1.ApiItemKind.Class:
186
186
  this._writeClassTables(output, apiItem);
187
187
  break;
188
- case "Enum" /* Enum */:
188
+ case api_extractor_model_1.ApiItemKind.Enum:
189
189
  this._writeEnumTables(output, apiItem);
190
190
  break;
191
- case "Interface" /* Interface */:
191
+ case api_extractor_model_1.ApiItemKind.Interface:
192
192
  this._writeInterfaceTables(output, apiItem);
193
193
  break;
194
- case "Constructor" /* Constructor */:
195
- case "ConstructSignature" /* ConstructSignature */:
196
- case "Method" /* Method */:
197
- case "MethodSignature" /* MethodSignature */:
198
- case "Function" /* Function */:
194
+ case api_extractor_model_1.ApiItemKind.Constructor:
195
+ case api_extractor_model_1.ApiItemKind.ConstructSignature:
196
+ case api_extractor_model_1.ApiItemKind.Method:
197
+ case api_extractor_model_1.ApiItemKind.MethodSignature:
198
+ case api_extractor_model_1.ApiItemKind.Function:
199
199
  this._writeParameterTables(output, apiItem);
200
200
  this._writeThrowsSection(output, apiItem);
201
201
  break;
202
- case "Namespace" /* Namespace */:
202
+ case api_extractor_model_1.ApiItemKind.Namespace:
203
203
  this._writePackageOrNamespaceTables(output, apiItem);
204
204
  break;
205
- case "Model" /* Model */:
205
+ case api_extractor_model_1.ApiItemKind.Model:
206
206
  this._writeModelTable(output, apiItem);
207
207
  break;
208
- case "Package" /* Package */:
208
+ case api_extractor_model_1.ApiItemKind.Package:
209
209
  this._writePackageOrNamespaceTables(output, apiItem);
210
210
  break;
211
- case "Property" /* Property */:
212
- case "PropertySignature" /* PropertySignature */:
211
+ case api_extractor_model_1.ApiItemKind.Property:
212
+ case api_extractor_model_1.ApiItemKind.PropertySignature:
213
213
  break;
214
- case "TypeAlias" /* TypeAlias */:
214
+ case api_extractor_model_1.ApiItemKind.TypeAlias:
215
215
  break;
216
- case "Variable" /* Variable */:
216
+ case api_extractor_model_1.ApiItemKind.Variable:
217
217
  break;
218
218
  default:
219
219
  throw new Error('Unsupported API item kind: ' + apiItem.kind);
@@ -293,7 +293,7 @@ class MarkdownDocumenter {
293
293
  }
294
294
  }
295
295
  if (apiItem instanceof api_extractor_model_1.ApiTypeAlias) {
296
- const refs = apiItem.excerptTokens.filter((token) => token.kind === "Reference" /* Reference */ &&
296
+ const refs = apiItem.excerptTokens.filter((token) => token.kind === api_extractor_model_1.ExcerptTokenKind.Reference &&
297
297
  token.canonicalReference &&
298
298
  this._apiModel.resolveDeclarationReference(token.canonicalReference, undefined).resolvedApiItem);
299
299
  if (refs.length > 0) {
@@ -371,7 +371,7 @@ class MarkdownDocumenter {
371
371
  this._createDescriptionCell(apiMember)
372
372
  ]);
373
373
  switch (apiMember.kind) {
374
- case "Package" /* Package */:
374
+ case api_extractor_model_1.ApiItemKind.Package:
375
375
  packagesTable.addRow(row);
376
376
  this._writeApiItemPage(apiMember);
377
377
  break;
@@ -415,7 +415,7 @@ class MarkdownDocumenter {
415
415
  configuration,
416
416
  headerTitles: ['Type Alias', 'Description']
417
417
  });
418
- const apiMembers = apiContainer.kind === "Package" /* Package */
418
+ const apiMembers = apiContainer.kind === api_extractor_model_1.ApiItemKind.Package
419
419
  ? apiContainer.entryPoints[0].members
420
420
  : apiContainer.members;
421
421
  for (const apiMember of apiMembers) {
@@ -424,31 +424,31 @@ class MarkdownDocumenter {
424
424
  this._createDescriptionCell(apiMember)
425
425
  ]);
426
426
  switch (apiMember.kind) {
427
- case "Class" /* Class */:
427
+ case api_extractor_model_1.ApiItemKind.Class:
428
428
  classesTable.addRow(row);
429
429
  this._writeApiItemPage(apiMember);
430
430
  break;
431
- case "Enum" /* Enum */:
431
+ case api_extractor_model_1.ApiItemKind.Enum:
432
432
  enumerationsTable.addRow(row);
433
433
  this._writeApiItemPage(apiMember);
434
434
  break;
435
- case "Interface" /* Interface */:
435
+ case api_extractor_model_1.ApiItemKind.Interface:
436
436
  interfacesTable.addRow(row);
437
437
  this._writeApiItemPage(apiMember);
438
438
  break;
439
- case "Namespace" /* Namespace */:
439
+ case api_extractor_model_1.ApiItemKind.Namespace:
440
440
  namespacesTable.addRow(row);
441
441
  this._writeApiItemPage(apiMember);
442
442
  break;
443
- case "Function" /* Function */:
443
+ case api_extractor_model_1.ApiItemKind.Function:
444
444
  functionsTable.addRow(row);
445
445
  this._writeApiItemPage(apiMember);
446
446
  break;
447
- case "TypeAlias" /* TypeAlias */:
447
+ case api_extractor_model_1.ApiItemKind.TypeAlias:
448
448
  typeAliasesTable.addRow(row);
449
449
  this._writeApiItemPage(apiMember);
450
450
  break;
451
- case "Variable" /* Variable */:
451
+ case api_extractor_model_1.ApiItemKind.Variable:
452
452
  variablesTable.addRow(row);
453
453
  this._writeApiItemPage(apiMember);
454
454
  break;
@@ -506,7 +506,7 @@ class MarkdownDocumenter {
506
506
  });
507
507
  for (const apiMember of apiClass.members) {
508
508
  switch (apiMember.kind) {
509
- case "Constructor" /* Constructor */: {
509
+ case api_extractor_model_1.ApiItemKind.Constructor: {
510
510
  constructorsTable.addRow(new DocTableRow_1.DocTableRow({ configuration }, [
511
511
  this._createTitleCell(apiMember),
512
512
  this._createModifiersCell(apiMember),
@@ -515,7 +515,7 @@ class MarkdownDocumenter {
515
515
  this._writeApiItemPage(apiMember);
516
516
  break;
517
517
  }
518
- case "Method" /* Method */: {
518
+ case api_extractor_model_1.ApiItemKind.Method: {
519
519
  methodsTable.addRow(new DocTableRow_1.DocTableRow({ configuration }, [
520
520
  this._createTitleCell(apiMember),
521
521
  this._createModifiersCell(apiMember),
@@ -524,7 +524,7 @@ class MarkdownDocumenter {
524
524
  this._writeApiItemPage(apiMember);
525
525
  break;
526
526
  }
527
- case "Property" /* Property */: {
527
+ case api_extractor_model_1.ApiItemKind.Property: {
528
528
  if (apiMember.isEventProperty) {
529
529
  eventsTable.addRow(new DocTableRow_1.DocTableRow({ configuration }, [
530
530
  this._createTitleCell(apiMember),
@@ -611,8 +611,8 @@ class MarkdownDocumenter {
611
611
  });
612
612
  for (const apiMember of apiClass.members) {
613
613
  switch (apiMember.kind) {
614
- case "ConstructSignature" /* ConstructSignature */:
615
- case "MethodSignature" /* MethodSignature */: {
614
+ case api_extractor_model_1.ApiItemKind.ConstructSignature:
615
+ case api_extractor_model_1.ApiItemKind.MethodSignature: {
616
616
  methodsTable.addRow(new DocTableRow_1.DocTableRow({ configuration }, [
617
617
  this._createTitleCell(apiMember),
618
618
  this._createDescriptionCell(apiMember)
@@ -620,7 +620,7 @@ class MarkdownDocumenter {
620
620
  this._writeApiItemPage(apiMember);
621
621
  break;
622
622
  }
623
- case "PropertySignature" /* PropertySignature */: {
623
+ case api_extractor_model_1.ApiItemKind.PropertySignature: {
624
624
  if (apiMember.isEventProperty) {
625
625
  eventsTable.addRow(new DocTableRow_1.DocTableRow({ configuration }, [
626
626
  this._createTitleCell(apiMember),
@@ -721,7 +721,7 @@ class MarkdownDocumenter {
721
721
  // discard any newlines and let the renderer do normal word-wrapping.
722
722
  const unwrappedTokenText = token.text.replace(/[\r\n]+/g, ' ');
723
723
  // If it's hyperlinkable, then append a DocLinkTag
724
- if (token.kind === "Reference" /* Reference */ && token.canonicalReference) {
724
+ if (token.kind === api_extractor_model_1.ExcerptTokenKind.Reference && token.canonicalReference) {
725
725
  const apiItemResult = this._apiModel.resolveDeclarationReference(token.canonicalReference, undefined);
726
726
  if (apiItemResult.resolvedApiItem) {
727
727
  docNodeContainer.appendNode(new tsdoc_1.DocLinkTag({
@@ -815,8 +815,8 @@ class MarkdownDocumenter {
815
815
  }));
816
816
  for (const hierarchyItem of apiItem.getHierarchy()) {
817
817
  switch (hierarchyItem.kind) {
818
- case "Model" /* Model */:
819
- case "EntryPoint" /* EntryPoint */:
818
+ case api_extractor_model_1.ApiItemKind.Model:
819
+ case api_extractor_model_1.ApiItemKind.EntryPoint:
820
820
  // We don't show the model as part of the breadcrumb because it is the root-level container.
821
821
  // We don't show the entry point because today API Extractor doesn't support multiple entry points;
822
822
  // this may change in the future.
@@ -865,7 +865,7 @@ class MarkdownDocumenter {
865
865
  }
866
866
  }
867
867
  _getFilenameForApiItem(apiItem) {
868
- if (apiItem.kind === "Model" /* Model */) {
868
+ if (apiItem.kind === api_extractor_model_1.ApiItemKind.Model) {
869
869
  return 'index.md';
870
870
  }
871
871
  let baseName = '';
@@ -880,11 +880,11 @@ class MarkdownDocumenter {
880
880
  }
881
881
  }
882
882
  switch (hierarchyItem.kind) {
883
- case "Model" /* Model */:
884
- case "EntryPoint" /* EntryPoint */:
885
- case "EnumMember" /* EnumMember */:
883
+ case api_extractor_model_1.ApiItemKind.Model:
884
+ case api_extractor_model_1.ApiItemKind.EntryPoint:
885
+ case api_extractor_model_1.ApiItemKind.EnumMember:
886
886
  break;
887
- case "Package" /* Package */:
887
+ case api_extractor_model_1.ApiItemKind.Package:
888
888
  baseName = Utilities_1.Utilities.getSafeFilenameForName(node_core_library_1.PackageName.getUnscopedName(hierarchyItem.displayName));
889
889
  break;
890
890
  default: