@microsoft/api-extractor-model 7.32.2 → 7.33.1
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 +34 -0
- package/CHANGELOG.md +15 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-esm/aedoc/AedocDefinitions.js +57 -0
- package/lib-esm/aedoc/AedocDefinitions.js.map +1 -0
- package/lib-esm/aedoc/ReleaseTag.js +87 -0
- package/lib-esm/aedoc/ReleaseTag.js.map +1 -0
- package/lib-esm/index.js +58 -0
- package/lib-esm/index.js.map +1 -0
- package/lib-esm/items/ApiDeclaredItem.js +137 -0
- package/lib-esm/items/ApiDeclaredItem.js.map +1 -0
- package/lib-esm/items/ApiDocumentedItem.js +48 -0
- package/lib-esm/items/ApiDocumentedItem.js.map +1 -0
- package/lib-esm/items/ApiItem.js +270 -0
- package/lib-esm/items/ApiItem.js.map +1 -0
- package/lib-esm/items/ApiPropertyItem.js +45 -0
- package/lib-esm/items/ApiPropertyItem.js.map +1 -0
- package/lib-esm/mixins/ApiAbstractMixin.js +58 -0
- package/lib-esm/mixins/ApiAbstractMixin.js.map +1 -0
- package/lib-esm/mixins/ApiExportedMixin.js +63 -0
- package/lib-esm/mixins/ApiExportedMixin.js.map +1 -0
- package/lib-esm/mixins/ApiInitializerMixin.js +70 -0
- package/lib-esm/mixins/ApiInitializerMixin.js.map +1 -0
- package/lib-esm/mixins/ApiItemContainerMixin.js +319 -0
- package/lib-esm/mixins/ApiItemContainerMixin.js.map +1 -0
- package/lib-esm/mixins/ApiNameMixin.js +61 -0
- package/lib-esm/mixins/ApiNameMixin.js.map +1 -0
- package/lib-esm/mixins/ApiOptionalMixin.js +57 -0
- package/lib-esm/mixins/ApiOptionalMixin.js.map +1 -0
- package/lib-esm/mixins/ApiParameterListMixin.js +93 -0
- package/lib-esm/mixins/ApiParameterListMixin.js.map +1 -0
- package/lib-esm/mixins/ApiProtectedMixin.js +57 -0
- package/lib-esm/mixins/ApiProtectedMixin.js.map +1 -0
- package/lib-esm/mixins/ApiReadonlyMixin.js +58 -0
- package/lib-esm/mixins/ApiReadonlyMixin.js.map +1 -0
- package/lib-esm/mixins/ApiReleaseTagMixin.js +65 -0
- package/lib-esm/mixins/ApiReleaseTagMixin.js.map +1 -0
- package/lib-esm/mixins/ApiReturnTypeMixin.js +65 -0
- package/lib-esm/mixins/ApiReturnTypeMixin.js.map +1 -0
- package/lib-esm/mixins/ApiStaticMixin.js +57 -0
- package/lib-esm/mixins/ApiStaticMixin.js.map +1 -0
- package/lib-esm/mixins/ApiTypeParameterListMixin.js +90 -0
- package/lib-esm/mixins/ApiTypeParameterListMixin.js.map +1 -0
- package/lib-esm/mixins/Excerpt.js +101 -0
- package/lib-esm/mixins/Excerpt.js.map +1 -0
- package/lib-esm/mixins/IFindApiItemsResult.js +26 -0
- package/lib-esm/mixins/IFindApiItemsResult.js.map +1 -0
- package/lib-esm/mixins/Mixin.js +4 -0
- package/lib-esm/mixins/Mixin.js.map +1 -0
- package/lib-esm/model/ApiCallSignature.js +63 -0
- package/lib-esm/model/ApiCallSignature.js.map +1 -0
- package/lib-esm/model/ApiClass.js +84 -0
- package/lib-esm/model/ApiClass.js.map +1 -0
- package/lib-esm/model/ApiConstructSignature.js +76 -0
- package/lib-esm/model/ApiConstructSignature.js.map +1 -0
- package/lib-esm/model/ApiConstructor.js +60 -0
- package/lib-esm/model/ApiConstructor.js.map +1 -0
- package/lib-esm/model/ApiEntryPoint.js +71 -0
- package/lib-esm/model/ApiEntryPoint.js.map +1 -0
- package/lib-esm/model/ApiEnum.js +65 -0
- package/lib-esm/model/ApiEnum.js.map +1 -0
- package/lib-esm/model/ApiEnumMember.js +80 -0
- package/lib-esm/model/ApiEnumMember.js.map +1 -0
- package/lib-esm/model/ApiFunction.js +58 -0
- package/lib-esm/model/ApiFunction.js.map +1 -0
- package/lib-esm/model/ApiIndexSignature.js +56 -0
- package/lib-esm/model/ApiIndexSignature.js.map +1 -0
- package/lib-esm/model/ApiInterface.js +73 -0
- package/lib-esm/model/ApiInterface.js.map +1 -0
- package/lib-esm/model/ApiMethod.js +65 -0
- package/lib-esm/model/ApiMethod.js.map +1 -0
- package/lib-esm/model/ApiMethodSignature.js +57 -0
- package/lib-esm/model/ApiMethodSignature.js.map +1 -0
- package/lib-esm/model/ApiModel.js +170 -0
- package/lib-esm/model/ApiModel.js.map +1 -0
- package/lib-esm/model/ApiNamespace.js +56 -0
- package/lib-esm/model/ApiNamespace.js.map +1 -0
- package/lib-esm/model/ApiPackage.js +148 -0
- package/lib-esm/model/ApiPackage.js.map +1 -0
- package/lib-esm/model/ApiProperty.js +72 -0
- package/lib-esm/model/ApiProperty.js.map +1 -0
- package/lib-esm/model/ApiPropertySignature.js +51 -0
- package/lib-esm/model/ApiPropertySignature.js.map +1 -0
- package/lib-esm/model/ApiTypeAlias.js +71 -0
- package/lib-esm/model/ApiTypeAlias.js.map +1 -0
- package/lib-esm/model/ApiVariable.js +66 -0
- package/lib-esm/model/ApiVariable.js.map +1 -0
- package/lib-esm/model/Deserializer.js +88 -0
- package/lib-esm/model/Deserializer.js.map +1 -0
- package/lib-esm/model/DeserializerContext.js +111 -0
- package/lib-esm/model/DeserializerContext.js.map +1 -0
- package/lib-esm/model/HeritageType.js +25 -0
- package/lib-esm/model/HeritageType.js.map +1 -0
- package/lib-esm/model/ModelReferenceResolver.js +177 -0
- package/lib-esm/model/ModelReferenceResolver.js.map +1 -0
- package/lib-esm/model/Parameter.js +39 -0
- package/lib-esm/model/Parameter.js.map +1 -0
- package/lib-esm/model/SourceLocation.js +35 -0
- package/lib-esm/model/SourceLocation.js.map +1 -0
- package/lib-esm/model/TypeParameter.js +49 -0
- package/lib-esm/model/TypeParameter.js.map +1 -0
- package/package.json +29 -5
- /package/{lib → lib-commonjs}/aedoc/AedocDefinitions.js +0 -0
- /package/{lib → lib-commonjs}/aedoc/AedocDefinitions.js.map +0 -0
- /package/{lib → lib-commonjs}/aedoc/ReleaseTag.js +0 -0
- /package/{lib → lib-commonjs}/aedoc/ReleaseTag.js.map +0 -0
- /package/{lib → lib-commonjs}/index.js +0 -0
- /package/{lib → lib-commonjs}/index.js.map +0 -0
- /package/{lib → lib-commonjs}/items/ApiDeclaredItem.js +0 -0
- /package/{lib → lib-commonjs}/items/ApiDeclaredItem.js.map +0 -0
- /package/{lib → lib-commonjs}/items/ApiDocumentedItem.js +0 -0
- /package/{lib → lib-commonjs}/items/ApiDocumentedItem.js.map +0 -0
- /package/{lib → lib-commonjs}/items/ApiItem.js +0 -0
- /package/{lib → lib-commonjs}/items/ApiItem.js.map +0 -0
- /package/{lib → lib-commonjs}/items/ApiPropertyItem.js +0 -0
- /package/{lib → lib-commonjs}/items/ApiPropertyItem.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiAbstractMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiAbstractMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiExportedMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiExportedMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiInitializerMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiInitializerMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiItemContainerMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiItemContainerMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiNameMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiNameMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiOptionalMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiOptionalMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiParameterListMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiParameterListMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiProtectedMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiProtectedMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiReadonlyMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiReadonlyMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiReleaseTagMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiReleaseTagMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiReturnTypeMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiReturnTypeMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiStaticMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiStaticMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiTypeParameterListMixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/ApiTypeParameterListMixin.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/Excerpt.js +0 -0
- /package/{lib → lib-commonjs}/mixins/Excerpt.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/IFindApiItemsResult.js +0 -0
- /package/{lib → lib-commonjs}/mixins/IFindApiItemsResult.js.map +0 -0
- /package/{lib → lib-commonjs}/mixins/Mixin.js +0 -0
- /package/{lib → lib-commonjs}/mixins/Mixin.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiCallSignature.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiCallSignature.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiClass.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiClass.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiConstructSignature.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiConstructSignature.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiConstructor.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiConstructor.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiEntryPoint.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiEntryPoint.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiEnum.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiEnum.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiEnumMember.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiEnumMember.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiFunction.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiFunction.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiIndexSignature.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiIndexSignature.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiInterface.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiInterface.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiMethod.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiMethod.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiMethodSignature.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiMethodSignature.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiModel.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiModel.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiNamespace.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiNamespace.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiPackage.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiPackage.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiProperty.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiProperty.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiPropertySignature.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiPropertySignature.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiTypeAlias.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiTypeAlias.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ApiVariable.js +0 -0
- /package/{lib → lib-commonjs}/model/ApiVariable.js.map +0 -0
- /package/{lib → lib-commonjs}/model/Deserializer.js +0 -0
- /package/{lib → lib-commonjs}/model/Deserializer.js.map +0 -0
- /package/{lib → lib-commonjs}/model/DeserializerContext.js +0 -0
- /package/{lib → lib-commonjs}/model/DeserializerContext.js.map +0 -0
- /package/{lib → lib-commonjs}/model/HeritageType.js +0 -0
- /package/{lib → lib-commonjs}/model/HeritageType.js.map +0 -0
- /package/{lib → lib-commonjs}/model/ModelReferenceResolver.js +0 -0
- /package/{lib → lib-commonjs}/model/ModelReferenceResolver.js.map +0 -0
- /package/{lib → lib-commonjs}/model/Parameter.js +0 -0
- /package/{lib → lib-commonjs}/model/Parameter.js.map +0 -0
- /package/{lib → lib-commonjs}/model/SourceLocation.js +0 -0
- /package/{lib → lib-commonjs}/model/SourceLocation.js.map +0 -0
- /package/{lib → lib-commonjs}/model/TypeParameter.js +0 -0
- /package/{lib → lib-commonjs}/model/TypeParameter.js.map +0 -0
- /package/{lib → lib-dts}/aedoc/AedocDefinitions.d.ts +0 -0
- /package/{lib → lib-dts}/aedoc/AedocDefinitions.d.ts.map +0 -0
- /package/{lib → lib-dts}/aedoc/ReleaseTag.d.ts +0 -0
- /package/{lib → lib-dts}/aedoc/ReleaseTag.d.ts.map +0 -0
- /package/{lib → lib-dts}/index.d.ts +0 -0
- /package/{lib → lib-dts}/index.d.ts.map +0 -0
- /package/{lib → lib-dts}/items/ApiDeclaredItem.d.ts +0 -0
- /package/{lib → lib-dts}/items/ApiDeclaredItem.d.ts.map +0 -0
- /package/{lib → lib-dts}/items/ApiDocumentedItem.d.ts +0 -0
- /package/{lib → lib-dts}/items/ApiDocumentedItem.d.ts.map +0 -0
- /package/{lib → lib-dts}/items/ApiItem.d.ts +0 -0
- /package/{lib → lib-dts}/items/ApiItem.d.ts.map +0 -0
- /package/{lib → lib-dts}/items/ApiPropertyItem.d.ts +0 -0
- /package/{lib → lib-dts}/items/ApiPropertyItem.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiAbstractMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiAbstractMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiExportedMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiExportedMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiInitializerMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiInitializerMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiItemContainerMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiItemContainerMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiNameMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiNameMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiOptionalMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiOptionalMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiParameterListMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiParameterListMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiProtectedMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiProtectedMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiReadonlyMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiReadonlyMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiReleaseTagMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiReleaseTagMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiReturnTypeMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiReturnTypeMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiStaticMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiStaticMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/ApiTypeParameterListMixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/ApiTypeParameterListMixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/Excerpt.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/Excerpt.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/IFindApiItemsResult.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/IFindApiItemsResult.d.ts.map +0 -0
- /package/{lib → lib-dts}/mixins/Mixin.d.ts +0 -0
- /package/{lib → lib-dts}/mixins/Mixin.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiCallSignature.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiCallSignature.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiClass.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiClass.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiConstructSignature.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiConstructSignature.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiConstructor.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiConstructor.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiEntryPoint.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiEntryPoint.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiEnum.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiEnum.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiEnumMember.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiEnumMember.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiFunction.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiFunction.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiIndexSignature.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiIndexSignature.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiInterface.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiInterface.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiMethod.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiMethod.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiMethodSignature.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiMethodSignature.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiModel.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiModel.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiNamespace.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiNamespace.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiPackage.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiPackage.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiProperty.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiProperty.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiPropertySignature.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiPropertySignature.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiTypeAlias.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiTypeAlias.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ApiVariable.d.ts +0 -0
- /package/{lib → lib-dts}/model/ApiVariable.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/Deserializer.d.ts +0 -0
- /package/{lib → lib-dts}/model/Deserializer.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/DeserializerContext.d.ts +0 -0
- /package/{lib → lib-dts}/model/DeserializerContext.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/HeritageType.d.ts +0 -0
- /package/{lib → lib-dts}/model/HeritageType.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/ModelReferenceResolver.d.ts +0 -0
- /package/{lib → lib-dts}/model/ModelReferenceResolver.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/Parameter.d.ts +0 -0
- /package/{lib → lib-dts}/model/Parameter.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/SourceLocation.d.ts +0 -0
- /package/{lib → lib-dts}/model/SourceLocation.d.ts.map +0 -0
- /package/{lib → lib-dts}/model/TypeParameter.d.ts +0 -0
- /package/{lib → lib-dts}/model/TypeParameter.d.ts.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IFindApiItemsResult.js","sourceRoot":"","sources":["../../src/mixins/IFindApiItemsResult.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AA2C3D;;;GAGG;AACH,MAAM,CAAN,IAAY,qBAoBX;AApBD,WAAY,qBAAqB;IAC/B;;OAEG;IACH,sFAA6D,CAAA;IAE7D;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,yEAAgD,CAAA;IAEhD;;OAEG;IACH,6DAAoC,CAAA;AACtC,CAAC,EApBW,qBAAqB,KAArB,qBAAqB,QAoBhC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport type { ApiItem } from '../items/ApiItem';\n\n/**\n * Generic result object for finding API items used by different kinds of find operations.\n * @public\n */\nexport interface IFindApiItemsResult {\n /**\n * The API items that were found. Not guaranteed to be complete, see `maybeIncompleteResult`.\n */\n items: ApiItem[];\n\n /**\n * Diagnostic messages regarding the find operation.\n */\n messages: IFindApiItemsMessage[];\n\n /**\n * Indicates whether the result is potentially incomplete due to errors during the find operation.\n * If true, the `messages` explain the errors in more detail.\n */\n maybeIncompleteResult: boolean;\n}\n\n/**\n * This object is used for messages returned as part of `IFindApiItemsResult`.\n * @public\n */\nexport interface IFindApiItemsMessage {\n /**\n * Unique identifier for the message.\n * @beta\n */\n messageId: FindApiItemsMessageId;\n\n /**\n * Text description of the message.\n */\n text: string;\n}\n\n/**\n * Unique identifiers for messages returned as part of `IFindApiItemsResult`.\n * @public\n */\nexport enum FindApiItemsMessageId {\n /**\n * \"Unable to resolve declaration reference within API item ___: ___\"\n */\n DeclarationResolutionFailed = 'declaration-resolution-failed',\n\n /**\n * \"Unable to analyze extends clause ___ of API item ___ because no canonical reference was found.\"\n */\n ExtendsClauseMissingReference = 'extends-clause-missing-reference',\n\n /**\n * \"Unable to analyze references of API item ___ because it is not associated with an ApiModel\"\n */\n NoAssociatedApiModel = 'no-associated-api-model',\n\n /**\n * \"Unable to analyze references of API item ___ because it is of unsupported kind ___\"\n */\n UnsupportedKind = 'unsupported-kind'\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mixin.js","sourceRoot":"","sources":["../../src/mixins/Mixin.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * This abstraction is used by the mixin pattern.\n * It describes a class constructor.\n * @public\n */\nexport type Constructor<T = {}> = new (...args: any[]) => T; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n/**\n * This abstraction is used by the mixin pattern.\n * It describes the \"static side\" of a class.\n *\n * @public\n */\nexport type PropertiesOf<T> = { [K in keyof T]: T[K] };\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
6
|
+
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
7
|
+
import { ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
8
|
+
import { ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';
|
|
9
|
+
import { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
10
|
+
/**
|
|
11
|
+
* Represents a TypeScript function call signature.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
16
|
+
* API declarations.
|
|
17
|
+
*
|
|
18
|
+
* `ApiCallSignature` represents a TypeScript declaration such as `(x: number, y: number): number`
|
|
19
|
+
* in this example:
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* export interface IChooser {
|
|
23
|
+
* // A call signature:
|
|
24
|
+
* (x: number, y: number): number;
|
|
25
|
+
*
|
|
26
|
+
* // Another overload for this call signature:
|
|
27
|
+
* (x: string, y: string): string;
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* function chooseFirst<T>(x: T, y: T): T {
|
|
31
|
+
* return x;
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* let chooser: IChooser = chooseFirst;
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export class ApiCallSignature extends ApiTypeParameterListMixin(ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiDeclaredItem)))) {
|
|
40
|
+
constructor(options) {
|
|
41
|
+
super(options);
|
|
42
|
+
}
|
|
43
|
+
static getContainerKey(overloadIndex) {
|
|
44
|
+
return `|${ApiItemKind.CallSignature}|${overloadIndex}`;
|
|
45
|
+
}
|
|
46
|
+
/** @override */
|
|
47
|
+
get kind() {
|
|
48
|
+
return ApiItemKind.CallSignature;
|
|
49
|
+
}
|
|
50
|
+
/** @override */
|
|
51
|
+
get containerKey() {
|
|
52
|
+
return ApiCallSignature.getContainerKey(this.overloadIndex);
|
|
53
|
+
}
|
|
54
|
+
/** @beta @override */
|
|
55
|
+
buildCanonicalReference() {
|
|
56
|
+
const parent = this.parent
|
|
57
|
+
? this.parent.canonicalReference
|
|
58
|
+
: // .withMeaning() requires some kind of component
|
|
59
|
+
DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');
|
|
60
|
+
return parent.withMeaning(Meaning.CallSignature).withOverloadIndex(this.overloadIndex);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=ApiCallSignature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiCallSignature.js","sourceRoot":"","sources":["../../src/model/ApiCallSignature.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,UAAU,EACX,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAgC,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAsC,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAmC,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAmC,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAEL,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAa7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,OAAO,gBAAiB,SAAQ,yBAAyB,CAC7D,qBAAqB,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAC/E;IACC,YAAmB,OAAiC;QAClD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,WAAW,CAAC,aAAa,IAAI,aAAa,EAAE,CAAC;IAC1D,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,aAAa,CAAC;IACnC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,MAAM,GAAyB,IAAI,CAAC,MAAM;YAC9C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YAChC,CAAC,CAAC,iDAAiD;gBACjD,oBAAoB,CAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACzF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';\nimport {\n type IApiTypeParameterListMixinOptions,\n ApiTypeParameterListMixin\n} from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link ApiCallSignature}.\n * @public\n */\nexport interface IApiCallSignatureOptions\n extends IApiTypeParameterListMixinOptions,\n IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript function call signature.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiCallSignature` represents a TypeScript declaration such as `(x: number, y: number): number`\n * in this example:\n *\n * ```ts\n * export interface IChooser {\n * // A call signature:\n * (x: number, y: number): number;\n *\n * // Another overload for this call signature:\n * (x: string, y: string): string;\n * }\n *\n * function chooseFirst<T>(x: T, y: T): T {\n * return x;\n * }\n *\n * let chooser: IChooser = chooseFirst;\n * ```\n *\n * @public\n */\nexport class ApiCallSignature extends ApiTypeParameterListMixin(\n ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiCallSignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.CallSignature}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.CallSignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiCallSignature.getContainerKey(this.overloadIndex);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const parent: DeclarationReference = this.parent\n ? this.parent.canonicalReference\n : // .withMeaning() requires some kind of component\n DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');\n return parent.withMeaning(Meaning.CallSignature).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
6
|
+
import { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';
|
|
7
|
+
import { ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
8
|
+
import { HeritageType } from './HeritageType';
|
|
9
|
+
import { ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
10
|
+
import { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
11
|
+
import { ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
12
|
+
import { ApiAbstractMixin } from '../mixins/ApiAbstractMixin';
|
|
13
|
+
/**
|
|
14
|
+
* Represents a TypeScript class declaration.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
19
|
+
* API declarations.
|
|
20
|
+
*
|
|
21
|
+
* `ApiClass` represents a TypeScript declaration such as this:
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* export class X { }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export class ApiClass extends ApiItemContainerMixin(ApiNameMixin(ApiAbstractMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))))) {
|
|
30
|
+
constructor(options) {
|
|
31
|
+
super(options);
|
|
32
|
+
this._implementsTypes = [];
|
|
33
|
+
if (options.extendsTokenRange) {
|
|
34
|
+
this.extendsType = new HeritageType(this.buildExcerpt(options.extendsTokenRange));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.extendsType = undefined;
|
|
38
|
+
}
|
|
39
|
+
for (const implementsTokenRange of options.implementsTokenRanges) {
|
|
40
|
+
this._implementsTypes.push(new HeritageType(this.buildExcerpt(implementsTokenRange)));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
static getContainerKey(name) {
|
|
44
|
+
return `${name}|${ApiItemKind.Class}`;
|
|
45
|
+
}
|
|
46
|
+
/** @override */
|
|
47
|
+
static onDeserializeInto(options, context, jsonObject) {
|
|
48
|
+
super.onDeserializeInto(options, context, jsonObject);
|
|
49
|
+
options.extendsTokenRange = jsonObject.extendsTokenRange;
|
|
50
|
+
options.implementsTokenRanges = jsonObject.implementsTokenRanges;
|
|
51
|
+
}
|
|
52
|
+
/** @override */
|
|
53
|
+
get kind() {
|
|
54
|
+
return ApiItemKind.Class;
|
|
55
|
+
}
|
|
56
|
+
/** @override */
|
|
57
|
+
get containerKey() {
|
|
58
|
+
return ApiClass.getContainerKey(this.name);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The list of interfaces that this class implements using the `implements` keyword.
|
|
62
|
+
*/
|
|
63
|
+
get implementsTypes() {
|
|
64
|
+
return this._implementsTypes;
|
|
65
|
+
}
|
|
66
|
+
/** @override */
|
|
67
|
+
serializeInto(jsonObject) {
|
|
68
|
+
super.serializeInto(jsonObject);
|
|
69
|
+
// Note that JSON does not support the "undefined" value, so we simply omit the field entirely if it is undefined
|
|
70
|
+
if (this.extendsType) {
|
|
71
|
+
jsonObject.extendsTokenRange = this.extendsType.excerpt.tokenRange;
|
|
72
|
+
}
|
|
73
|
+
jsonObject.implementsTokenRanges = this.implementsTypes.map((x) => x.excerpt.tokenRange);
|
|
74
|
+
}
|
|
75
|
+
/** @beta @override */
|
|
76
|
+
buildCanonicalReference() {
|
|
77
|
+
const nameComponent = DeclarationReference.parseComponent(this.name);
|
|
78
|
+
const navigation = this.isExported ? Navigation.Exports : Navigation.Locals;
|
|
79
|
+
return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
|
|
80
|
+
.addNavigationStep(navigation, nameComponent)
|
|
81
|
+
.withMeaning(Meaning.Class);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=ApiClass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiClass.js","sourceRoot":"","sources":["../../src/model/ApiClass.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,UAAU,EAEX,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,eAAe,EAGhB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAsC,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAmC,MAAM,8BAA8B,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAA6B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EACL,yBAAyB,EAG1B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAGL,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,gBAAgB,EAGjB,MAAM,4BAA4B,CAAC;AA2BpC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,QAAS,SAAQ,qBAAqB,CACjD,YAAY,CACV,gBAAgB,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CACnG,CACF;IAQC,YAAmB,OAAyB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QAHA,qBAAgB,GAAmB,EAAE,CAAC;QAKrD,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC9B,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACpF,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC/B,CAAC;QAED,KAAK,MAAM,oBAAoB,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;YACjE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAkC,EAClC,OAA4B,EAC5B,UAAyB;QAEzB,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,iBAAiB,GAAG,UAAU,CAAC,iBAAiB,CAAC;QACzD,OAAO,CAAC,qBAAqB,GAAG,UAAU,CAAC,qBAAqB,CAAC;IACnE,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAkC;QACrD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,iHAAiH;QACjH,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,UAAU,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;QACrE,CAAC;QAED,UAAU,CAAC,qBAAqB,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3F,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,oBAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport type { IExcerptTokenRange } from '../mixins/Excerpt';\nimport { HeritageType } from './HeritageType';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n ApiTypeParameterListMixin,\n type IApiTypeParameterListMixinOptions,\n type IApiTypeParameterListMixinJson\n} from '../mixins/ApiTypeParameterListMixin';\nimport type { DeserializerContext } from './DeserializerContext';\nimport {\n type IApiExportedMixinJson,\n type IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\nimport {\n ApiAbstractMixin,\n type IApiAbstractMixinJson,\n type IApiAbstractMixinOptions\n} from '../mixins/ApiAbstractMixin';\n\n/**\n * Constructor options for {@link ApiClass}.\n * @public\n */\nexport interface IApiClassOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiAbstractMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n extendsTokenRange: IExcerptTokenRange | undefined;\n implementsTokenRanges: IExcerptTokenRange[];\n}\n\nexport interface IApiClassJson\n extends IApiDeclaredItemJson,\n IApiAbstractMixinJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n extendsTokenRange?: IExcerptTokenRange;\n implementsTokenRanges: IExcerptTokenRange[];\n}\n\n/**\n * Represents a TypeScript class declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiClass` represents a TypeScript declaration such as this:\n *\n * ```ts\n * export class X { }\n * ```\n *\n * @public\n */\nexport class ApiClass extends ApiItemContainerMixin(\n ApiNameMixin(\n ApiAbstractMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem))))\n )\n) {\n /**\n * The base class that this class inherits from (using the `extends` keyword), or undefined if there is no base class.\n */\n public readonly extendsType: HeritageType | undefined;\n\n private readonly _implementsTypes: HeritageType[] = [];\n\n public constructor(options: IApiClassOptions) {\n super(options);\n\n if (options.extendsTokenRange) {\n this.extendsType = new HeritageType(this.buildExcerpt(options.extendsTokenRange));\n } else {\n this.extendsType = undefined;\n }\n\n for (const implementsTokenRange of options.implementsTokenRanges) {\n this._implementsTypes.push(new HeritageType(this.buildExcerpt(implementsTokenRange)));\n }\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Class}`;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiClassOptions>,\n context: DeserializerContext,\n jsonObject: IApiClassJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.extendsTokenRange = jsonObject.extendsTokenRange;\n options.implementsTokenRanges = jsonObject.implementsTokenRanges;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Class;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiClass.getContainerKey(this.name);\n }\n\n /**\n * The list of interfaces that this class implements using the `implements` keyword.\n */\n public get implementsTypes(): ReadonlyArray<HeritageType> {\n return this._implementsTypes;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiClassJson>): void {\n super.serializeInto(jsonObject);\n\n // Note that JSON does not support the \"undefined\" value, so we simply omit the field entirely if it is undefined\n if (this.extendsType) {\n jsonObject.extendsTokenRange = this.extendsType.excerpt.tokenRange;\n }\n\n jsonObject.implementsTokenRanges = this.implementsTypes.map((x) => x.excerpt.tokenRange);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Class);\n }\n}\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
6
|
+
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
7
|
+
import { ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
8
|
+
import { ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';
|
|
9
|
+
import { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
10
|
+
/**
|
|
11
|
+
* Represents a TypeScript construct signature that belongs to an `ApiInterface`.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
16
|
+
* API declarations.
|
|
17
|
+
*
|
|
18
|
+
* `ApiConstructSignature` represents a construct signature using the `new` keyword such as in this example:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* export interface IVector {
|
|
22
|
+
* x: number;
|
|
23
|
+
* y: number;
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* export interface IVectorConstructor {
|
|
27
|
+
* // A construct signature:
|
|
28
|
+
* new(x: number, y: number): IVector;
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* export function createVector(vectorConstructor: IVectorConstructor,
|
|
32
|
+
* x: number, y: number): IVector {
|
|
33
|
+
* return new vectorConstructor(x, y);
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* class Vector implements IVector {
|
|
37
|
+
* public x: number;
|
|
38
|
+
* public y: number;
|
|
39
|
+
* public constructor(x: number, y: number) {
|
|
40
|
+
* this.x = x;
|
|
41
|
+
* this.y = y;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* let vector: Vector = createVector(Vector, 1, 2);
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* Compare with {@link ApiConstructor}, which describes the class constructor itself.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export class ApiConstructSignature extends ApiTypeParameterListMixin(ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiDeclaredItem)))) {
|
|
53
|
+
constructor(options) {
|
|
54
|
+
super(options);
|
|
55
|
+
}
|
|
56
|
+
static getContainerKey(overloadIndex) {
|
|
57
|
+
return `|${ApiItemKind.ConstructSignature}|${overloadIndex}`;
|
|
58
|
+
}
|
|
59
|
+
/** @override */
|
|
60
|
+
get kind() {
|
|
61
|
+
return ApiItemKind.ConstructSignature;
|
|
62
|
+
}
|
|
63
|
+
/** @override */
|
|
64
|
+
get containerKey() {
|
|
65
|
+
return ApiConstructSignature.getContainerKey(this.overloadIndex);
|
|
66
|
+
}
|
|
67
|
+
/** @beta @override */
|
|
68
|
+
buildCanonicalReference() {
|
|
69
|
+
const parent = this.parent
|
|
70
|
+
? this.parent.canonicalReference
|
|
71
|
+
: // .withMeaning() requires some kind of component
|
|
72
|
+
DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');
|
|
73
|
+
return parent.withMeaning(Meaning.ConstructSignature).withOverloadIndex(this.overloadIndex);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=ApiConstructSignature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiConstructSignature.js","sourceRoot":"","sources":["../../src/model/ApiConstructSignature.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,UAAU,EACX,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAgC,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAsC,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAmC,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAmC,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EACL,yBAAyB,EAE1B,MAAM,qCAAqC,CAAC;AAa7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,OAAO,qBAAsB,SAAQ,yBAAyB,CAClE,qBAAqB,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CAAC,CAC/E;IACC,YAAmB,OAAsC;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,WAAW,CAAC,kBAAkB,IAAI,aAAa,EAAE,CAAC;IAC/D,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,kBAAkB,CAAC;IACxC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,qBAAqB,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACnE,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,MAAM,GAAyB,IAAI,CAAC,MAAM;YAC9C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YAChC,CAAC,CAAC,iDAAiD;gBACjD,oBAAoB,CAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9F,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';\nimport {\n ApiTypeParameterListMixin,\n type IApiTypeParameterListMixinOptions\n} from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link ApiConstructor}.\n * @public\n */\nexport interface IApiConstructSignatureOptions\n extends IApiTypeParameterListMixinOptions,\n IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript construct signature that belongs to an `ApiInterface`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiConstructSignature` represents a construct signature using the `new` keyword such as in this example:\n *\n * ```ts\n * export interface IVector {\n * x: number;\n * y: number;\n * }\n *\n * export interface IVectorConstructor {\n * // A construct signature:\n * new(x: number, y: number): IVector;\n * }\n *\n * export function createVector(vectorConstructor: IVectorConstructor,\n * x: number, y: number): IVector {\n * return new vectorConstructor(x, y);\n * }\n *\n * class Vector implements IVector {\n * public x: number;\n * public y: number;\n * public constructor(x: number, y: number) {\n * this.x = x;\n * this.y = y;\n * }\n * }\n *\n * let vector: Vector = createVector(Vector, 1, 2);\n * ```\n *\n * Compare with {@link ApiConstructor}, which describes the class constructor itself.\n *\n * @public\n */\nexport class ApiConstructSignature extends ApiTypeParameterListMixin(\n ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiConstructSignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.ConstructSignature}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.ConstructSignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiConstructSignature.getContainerKey(this.overloadIndex);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const parent: DeclarationReference = this.parent\n ? this.parent.canonicalReference\n : // .withMeaning() requires some kind of component\n DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');\n return parent.withMeaning(Meaning.ConstructSignature).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
6
|
+
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
7
|
+
import { ApiProtectedMixin } from '../mixins/ApiProtectedMixin';
|
|
8
|
+
import { ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
9
|
+
/**
|
|
10
|
+
* Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
*
|
|
14
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
15
|
+
* API declarations.
|
|
16
|
+
*
|
|
17
|
+
* `ApiConstructor` represents a declaration using the `constructor` keyword such as in this example:
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* export class Vector {
|
|
21
|
+
* public x: number;
|
|
22
|
+
* public y: number;
|
|
23
|
+
*
|
|
24
|
+
* // A class constructor:
|
|
25
|
+
* public constructor(x: number, y: number) {
|
|
26
|
+
* this.x = x;
|
|
27
|
+
* this.y = y;
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* Compare with {@link ApiConstructSignature}, which describes the construct signature for a class constructor.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export class ApiConstructor extends ApiParameterListMixin(ApiProtectedMixin(ApiReleaseTagMixin(ApiDeclaredItem))) {
|
|
37
|
+
constructor(options) {
|
|
38
|
+
super(options);
|
|
39
|
+
}
|
|
40
|
+
static getContainerKey(overloadIndex) {
|
|
41
|
+
return `|${ApiItemKind.Constructor}|${overloadIndex}`;
|
|
42
|
+
}
|
|
43
|
+
/** @override */
|
|
44
|
+
get kind() {
|
|
45
|
+
return ApiItemKind.Constructor;
|
|
46
|
+
}
|
|
47
|
+
/** @override */
|
|
48
|
+
get containerKey() {
|
|
49
|
+
return ApiConstructor.getContainerKey(this.overloadIndex);
|
|
50
|
+
}
|
|
51
|
+
/** @beta @override */
|
|
52
|
+
buildCanonicalReference() {
|
|
53
|
+
const parent = this.parent
|
|
54
|
+
? this.parent.canonicalReference
|
|
55
|
+
: // .withMeaning() requires some kind of component
|
|
56
|
+
DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');
|
|
57
|
+
return parent.withMeaning(Meaning.Constructor).withOverloadIndex(this.overloadIndex);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=ApiConstructor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiConstructor.js","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,UAAU,EACX,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAgC,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAsC,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAkC,MAAM,6BAA6B,CAAC;AAChG,OAAO,EAAmC,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAYnG;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,cAAe,SAAQ,qBAAqB,CACvD,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC,CACvD;IACC,YAAmB,OAA+B;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,WAAW,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;IACxD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,WAAW,CAAC;IACjC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,MAAM,GAAyB,IAAI,CAAC,MAAM;YAC9C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YAChC,CAAC,CAAC,iDAAiD;gBACjD,oBAAoB,CAAC,KAAK,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACvF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { type IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { type IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { type IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\n\n/**\n * Constructor options for {@link ApiConstructor}.\n * @public\n */\nexport interface IApiConstructorOptions\n extends IApiParameterListMixinOptions,\n IApiProtectedMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiConstructor` represents a declaration using the `constructor` keyword such as in this example:\n *\n * ```ts\n * export class Vector {\n * public x: number;\n * public y: number;\n *\n * // A class constructor:\n * public constructor(x: number, y: number) {\n * this.x = x;\n * this.y = y;\n * }\n * }\n * ```\n *\n * Compare with {@link ApiConstructSignature}, which describes the construct signature for a class constructor.\n *\n * @public\n */\nexport class ApiConstructor extends ApiParameterListMixin(\n ApiProtectedMixin(ApiReleaseTagMixin(ApiDeclaredItem))\n) {\n public constructor(options: IApiConstructorOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.Constructor}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Constructor;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiConstructor.getContainerKey(this.overloadIndex);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const parent: DeclarationReference = this.parent\n ? this.parent.canonicalReference\n : // .withMeaning() requires some kind of component\n DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');\n return parent.withMeaning(Meaning.Constructor).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItem, ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';
|
|
6
|
+
import { ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
|
+
import { ApiPackage } from './ApiPackage';
|
|
8
|
+
/**
|
|
9
|
+
* Represents the entry point for an NPM package.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
14
|
+
* API declarations.
|
|
15
|
+
*
|
|
16
|
+
* `ApiEntryPoint` represents the entry point to an NPM package. API Extractor does not currently support
|
|
17
|
+
* analysis of multiple entry points, but the `ApiEntryPoint` object is included to support a future feature.
|
|
18
|
+
* In the current implementation, `ApiEntryPoint.importPath` is always the empty string.
|
|
19
|
+
*
|
|
20
|
+
* For example, suppose the package.json file looks like this:
|
|
21
|
+
*
|
|
22
|
+
* ```json
|
|
23
|
+
* {
|
|
24
|
+
* "name": "example-library",
|
|
25
|
+
* "version": "1.0.0",
|
|
26
|
+
* "main": "./lib/index.js",
|
|
27
|
+
* "typings": "./lib/index.d.ts"
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* In this example, the `ApiEntryPoint` would represent the TypeScript module for `./lib/index.js`.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export class ApiEntryPoint extends ApiItemContainerMixin(ApiNameMixin(ApiItem)) {
|
|
36
|
+
constructor(options) {
|
|
37
|
+
super(options);
|
|
38
|
+
}
|
|
39
|
+
/** @override */
|
|
40
|
+
get kind() {
|
|
41
|
+
return ApiItemKind.EntryPoint;
|
|
42
|
+
}
|
|
43
|
+
/** @override */
|
|
44
|
+
get containerKey() {
|
|
45
|
+
// No prefix needed, because ApiEntryPoint is the only possible member of an ApiPackage
|
|
46
|
+
return this.name;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The module path for this entry point, relative to the parent `ApiPackage`. In the current implementation,
|
|
50
|
+
* this is always the empty string, indicating the default entry point.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
*
|
|
54
|
+
* API Extractor does not currently support analysis of multiple entry points. If that feature is implemented
|
|
55
|
+
* in the future, then the `ApiEntryPoint.importPath` will be used to distinguish different entry points,
|
|
56
|
+
* for example: `controls/Button` in `import { Button } from "example-package/controls/Button";`.
|
|
57
|
+
*
|
|
58
|
+
* The `ApiEntryPoint.name` property stores the same value as `ApiEntryPoint.importPath`.
|
|
59
|
+
*/
|
|
60
|
+
get importPath() {
|
|
61
|
+
return this.name;
|
|
62
|
+
}
|
|
63
|
+
/** @beta @override */
|
|
64
|
+
buildCanonicalReference() {
|
|
65
|
+
if (this.parent instanceof ApiPackage) {
|
|
66
|
+
return DeclarationReference.package(this.parent.name, this.importPath);
|
|
67
|
+
}
|
|
68
|
+
return DeclarationReference.empty();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ApiEntryPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiEntryPoint.js","sourceRoot":"","sources":["../../src/model/ApiEntryPoint.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAE/F,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAsC,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAA6B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,aAAc,SAAQ,qBAAqB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAC7E,YAAmB,OAA8B;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,uFAAuF;QACvF,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,IAAI,IAAI,CAAC,MAAM,YAAY,UAAU,EAAE,CAAC;YACtC,OAAO,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACzE,CAAC;QAED,OAAO,oBAAoB,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiPackage } from './ApiPackage';\n\n/**\n * Constructor options for {@link ApiEntryPoint}.\n * @public\n */\nexport interface IApiEntryPointOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions {}\n\n/**\n * Represents the entry point for an NPM package.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiEntryPoint` represents the entry point to an NPM package. API Extractor does not currently support\n * analysis of multiple entry points, but the `ApiEntryPoint` object is included to support a future feature.\n * In the current implementation, `ApiEntryPoint.importPath` is always the empty string.\n *\n * For example, suppose the package.json file looks like this:\n *\n * ```json\n * {\n * \"name\": \"example-library\",\n * \"version\": \"1.0.0\",\n * \"main\": \"./lib/index.js\",\n * \"typings\": \"./lib/index.d.ts\"\n * }\n * ```\n *\n * In this example, the `ApiEntryPoint` would represent the TypeScript module for `./lib/index.js`.\n *\n * @public\n */\nexport class ApiEntryPoint extends ApiItemContainerMixin(ApiNameMixin(ApiItem)) {\n public constructor(options: IApiEntryPointOptions) {\n super(options);\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.EntryPoint;\n }\n\n /** @override */\n public get containerKey(): string {\n // No prefix needed, because ApiEntryPoint is the only possible member of an ApiPackage\n return this.name;\n }\n\n /**\n * The module path for this entry point, relative to the parent `ApiPackage`. In the current implementation,\n * this is always the empty string, indicating the default entry point.\n *\n * @remarks\n *\n * API Extractor does not currently support analysis of multiple entry points. If that feature is implemented\n * in the future, then the `ApiEntryPoint.importPath` will be used to distinguish different entry points,\n * for example: `controls/Button` in `import { Button } from \"example-package/controls/Button\";`.\n *\n * The `ApiEntryPoint.name` property stores the same value as `ApiEntryPoint.importPath`.\n */\n public get importPath(): string {\n return this.name;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n if (this.parent instanceof ApiPackage) {\n return DeclarationReference.package(this.parent.name, this.importPath);\n }\n\n return DeclarationReference.empty();\n }\n}\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
6
|
+
import { ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
7
|
+
import { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';
|
|
8
|
+
import { ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
9
|
+
import { ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
10
|
+
/**
|
|
11
|
+
* Represents a TypeScript enum declaration.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
16
|
+
* API declarations.
|
|
17
|
+
*
|
|
18
|
+
* `ApiEnum` represents an enum declaration such as `FontSizes` in the example below:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* export enum FontSizes {
|
|
22
|
+
* Small = 100,
|
|
23
|
+
* Medium = 200,
|
|
24
|
+
* Large = 300
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export class ApiEnum extends ApiItemContainerMixin(ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))) {
|
|
31
|
+
constructor(options) {
|
|
32
|
+
super(options);
|
|
33
|
+
}
|
|
34
|
+
static getContainerKey(name) {
|
|
35
|
+
return `${name}|${ApiItemKind.Enum}`;
|
|
36
|
+
}
|
|
37
|
+
/** @override */
|
|
38
|
+
get kind() {
|
|
39
|
+
return ApiItemKind.Enum;
|
|
40
|
+
}
|
|
41
|
+
/** @override */
|
|
42
|
+
get members() {
|
|
43
|
+
return super.members;
|
|
44
|
+
}
|
|
45
|
+
/** @override */
|
|
46
|
+
get containerKey() {
|
|
47
|
+
return ApiEnum.getContainerKey(this.name);
|
|
48
|
+
}
|
|
49
|
+
/** @override */
|
|
50
|
+
addMember(member) {
|
|
51
|
+
if (member.kind !== ApiItemKind.EnumMember) {
|
|
52
|
+
throw new Error('Only ApiEnumMember objects can be added to an ApiEnum');
|
|
53
|
+
}
|
|
54
|
+
super.addMember(member);
|
|
55
|
+
}
|
|
56
|
+
/** @beta @override */
|
|
57
|
+
buildCanonicalReference() {
|
|
58
|
+
const nameComponent = DeclarationReference.parseComponent(this.name);
|
|
59
|
+
const navigation = this.isExported ? Navigation.Exports : Navigation.Locals;
|
|
60
|
+
return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
|
|
61
|
+
.addNavigationStep(navigation, nameComponent)
|
|
62
|
+
.withMeaning(Meaning.Enum);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=ApiEnum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiEnum.js","sourceRoot":"","sources":["../../src/model/ApiEnum.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,UAAU,EAEX,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAgC,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAmC,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAsC,MAAM,iCAAiC,CAAC;AAE5G,OAAO,EAA6B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAiC,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAa7F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,OAAQ,SAAQ,qBAAqB,CAChD,YAAY,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CACpE;IACC,YAAmB,OAAwB;QACzC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC;IACvC,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,gBAAgB;IAChB,IAAW,OAAO;QAChB,OAAO,KAAK,CAAC,OAAuC,CAAC;IACvD,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAgB;IACT,SAAS,CAAC,MAAqB;QACpC,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC,UAAU,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC;QACD,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,oBAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiDeclaredItem, type IApiDeclaredItemOptions } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiItemContainerMixin, type IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport type { ApiEnumMember } from './ApiEnumMember';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiEnum}.\n * @public\n */\nexport interface IApiEnumOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript enum declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiEnum` represents an enum declaration such as `FontSizes` in the example below:\n *\n * ```ts\n * export enum FontSizes {\n * Small = 100,\n * Medium = 200,\n * Large = 300\n * }\n * ```\n *\n * @public\n */\nexport class ApiEnum extends ApiItemContainerMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiEnumOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Enum}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Enum;\n }\n\n /** @override */\n public get members(): ReadonlyArray<ApiEnumMember> {\n return super.members as ReadonlyArray<ApiEnumMember>;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiEnum.getContainerKey(this.name);\n }\n\n /** @override */\n public addMember(member: ApiEnumMember): void {\n if (member.kind !== ApiItemKind.EnumMember) {\n throw new Error('Only ApiEnumMember objects can be added to an ApiEnum');\n }\n super.addMember(member);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Enum);\n }\n}\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { DeclarationReference, Meaning, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
4
|
+
import { ApiItemKind } from '../items/ApiItem';
|
|
5
|
+
import { ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
6
|
+
import { ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
7
|
+
import { ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
8
|
+
import { ApiInitializerMixin } from '../mixins/ApiInitializerMixin';
|
|
9
|
+
/**
|
|
10
|
+
* Options for customizing the sort order of {@link ApiEnum} members.
|
|
11
|
+
*
|
|
12
|
+
* @privateRemarks
|
|
13
|
+
* This enum is currently only used by the `@microsoft/api-extractor` package; it is declared here
|
|
14
|
+
* because we anticipate that if more options are added in the future, their sorting will be implemented
|
|
15
|
+
* by the `@microsoft/api-extractor-model` package.
|
|
16
|
+
*
|
|
17
|
+
* See https://github.com/microsoft/rushstack/issues/918 for details.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export var EnumMemberOrder;
|
|
22
|
+
(function (EnumMemberOrder) {
|
|
23
|
+
/**
|
|
24
|
+
* `ApiEnumMember` items are sorted according to their {@link ApiItem.getSortKey}. The order is
|
|
25
|
+
* basically alphabetical by identifier name, but otherwise unspecified to allow for cosmetic improvements.
|
|
26
|
+
*
|
|
27
|
+
* This is the default behavior.
|
|
28
|
+
*/
|
|
29
|
+
EnumMemberOrder["ByName"] = "by-name";
|
|
30
|
+
/**
|
|
31
|
+
* `ApiEnumMember` items preserve the original order of the declarations in the source file.
|
|
32
|
+
* (This disables the automatic sorting that is normally applied based on {@link ApiItem.getSortKey}.)
|
|
33
|
+
*/
|
|
34
|
+
EnumMemberOrder["Preserve"] = "preserve";
|
|
35
|
+
})(EnumMemberOrder || (EnumMemberOrder = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Represents a member of a TypeScript enum declaration.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
*
|
|
41
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
42
|
+
* API declarations.
|
|
43
|
+
*
|
|
44
|
+
* `ApiEnumMember` represents an enum member such as `Small = 100` in the example below:
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* export enum FontSizes {
|
|
48
|
+
* Small = 100,
|
|
49
|
+
* Medium = 200,
|
|
50
|
+
* Large = 300
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export class ApiEnumMember extends ApiNameMixin(ApiReleaseTagMixin(ApiInitializerMixin(ApiDeclaredItem))) {
|
|
57
|
+
constructor(options) {
|
|
58
|
+
super(options);
|
|
59
|
+
}
|
|
60
|
+
static getContainerKey(name) {
|
|
61
|
+
// No prefix needed, because ApiEnumMember is the only possible member of an ApiEnum
|
|
62
|
+
return name;
|
|
63
|
+
}
|
|
64
|
+
/** @override */
|
|
65
|
+
get kind() {
|
|
66
|
+
return ApiItemKind.EnumMember;
|
|
67
|
+
}
|
|
68
|
+
/** @override */
|
|
69
|
+
get containerKey() {
|
|
70
|
+
return ApiEnumMember.getContainerKey(this.name);
|
|
71
|
+
}
|
|
72
|
+
/** @beta @override */
|
|
73
|
+
buildCanonicalReference() {
|
|
74
|
+
const nameComponent = DeclarationReference.parseComponent(this.name);
|
|
75
|
+
return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
|
|
76
|
+
.addNavigationStep(Navigation.Exports, nameComponent)
|
|
77
|
+
.withMeaning(Meaning.Member);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=ApiEnumMember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiEnumMember.js","sourceRoot":"","sources":["../../src/model/ApiEnumMember.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EACL,oBAAoB,EACpB,OAAO,EACP,UAAU,EAEX,MAAM,yDAAyD,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAgC,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAmC,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAA6B,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAoC,MAAM,+BAA+B,CAAC;AAYtG;;;;;;;;;;;GAWG;AACH,MAAM,CAAN,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB;;;;;OAKG;IACH,qCAAkB,CAAA;IAElB;;;OAGG;IACH,wCAAqB,CAAA;AACvB,CAAC,EAdW,eAAe,KAAf,eAAe,QAc1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,aAAc,SAAQ,YAAY,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC;IACvG,YAAmB,OAA8B;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,oFAAoF;QACpF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,WAAW,CAAC,UAAU,CAAC;IAChC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,oBAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC;aACpD,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n type Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\n\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiDeclaredItem, type IApiDeclaredItemOptions } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\n\n/**\n * Constructor options for {@link ApiEnumMember}.\n * @public\n */\nexport interface IApiEnumMemberOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiInitializerMixinOptions {}\n\n/**\n * Options for customizing the sort order of {@link ApiEnum} members.\n *\n * @privateRemarks\n * This enum is currently only used by the `@microsoft/api-extractor` package; it is declared here\n * because we anticipate that if more options are added in the future, their sorting will be implemented\n * by the `@microsoft/api-extractor-model` package.\n *\n * See https://github.com/microsoft/rushstack/issues/918 for details.\n *\n * @public\n */\nexport enum EnumMemberOrder {\n /**\n * `ApiEnumMember` items are sorted according to their {@link ApiItem.getSortKey}. The order is\n * basically alphabetical by identifier name, but otherwise unspecified to allow for cosmetic improvements.\n *\n * This is the default behavior.\n */\n ByName = 'by-name',\n\n /**\n * `ApiEnumMember` items preserve the original order of the declarations in the source file.\n * (This disables the automatic sorting that is normally applied based on {@link ApiItem.getSortKey}.)\n */\n Preserve = 'preserve'\n}\n\n/**\n * Represents a member of a TypeScript enum declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiEnumMember` represents an enum member such as `Small = 100` in the example below:\n *\n * ```ts\n * export enum FontSizes {\n * Small = 100,\n * Medium = 200,\n * Large = 300\n * }\n * ```\n *\n * @public\n */\nexport class ApiEnumMember extends ApiNameMixin(ApiReleaseTagMixin(ApiInitializerMixin(ApiDeclaredItem))) {\n public constructor(options: IApiEnumMemberOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n // No prefix needed, because ApiEnumMember is the only possible member of an ApiEnum\n return name;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.EnumMember;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiEnumMember.getContainerKey(this.name);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(Navigation.Exports, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
|