@microsoft/api-extractor-model 7.28.0 → 7.28.2
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/dist/tsdoc-metadata.json +1 -1
- package/lib/items/ApiDeclaredItem.d.ts +3 -3
- package/lib/items/ApiDeclaredItem.d.ts.map +1 -1
- package/lib/items/ApiDeclaredItem.js +1 -1
- package/lib/items/ApiDeclaredItem.js.map +1 -1
- package/lib/items/ApiDocumentedItem.d.ts +2 -2
- package/lib/items/ApiDocumentedItem.d.ts.map +1 -1
- package/lib/items/ApiDocumentedItem.js.map +1 -1
- package/lib/items/ApiItem.d.ts +5 -5
- package/lib/items/ApiItem.d.ts.map +1 -1
- package/lib/items/ApiItem.js.map +1 -1
- package/lib/items/ApiPropertyItem.d.ts +7 -7
- package/lib/items/ApiPropertyItem.d.ts.map +1 -1
- package/lib/items/ApiPropertyItem.js.map +1 -1
- package/lib/mixins/ApiAbstractMixin.d.ts +1 -1
- package/lib/mixins/ApiAbstractMixin.d.ts.map +1 -1
- package/lib/mixins/ApiAbstractMixin.js +1 -1
- package/lib/mixins/ApiAbstractMixin.js.map +1 -1
- package/lib/mixins/ApiExportedMixin.d.ts +1 -1
- package/lib/mixins/ApiExportedMixin.d.ts.map +1 -1
- package/lib/mixins/ApiExportedMixin.js +2 -1
- package/lib/mixins/ApiExportedMixin.js.map +1 -1
- package/lib/mixins/ApiInitializerMixin.d.ts +2 -2
- package/lib/mixins/ApiInitializerMixin.d.ts.map +1 -1
- package/lib/mixins/ApiInitializerMixin.js +1 -1
- package/lib/mixins/ApiInitializerMixin.js.map +1 -1
- package/lib/mixins/ApiItemContainerMixin.d.ts +2 -2
- package/lib/mixins/ApiItemContainerMixin.d.ts.map +1 -1
- package/lib/mixins/ApiItemContainerMixin.js +2 -1
- package/lib/mixins/ApiItemContainerMixin.js.map +1 -1
- package/lib/mixins/ApiNameMixin.d.ts +1 -1
- package/lib/mixins/ApiNameMixin.d.ts.map +1 -1
- package/lib/mixins/ApiNameMixin.js +1 -1
- package/lib/mixins/ApiNameMixin.js.map +1 -1
- package/lib/mixins/ApiOptionalMixin.d.ts +1 -1
- package/lib/mixins/ApiOptionalMixin.d.ts.map +1 -1
- package/lib/mixins/ApiOptionalMixin.js +1 -1
- package/lib/mixins/ApiOptionalMixin.js.map +1 -1
- package/lib/mixins/ApiParameterListMixin.d.ts +2 -2
- package/lib/mixins/ApiParameterListMixin.d.ts.map +1 -1
- package/lib/mixins/ApiParameterListMixin.js +1 -1
- package/lib/mixins/ApiParameterListMixin.js.map +1 -1
- package/lib/mixins/ApiProtectedMixin.d.ts +1 -1
- package/lib/mixins/ApiProtectedMixin.d.ts.map +1 -1
- package/lib/mixins/ApiProtectedMixin.js +1 -1
- package/lib/mixins/ApiProtectedMixin.js.map +1 -1
- package/lib/mixins/ApiReadonlyMixin.d.ts +1 -1
- package/lib/mixins/ApiReadonlyMixin.d.ts.map +1 -1
- package/lib/mixins/ApiReadonlyMixin.js +1 -1
- package/lib/mixins/ApiReadonlyMixin.js.map +1 -1
- package/lib/mixins/ApiReleaseTagMixin.d.ts +1 -1
- package/lib/mixins/ApiReleaseTagMixin.d.ts.map +1 -1
- package/lib/mixins/ApiReleaseTagMixin.js +2 -1
- package/lib/mixins/ApiReleaseTagMixin.js.map +1 -1
- package/lib/mixins/ApiReturnTypeMixin.d.ts +2 -2
- package/lib/mixins/ApiReturnTypeMixin.d.ts.map +1 -1
- package/lib/mixins/ApiReturnTypeMixin.js +1 -1
- package/lib/mixins/ApiReturnTypeMixin.js.map +1 -1
- package/lib/mixins/ApiStaticMixin.d.ts +1 -1
- package/lib/mixins/ApiStaticMixin.d.ts.map +1 -1
- package/lib/mixins/ApiStaticMixin.js +1 -1
- package/lib/mixins/ApiStaticMixin.js.map +1 -1
- package/lib/mixins/ApiTypeParameterListMixin.d.ts +2 -2
- package/lib/mixins/ApiTypeParameterListMixin.d.ts.map +1 -1
- package/lib/mixins/ApiTypeParameterListMixin.js +1 -1
- package/lib/mixins/ApiTypeParameterListMixin.js.map +1 -1
- package/lib/mixins/Excerpt.d.ts +1 -1
- package/lib/mixins/Excerpt.d.ts.map +1 -1
- package/lib/mixins/Excerpt.js.map +1 -1
- package/lib/mixins/IFindApiItemsResult.d.ts +1 -1
- package/lib/mixins/IFindApiItemsResult.d.ts.map +1 -1
- package/lib/mixins/IFindApiItemsResult.js +2 -0
- package/lib/mixins/IFindApiItemsResult.js.map +1 -1
- package/lib/model/ApiCallSignature.d.ts +5 -5
- package/lib/model/ApiCallSignature.d.ts.map +1 -1
- package/lib/model/ApiCallSignature.js.map +1 -1
- package/lib/model/ApiClass.d.ts +9 -9
- package/lib/model/ApiClass.d.ts.map +1 -1
- package/lib/model/ApiClass.js.map +1 -1
- package/lib/model/ApiConstructSignature.d.ts +5 -5
- package/lib/model/ApiConstructSignature.d.ts.map +1 -1
- package/lib/model/ApiConstructSignature.js.map +1 -1
- package/lib/model/ApiConstructor.d.ts +4 -4
- package/lib/model/ApiConstructor.d.ts.map +1 -1
- package/lib/model/ApiConstructor.js.map +1 -1
- package/lib/model/ApiEntryPoint.d.ts +2 -2
- package/lib/model/ApiEntryPoint.d.ts.map +1 -1
- package/lib/model/ApiEntryPoint.js.map +1 -1
- package/lib/model/ApiEnum.d.ts +6 -6
- package/lib/model/ApiEnum.d.ts.map +1 -1
- package/lib/model/ApiEnum.js.map +1 -1
- package/lib/model/ApiEnumMember.d.ts +4 -4
- package/lib/model/ApiEnumMember.d.ts.map +1 -1
- package/lib/model/ApiEnumMember.js.map +1 -1
- package/lib/model/ApiFunction.d.ts +7 -7
- package/lib/model/ApiFunction.d.ts.map +1 -1
- package/lib/model/ApiFunction.js.map +1 -1
- package/lib/model/ApiIndexSignature.d.ts +5 -5
- package/lib/model/ApiIndexSignature.d.ts.map +1 -1
- package/lib/model/ApiIndexSignature.js.map +1 -1
- package/lib/model/ApiInterface.d.ts +8 -8
- package/lib/model/ApiInterface.d.ts.map +1 -1
- package/lib/model/ApiInterface.js.map +1 -1
- package/lib/model/ApiMethod.d.ts +10 -10
- package/lib/model/ApiMethod.d.ts.map +1 -1
- package/lib/model/ApiMethod.js.map +1 -1
- package/lib/model/ApiMethodSignature.d.ts +7 -7
- package/lib/model/ApiMethodSignature.d.ts.map +1 -1
- package/lib/model/ApiMethodSignature.js.map +1 -1
- package/lib/model/ApiModel.d.ts +1 -1
- package/lib/model/ApiModel.d.ts.map +1 -1
- package/lib/model/ApiModel.js.map +1 -1
- package/lib/model/ApiNamespace.d.ts +5 -5
- package/lib/model/ApiNamespace.d.ts.map +1 -1
- package/lib/model/ApiNamespace.js.map +1 -1
- package/lib/model/ApiPackage.d.ts +6 -6
- package/lib/model/ApiPackage.d.ts.map +1 -1
- package/lib/model/ApiPackage.js.map +1 -1
- package/lib/model/ApiProperty.d.ts +5 -5
- package/lib/model/ApiProperty.d.ts.map +1 -1
- package/lib/model/ApiProperty.js.map +1 -1
- package/lib/model/ApiPropertySignature.d.ts +1 -1
- package/lib/model/ApiPropertySignature.d.ts.map +1 -1
- package/lib/model/ApiPropertySignature.js.map +1 -1
- package/lib/model/ApiTypeAlias.d.ts +7 -7
- package/lib/model/ApiTypeAlias.d.ts.map +1 -1
- package/lib/model/ApiTypeAlias.js.map +1 -1
- package/lib/model/ApiVariable.d.ts +8 -8
- package/lib/model/ApiVariable.d.ts.map +1 -1
- package/lib/model/ApiVariable.js.map +1 -1
- package/lib/model/Deserializer.d.ts +2 -2
- package/lib/model/Deserializer.d.ts.map +1 -1
- package/lib/model/Deserializer.js.map +1 -1
- package/lib/model/DeserializerContext.d.ts +1 -1
- package/lib/model/DeserializerContext.d.ts.map +1 -1
- package/lib/model/DeserializerContext.js.map +1 -1
- package/lib/model/HeritageType.d.ts +1 -1
- package/lib/model/HeritageType.d.ts.map +1 -1
- package/lib/model/HeritageType.js.map +1 -1
- package/lib/model/ModelReferenceResolver.d.ts +3 -3
- package/lib/model/ModelReferenceResolver.d.ts.map +1 -1
- package/lib/model/ModelReferenceResolver.js +1 -1
- package/lib/model/ModelReferenceResolver.js.map +1 -1
- package/lib/model/Parameter.d.ts +3 -3
- package/lib/model/Parameter.d.ts.map +1 -1
- package/lib/model/Parameter.js.map +1 -1
- package/lib/model/TypeParameter.d.ts +3 -3
- package/lib/model/TypeParameter.d.ts.map +1 -1
- package/lib/model/TypeParameter.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiProperty.js","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"ApiProperty.js","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,iEAA6F;AAC7F,mEAAgG;AAChG,6DAAuF;AACvF,uEAAsG;AACtG,8DAAyF;AAazF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,WAAY,SAAQ,IAAA,mCAAgB,EAC/C,IAAA,qCAAiB,EAAC,IAAA,+BAAc,EAAC,IAAA,yCAAmB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACxE;IACC,YAAmB,OAA4B;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,QAAiB;QAC3D,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,QAAQ,SAAS,CAAC;SACjD;aAAM;YACL,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,QAAQ,WAAW,CAAC;SACnD;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,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,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,8BAAoB,CAAC,6BAAmB,EAAE,aAAa,CAAC;aACzF,WAAW,+BAAgB,CAAC;IACjC,CAAC;CACF;AAhCD,kCAgCC","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';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiAbstractMixin, type IApiAbstractMixinOptions } from '../mixins/ApiAbstractMixin';\nimport { ApiProtectedMixin, type IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { ApiStaticMixin, type IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiProperty}.\n * @public\n */\nexport interface IApiPropertyOptions\n extends IApiPropertyItemOptions,\n IApiAbstractMixinOptions,\n IApiProtectedMixinOptions,\n IApiStaticMixinOptions,\n IApiInitializerMixinOptions {}\n\n/**\n * Represents a TypeScript property 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 * `ApiProperty` represents a TypeScript declaration such as the `width` and `height` members in this example:\n *\n * ```ts\n * export class Widget {\n * public width: number = 100;\n *\n * public get height(): number {\n * if (this.isSquashed()) {\n * return 0;\n * } else {\n * return this.clientArea.height;\n * }\n * }\n * }\n * ```\n *\n * Note that member variables are also considered to be properties.\n *\n * If the property has both a getter function and setter function, they will be represented by a single `ApiProperty`\n * and must have a single documentation comment.\n *\n * Compare with {@link ApiPropertySignature}, which represents a property belonging to an interface.\n * For example, a class property can be `static` but an interface property cannot.\n *\n * @public\n */\nexport class ApiProperty extends ApiAbstractMixin(\n ApiProtectedMixin(ApiStaticMixin(ApiInitializerMixin(ApiPropertyItem)))\n) {\n public constructor(options: IApiPropertyOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, isStatic: boolean): string {\n if (isStatic) {\n return `${name}|${ApiItemKind.Property}|static`;\n } else {\n return `${name}|${ApiItemKind.Property}|instance`;\n }\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Property;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiProperty.getContainerKey(this.name, this.isStatic);\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(this.isStatic ? Navigation.Exports : Navigation.Members, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
2
2
|
import { ApiItemKind } from '../items/ApiItem';
|
|
3
|
-
import { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';
|
|
3
|
+
import { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';
|
|
4
4
|
/**
|
|
5
5
|
* Constructor options for {@link ApiPropertySignature}.
|
|
6
6
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiPropertySignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiPropertySignature.d.ts","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,4BAA6B,SAAQ,uBAAuB;CAAG;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,oBAAqB,SAAQ,eAAe;gBACpC,OAAO,EAAE,4BAA4B;WAI1C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiPropertySignature.js","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"ApiPropertySignature.js","sourceRoot":"","sources":["../../src/model/ApiPropertySignature.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAAyF;AAQzF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,oBAAqB,SAAQ,iCAAe;IACvD,YAAmB,OAAqC;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,iBAAiB,EAAE,CAAC;IACpD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,iBAAiB,CAAC;IACvC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,oBAAoB,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,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,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,+BAAqB,aAAa,CAAC;aACpD,WAAW,+BAAgB,CAAC;IACjC,CAAC;CACF;AA1BD,oDA0BC","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';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiPropertyItem, type IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiPropertySignature}.\n * @public\n */\nexport interface IApiPropertySignatureOptions extends IApiPropertyItemOptions {}\n\n/**\n * Represents a TypeScript property declaration 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 * `ApiPropertySignature` represents a TypeScript declaration such as the `width` and `height` members in this example:\n *\n * ```ts\n * export interface IWidget {\n * readonly width: number;\n * height: number;\n * }\n * ```\n *\n * Compare with {@link ApiProperty}, which represents a property belonging to a class.\n * For example, a class property can be `static` but an interface property cannot.\n *\n * @public\n */\nexport class ApiPropertySignature extends ApiPropertyItem {\n public constructor(options: IApiPropertySignatureOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.PropertySignature}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.PropertySignature;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiPropertySignature.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.Members, nameComponent)\n .withMeaning(Meaning.Member);\n }\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
2
|
-
import { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';
|
|
2
|
+
import type { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';
|
|
3
3
|
import { ApiItemKind } from '../items/ApiItem';
|
|
4
|
-
import { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';
|
|
5
|
-
import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
|
|
6
|
-
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
|
-
import { ApiTypeParameterListMixin, IApiTypeParameterListMixinOptions, IApiTypeParameterListMixinJson } from '../mixins/ApiTypeParameterListMixin';
|
|
8
|
-
import { DeserializerContext } from './DeserializerContext';
|
|
9
|
-
import { IApiExportedMixinJson, IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
4
|
+
import { ApiDeclaredItem, type IApiDeclaredItemOptions, type IApiDeclaredItemJson } from '../items/ApiDeclaredItem';
|
|
5
|
+
import { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
|
|
6
|
+
import { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
|
+
import { ApiTypeParameterListMixin, type IApiTypeParameterListMixinOptions, type IApiTypeParameterListMixinJson } from '../mixins/ApiTypeParameterListMixin';
|
|
8
|
+
import type { DeserializerContext } from './DeserializerContext';
|
|
9
|
+
import { type IApiExportedMixinJson, type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
10
10
|
/**
|
|
11
11
|
* Constructor options for {@link ApiTypeAlias}.
|
|
12
12
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiTypeAlias.d.ts","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiTypeAlias.d.ts","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,KAAK,0B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-
{"version":3,"file":"ApiTypeAlias.js","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"ApiTypeAlias.js","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAIkC;AAClC,qEAAmG;AACnG,yDAAiF;AACjF,mFAI6C;AAE7C,iEAIoC;AAsBpC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,YAAa,SAAQ,IAAA,qDAAyB,EACzD,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACpE;IAcC,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAsC,EACtC,OAA4B,EAC5B,UAA6B;QAE7B,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IACrD,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,SAAS,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAsC;QACzD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;IAC1D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,gCAAmB,CAAC;IACpC,CAAC;CACF;AA9DD,oCA8DC","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';\nimport type { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\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';\n\n/**\n * Constructor options for {@link ApiTypeAlias}.\n * @public\n */\nexport interface IApiTypeAliasOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n typeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiTypeAliasJson\n extends IApiDeclaredItemJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n typeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript type alias 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 * `ApiTypeAlias` represents a definition such as one of these examples:\n *\n * ```ts\n * // A union type:\n * export type Shape = Square | Triangle | Circle;\n *\n * // A generic type alias:\n * export type BoxedValue<T> = { value: T };\n *\n * export type BoxedArray<T> = { array: T[] };\n *\n * // A conditional type alias:\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n *\n * ```\n *\n * @public\n */\nexport class ApiTypeAlias extends ApiTypeParameterListMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n /**\n * An {@link Excerpt} that describes the type of the alias.\n *\n * @remarks\n * In the example below, the `typeExcerpt` would correspond to the subexpression\n * `T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;`:\n *\n * ```ts\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n * ```\n */\n public readonly typeExcerpt: Excerpt;\n\n public constructor(options: IApiTypeAliasOptions) {\n super(options);\n\n this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiTypeAliasOptions>,\n context: DeserializerContext,\n jsonObject: IApiTypeAliasJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.typeTokenRange = jsonObject.typeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.TypeAlias}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.TypeAlias;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiTypeAlias.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.typeTokenRange = this.typeExcerpt.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.TypeAlias);\n }\n}\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
2
2
|
import { ApiItemKind } from '../items/ApiItem';
|
|
3
|
-
import { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';
|
|
4
|
-
import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
|
|
5
|
-
import { ApiReadonlyMixin, IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';
|
|
6
|
-
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
|
-
import { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';
|
|
8
|
-
import { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';
|
|
9
|
-
import { DeserializerContext } from './DeserializerContext';
|
|
10
|
-
import { IApiExportedMixinJson, IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
3
|
+
import { ApiDeclaredItem, type IApiDeclaredItemOptions, type IApiDeclaredItemJson } from '../items/ApiDeclaredItem';
|
|
4
|
+
import { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
|
|
5
|
+
import { ApiReadonlyMixin, type IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';
|
|
6
|
+
import { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
|
+
import { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';
|
|
8
|
+
import type { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';
|
|
9
|
+
import type { DeserializerContext } from './DeserializerContext';
|
|
10
|
+
import { type IApiExportedMixinJson, type IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
11
11
|
/**
|
|
12
12
|
* Constructor options for {@link ApiVariable}.
|
|
13
13
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiVariable.d.ts","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"ApiVariable.d.ts","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,KAAK,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,KAAK,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,EAAE,KAAK,oBAAoB,EAAE,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sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"ApiVariable.js","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAIkC;AAClC,qEAAmG;AACnG,iEAA6F;AAC7F,yDAAiF;AACjF,uEAAsG;AAGtG,iEAIoC;AAoBpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,WAAY,SAAQ,IAAA,2BAAY,EAC3C,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,IAAA,yCAAmB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CAC7F;IAMC,YAAmB,OAA4B;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/E,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAqC,EACrC,OAA4B,EAC5B,UAA4B;QAE5B,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;IACrE,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,QAAQ,EAAE,CAAC;IAC3C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,QAAQ,CAAC;IAC9B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAqC;QACxD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,UAAU,CAAC,sBAAsB,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC;IAC1E,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,8BAAkB,CAAC;IACnC,CAAC;CACF;AAtDD,kCAsDC","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';\nimport { ApiItemKind } from '../items/ApiItem';\nimport {\n ApiDeclaredItem,\n type IApiDeclaredItemOptions,\n type IApiDeclaredItemJson\n} from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, type IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiReadonlyMixin, type IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';\nimport { type IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { ApiInitializerMixin, type IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport type { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\nimport type { DeserializerContext } from './DeserializerContext';\nimport {\n type IApiExportedMixinJson,\n type IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiVariable}.\n * @public\n */\nexport interface IApiVariableOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions,\n IApiInitializerMixinOptions,\n IApiExportedMixinOptions {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiVariableJson extends IApiDeclaredItemJson, IApiExportedMixinJson {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript variable 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 * `ApiVariable` represents an exported `const` or `let` object such as these examples:\n *\n * ```ts\n * // A variable declaration\n * export let verboseLogging: boolean;\n *\n * // A constant variable declaration with an initializer\n * export const canvas: IWidget = createCanvas();\n * ```\n *\n * @public\n */\nexport class ApiVariable extends ApiNameMixin(\n ApiReleaseTagMixin(ApiReadonlyMixin(ApiInitializerMixin(ApiExportedMixin(ApiDeclaredItem))))\n) {\n /**\n * An {@link Excerpt} that describes the type of the variable.\n */\n public readonly variableTypeExcerpt: Excerpt;\n\n public constructor(options: IApiVariableOptions) {\n super(options);\n\n this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiVariableOptions>,\n context: DeserializerContext,\n jsonObject: IApiVariableJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.variableTypeTokenRange = jsonObject.variableTypeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Variable}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Variable;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiVariable.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiVariableJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.variableTypeTokenRange = this.variableTypeExcerpt.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.Variable);\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IApiItemJson, ApiItem } from '../items/ApiItem';
|
|
2
|
-
import { DeserializerContext } from './DeserializerContext';
|
|
1
|
+
import { type IApiItemJson, type ApiItem } from '../items/ApiItem';
|
|
2
|
+
import type { DeserializerContext } from './DeserializerContext';
|
|
3
3
|
export declare class Deserializer {
|
|
4
4
|
static deserialize(context: DeserializerContext, jsonObject: IApiItemJson): ApiItem;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deserializer.d.ts","sourceRoot":"","sources":["../../src/model/Deserializer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"Deserializer.d.ts","sourceRoot":"","sources":["../../src/model/Deserializer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAwB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAsBtG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,qBAAa,YAAY;WACT,WAAW,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,YAAY,GAAG,OAAO;CAgE3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deserializer.js","sourceRoot":"","sources":["../../src/model/Deserializer.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,
|
|
1
|
+
{"version":3,"file":"Deserializer.js","sourceRoot":"","sources":["../../src/model/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All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { type IApiItemJson, type IApiItemOptions, type ApiItem, ApiItemKind } from '../items/ApiItem';\nimport { ApiClass, type IApiClassOptions, type IApiClassJson } from './ApiClass';\nimport { ApiEntryPoint, type IApiEntryPointOptions } from './ApiEntryPoint';\nimport { ApiMethod, type IApiMethodOptions } from './ApiMethod';\nimport { ApiModel } from './ApiModel';\nimport { ApiNamespace, type IApiNamespaceOptions } from './ApiNamespace';\nimport { ApiPackage, type IApiPackageOptions, type IApiPackageJson } from './ApiPackage';\nimport { ApiInterface, type IApiInterfaceOptions, type IApiInterfaceJson } from './ApiInterface';\nimport { ApiPropertySignature, type IApiPropertySignatureOptions } from './ApiPropertySignature';\nimport { ApiMethodSignature, type IApiMethodSignatureOptions } from './ApiMethodSignature';\nimport { ApiProperty, type IApiPropertyOptions } from './ApiProperty';\nimport { ApiEnumMember, type IApiEnumMemberOptions } from './ApiEnumMember';\nimport { ApiEnum, type IApiEnumOptions } from './ApiEnum';\nimport type { IApiPropertyItemJson } from '../items/ApiPropertyItem';\nimport { ApiConstructor, type IApiConstructorOptions } from './ApiConstructor';\nimport { ApiConstructSignature, type IApiConstructSignatureOptions } from './ApiConstructSignature';\nimport { ApiFunction, type IApiFunctionOptions } from './ApiFunction';\nimport { ApiCallSignature, type IApiCallSignatureOptions } from './ApiCallSignature';\nimport { ApiIndexSignature, type IApiIndexSignatureOptions } from './ApiIndexSignature';\nimport { ApiTypeAlias, type IApiTypeAliasOptions, type IApiTypeAliasJson } from './ApiTypeAlias';\nimport { ApiVariable, type IApiVariableOptions, type IApiVariableJson } from './ApiVariable';\nimport type { IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\nimport type { DeserializerContext } from './DeserializerContext';\n\nexport class Deserializer {\n public static deserialize(context: DeserializerContext, jsonObject: IApiItemJson): ApiItem {\n const options: Partial<IApiItemOptions> = {};\n\n switch (jsonObject.kind) {\n case ApiItemKind.Class:\n ApiClass.onDeserializeInto(options, context, jsonObject as IApiClassJson);\n return new ApiClass(options as IApiClassOptions);\n case ApiItemKind.CallSignature:\n ApiCallSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiCallSignature(options as IApiCallSignatureOptions);\n case ApiItemKind.Constructor:\n ApiConstructor.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiConstructor(options as IApiConstructorOptions);\n case ApiItemKind.ConstructSignature:\n ApiConstructSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiConstructSignature(options as IApiConstructSignatureOptions);\n case ApiItemKind.EntryPoint:\n ApiEntryPoint.onDeserializeInto(options, context, jsonObject);\n return new ApiEntryPoint(options as IApiEntryPointOptions);\n case ApiItemKind.Enum:\n ApiEnum.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiEnum(options as IApiEnumOptions);\n case ApiItemKind.EnumMember:\n ApiEnumMember.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiEnumMember(options as IApiEnumMemberOptions);\n case ApiItemKind.Function:\n ApiFunction.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiFunction(options as IApiFunctionOptions);\n case ApiItemKind.IndexSignature:\n ApiIndexSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiIndexSignature(options as IApiIndexSignatureOptions);\n case ApiItemKind.Interface:\n ApiInterface.onDeserializeInto(options, context, jsonObject as IApiInterfaceJson);\n return new ApiInterface(options as IApiInterfaceOptions);\n case ApiItemKind.Method:\n ApiMethod.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiMethod(options as IApiMethodOptions);\n case ApiItemKind.MethodSignature:\n ApiMethodSignature.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiMethodSignature(options as IApiMethodSignatureOptions);\n case ApiItemKind.Model:\n return new ApiModel();\n case ApiItemKind.Namespace:\n ApiNamespace.onDeserializeInto(options, context, jsonObject as IApiDeclaredItemJson);\n return new ApiNamespace(options as IApiNamespaceOptions);\n case ApiItemKind.Package:\n ApiPackage.onDeserializeInto(options, context, jsonObject as IApiPackageJson);\n return new ApiPackage(options as IApiPackageOptions);\n case ApiItemKind.Property:\n ApiProperty.onDeserializeInto(options, context, jsonObject as IApiPropertyItemJson);\n return new ApiProperty(options as IApiPropertyOptions);\n case ApiItemKind.PropertySignature:\n ApiPropertySignature.onDeserializeInto(options, context, jsonObject as IApiPropertyItemJson);\n return new ApiPropertySignature(options as IApiPropertySignatureOptions);\n case ApiItemKind.TypeAlias:\n ApiTypeAlias.onDeserializeInto(options, context, jsonObject as IApiTypeAliasJson);\n return new ApiTypeAlias(options as IApiTypeAliasOptions);\n case ApiItemKind.Variable:\n ApiVariable.onDeserializeInto(options, context, jsonObject as IApiVariableJson);\n return new ApiVariable(options as IApiVariableOptions);\n default:\n throw new Error(`Failed to deserialize unsupported API item type ${JSON.stringify(jsonObject.kind)}`);\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeserializerContext.d.ts","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"DeserializerContext.d.ts","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,MAAM,OAAO;IAEb;;OAEG;IACH,MAAM,OAAO;IAEb;;OAEG;IACH,MAAM,OAAO;IAEb;;;;;OAKG;IACH,MAAM,OAAO;IAEb;;;;;OAKG;IACH,MAAM,OAAO;IAEb;;;;OAIG;IACH,MAAM,OAAO;IAEb;;;;;;;;OAQG;IACH,MAAM,OAAO;IAEb;;;;OAIG;IACH,MAAM,OAAO;IAEb;;;;;OAKG;IACH,MAAM,OAAO;IAEb;;;;OAIG;IACH,MAAM,OAAO;IAEb;;;;OAIG;IACH,MAAM,OAAO;IAEb;;;;;OAKG;IACH,MAAM,OAAO;IAEb;;;;;OAKG;IACH,MAAM,OAAS;IAEf;;;;;OAKG;IACH,gBAAgB,OAAS;IAEzB;;;;;;OAMG;IACH,0BAA0B,OAAS;CACpC;AAED,qBAAa,mBAAmB;IAC9B;;OAEG;IACH,SAAgB,eAAe,EAAE,MAAM,CAAC;IAExC;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC;;OAEG;IACH,SAAgB,oBAAoB,EAAE,oBAAoB,CAAC;IAE3D;;OAEG;IACH,SAAgB,kBAAkB,EAAE,kBAAkB,CAAC;gBAEpC,OAAO,EAAE,mBAAmB;CAOhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeserializerContext.js","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,IAAY,oBA+GX;AA/GD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;;;;;OAQG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAyB,CAAA;IAEzB;;;;;;OAMG;IACH,8GAAmC,CAAA;AACrC,CAAC,EA/GW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QA+G/B;AAED,MAAa,mBAAmB;IA0B9B,YAAmB,OAA4B;QAC7C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IACvD,CAAC;CACF;AAjCD,kDAiCC","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 { TSDocConfiguration } from '@microsoft/tsdoc';\n\nexport enum ApiJsonSchemaVersion {\n /**\n * The initial release.\n */\n V_1000 = 1000,\n\n /**\n * Add support for type parameters and type alias types.\n */\n V_1001 = 1001,\n\n /**\n * Remove `canonicalReference` field. This field was for diagnostic purposes only and was never deserialized.\n */\n V_1002 = 1002,\n\n /**\n * Reintroduce the `canonicalReference` field using the experimental new TSDoc declaration reference notation.\n *\n * This is not a breaking change because this field is never deserialized; it is provided for informational\n * purposes only.\n */\n V_1003 = 1003,\n\n /**\n * Add a `tsdocConfig` field that tracks the TSDoc configuration for parsing doc comments.\n *\n * This is not a breaking change because an older implementation will still work correctly. The\n * custom tags will be skipped over by the parser.\n */\n V_1004 = 1004,\n\n /**\n * Add an `isOptional` field to `Parameter` and `TypeParameter` to track whether a function parameter is optional.\n *\n * When loading older JSON files, the value defaults to `false`.\n */\n V_1005 = 1005,\n\n /**\n * Add an `isProtected` field to `ApiConstructor`, `ApiMethod`, and `ApiProperty` to\n * track whether a class member has the `protected` modifier.\n *\n * Add an `isReadonly` field to `ApiProperty`, `ApiPropertySignature`, and `ApiVariable` to\n * track whether the item is readonly.\n *\n * When loading older JSON files, the values default to `false`.\n */\n V_1006 = 1006,\n\n /**\n * Add `ApiItemContainerMixin.preserveMemberOrder` to support enums that preserve their original sort order.\n *\n * When loading older JSON files, the value default to `false`.\n */\n V_1007 = 1007,\n\n /**\n * Add an `initializerTokenRange` field to `ApiProperty` and `ApiVariable` to track the item's\n * initializer.\n *\n * When loading older JSON files, this range is empty.\n */\n V_1008 = 1008,\n\n /**\n * Add an `isReadonly` field to `ApiIndexSignature` to track whether the item is readonly.\n *\n * When loading older JSON files, the values defaults to `false`.\n */\n V_1009 = 1009,\n\n /**\n * Add a `fileUrlPath` field to `ApiDeclaredItem` to track the URL to a declared item's source file.\n *\n * When loading older JSON files, the value defaults to `undefined`.\n */\n V_1010 = 1010,\n\n /**\n * Add an `isAbstract` field to `ApiClass`, `ApiMethod`, and `ApiProperty` to\n * track whether the item is abstract.\n *\n * When loading older JSON files, the value defaults to `false`.\n */\n V_1011 = 1011,\n\n /**\n * The current latest .api.json schema version.\n *\n * IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`\n * should be updated.\n */\n LATEST = V_1011,\n\n /**\n * The oldest .api.json schema version that is still supported for backwards compatibility.\n *\n * This must be updated if you change to the file format and do not implement compatibility logic for\n * deserializing the older representation.\n */\n OLDEST_SUPPORTED = V_1001,\n\n /**\n * Used to assign `IApiPackageMetadataJson.oldestForwardsCompatibleVersion`.\n *\n * This value must be \\<= `ApiJsonSchemaVersion.LATEST`. It must be reset to the `LATEST` value\n * if the older library would not be able to deserialize your new file format. Adding a nonessential field\n * is generally okay. Removing, modifying, or reinterpreting existing fields is NOT safe.\n */\n OLDEST_FORWARDS_COMPATIBLE = V_1001\n}\n\nexport class DeserializerContext {\n /**\n * The path of the file being deserialized, which may be useful for diagnostic purposes.\n */\n public readonly apiJsonFilename: string;\n\n /**\n * Metadata from `IApiPackageMetadataJson.toolPackage`.\n */\n public readonly toolPackage: string;\n\n /**\n * Metadata from `IApiPackageMetadataJson.toolVersion`.\n */\n public readonly toolVersion: string;\n\n /**\n * The version of the schema being deserialized, as obtained from `IApiPackageMetadataJson.schemaVersion`.\n */\n public readonly versionToDeserialize: ApiJsonSchemaVersion;\n\n /**\n * The TSDoc configuration for the context.\n */\n public readonly tsdocConfiguration: TSDocConfiguration;\n\n public constructor(options: DeserializerContext) {\n this.apiJsonFilename = options.apiJsonFilename;\n this.toolPackage = options.toolPackage;\n this.toolVersion = options.toolVersion;\n this.versionToDeserialize = options.versionToDeserialize;\n this.tsdocConfiguration = options.tsdocConfiguration;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DeserializerContext.js","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,IAAY,oBA+GX;AA/GD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;OAEG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;;;;;OAQG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;OAIG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAa,CAAA;IAEb;;;;;OAKG;IACH,sEAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAyB,CAAA;IAEzB;;;;;;OAMG;IACH,8GAAmC,CAAA;AACrC,CAAC,EA/GW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QA+G/B;AAED,MAAa,mBAAmB;IA0B9B,YAAmB,OAA4B;QAC7C,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IACvD,CAAC;CACF;AAjCD,kDAiCC","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 { TSDocConfiguration } from '@microsoft/tsdoc';\n\nexport enum ApiJsonSchemaVersion {\n /**\n * The initial release.\n */\n V_1000 = 1000,\n\n /**\n * Add support for type parameters and type alias types.\n */\n V_1001 = 1001,\n\n /**\n * Remove `canonicalReference` field. This field was for diagnostic purposes only and was never deserialized.\n */\n V_1002 = 1002,\n\n /**\n * Reintroduce the `canonicalReference` field using the experimental new TSDoc declaration reference notation.\n *\n * This is not a breaking change because this field is never deserialized; it is provided for informational\n * purposes only.\n */\n V_1003 = 1003,\n\n /**\n * Add a `tsdocConfig` field that tracks the TSDoc configuration for parsing doc comments.\n *\n * This is not a breaking change because an older implementation will still work correctly. The\n * custom tags will be skipped over by the parser.\n */\n V_1004 = 1004,\n\n /**\n * Add an `isOptional` field to `Parameter` and `TypeParameter` to track whether a function parameter is optional.\n *\n * When loading older JSON files, the value defaults to `false`.\n */\n V_1005 = 1005,\n\n /**\n * Add an `isProtected` field to `ApiConstructor`, `ApiMethod`, and `ApiProperty` to\n * track whether a class member has the `protected` modifier.\n *\n * Add an `isReadonly` field to `ApiProperty`, `ApiPropertySignature`, and `ApiVariable` to\n * track whether the item is readonly.\n *\n * When loading older JSON files, the values default to `false`.\n */\n V_1006 = 1006,\n\n /**\n * Add `ApiItemContainerMixin.preserveMemberOrder` to support enums that preserve their original sort order.\n *\n * When loading older JSON files, the value default to `false`.\n */\n V_1007 = 1007,\n\n /**\n * Add an `initializerTokenRange` field to `ApiProperty` and `ApiVariable` to track the item's\n * initializer.\n *\n * When loading older JSON files, this range is empty.\n */\n V_1008 = 1008,\n\n /**\n * Add an `isReadonly` field to `ApiIndexSignature` to track whether the item is readonly.\n *\n * When loading older JSON files, the values defaults to `false`.\n */\n V_1009 = 1009,\n\n /**\n * Add a `fileUrlPath` field to `ApiDeclaredItem` to track the URL to a declared item's source file.\n *\n * When loading older JSON files, the value defaults to `undefined`.\n */\n V_1010 = 1010,\n\n /**\n * Add an `isAbstract` field to `ApiClass`, `ApiMethod`, and `ApiProperty` to\n * track whether the item is abstract.\n *\n * When loading older JSON files, the value defaults to `false`.\n */\n V_1011 = 1011,\n\n /**\n * The current latest .api.json schema version.\n *\n * IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`\n * should be updated.\n */\n LATEST = V_1011,\n\n /**\n * The oldest .api.json schema version that is still supported for backwards compatibility.\n *\n * This must be updated if you change to the file format and do not implement compatibility logic for\n * deserializing the older representation.\n */\n OLDEST_SUPPORTED = V_1001,\n\n /**\n * Used to assign `IApiPackageMetadataJson.oldestForwardsCompatibleVersion`.\n *\n * This value must be \\<= `ApiJsonSchemaVersion.LATEST`. It must be reset to the `LATEST` value\n * if the older library would not be able to deserialize your new file format. Adding a nonessential field\n * is generally okay. Removing, modifying, or reinterpreting existing fields is NOT safe.\n */\n OLDEST_FORWARDS_COMPATIBLE = V_1001\n}\n\nexport class DeserializerContext {\n /**\n * The path of the file being deserialized, which may be useful for diagnostic purposes.\n */\n public readonly apiJsonFilename: string;\n\n /**\n * Metadata from `IApiPackageMetadataJson.toolPackage`.\n */\n public readonly toolPackage: string;\n\n /**\n * Metadata from `IApiPackageMetadataJson.toolVersion`.\n */\n public readonly toolVersion: string;\n\n /**\n * The version of the schema being deserialized, as obtained from `IApiPackageMetadataJson.schemaVersion`.\n */\n public readonly versionToDeserialize: ApiJsonSchemaVersion;\n\n /**\n * The TSDoc configuration for the context.\n */\n public readonly tsdocConfiguration: TSDocConfiguration;\n\n public constructor(options: DeserializerContext) {\n this.apiJsonFilename = options.apiJsonFilename;\n this.toolPackage = options.toolPackage;\n this.toolVersion = options.toolVersion;\n this.versionToDeserialize = options.versionToDeserialize;\n this.tsdocConfiguration = options.tsdocConfiguration;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeritageType.d.ts","sourceRoot":"","sources":["../../src/model/HeritageType.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"HeritageType.d.ts","sourceRoot":"","sources":["../../src/model/HeritageType.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,YAAY;IACvB;;;;;;;;;;;;;OAaG;IACH,SAAgB,OAAO,EAAE,OAAO,CAAC;gBAEd,OAAO,EAAE,OAAO;CAGpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeritageType.js","sourceRoot":"","sources":["../../src/model/HeritageType.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,YAAY;IAiBvB,YAAmB,OAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AApBD,oCAoBC","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 { Excerpt } from '../mixins/Excerpt';\n\n/**\n * Represents a type referenced via an \"extends\" or \"implements\" heritage clause for a TypeScript class\n * or interface.\n *\n * @remarks\n *\n * For example, consider this declaration:\n *\n * ```ts\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\n * // . . .\n * }\n * ```\n *\n * The heritage types are `Controls.WidgetBase`, `Controls.IWidget`, and `IDisposable`.\n * @public\n */\nexport class HeritageType {\n /**\n * An excerpt corresponding to the referenced type.\n * @remarks\n *\n * For example, consider this declaration:\n *\n * ```ts\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\n * // . . .\n * }\n * ```\n *\n * The excerpt might be `Controls.WidgetBase`, `Controls.IWidget`, or `IDisposable`.\n */\n public readonly excerpt: Excerpt;\n\n public constructor(excerpt: Excerpt) {\n this.excerpt = excerpt;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HeritageType.js","sourceRoot":"","sources":["../../src/model/HeritageType.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,YAAY;IAiBvB,YAAmB,OAAgB;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AApBD,oCAoBC","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 { Excerpt } from '../mixins/Excerpt';\n\n/**\n * Represents a type referenced via an \"extends\" or \"implements\" heritage clause for a TypeScript class\n * or interface.\n *\n * @remarks\n *\n * For example, consider this declaration:\n *\n * ```ts\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\n * // . . .\n * }\n * ```\n *\n * The heritage types are `Controls.WidgetBase`, `Controls.IWidget`, and `IDisposable`.\n * @public\n */\nexport class HeritageType {\n /**\n * An excerpt corresponding to the referenced type.\n * @remarks\n *\n * For example, consider this declaration:\n *\n * ```ts\n * export class Widget extends Controls.WidgetBase implements Controls.IWidget, IDisposable {\n * // . . .\n * }\n * ```\n *\n * The excerpt might be `Controls.WidgetBase`, `Controls.IWidget`, or `IDisposable`.\n */\n public readonly excerpt: Excerpt;\n\n public constructor(excerpt: Excerpt) {\n this.excerpt = excerpt;\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DocDeclarationReference } from '@microsoft/tsdoc';
|
|
2
|
-
import { ApiItem } from '../items/ApiItem';
|
|
3
|
-
import { ApiModel } from './ApiModel';
|
|
1
|
+
import { type DocDeclarationReference } from '@microsoft/tsdoc';
|
|
2
|
+
import { type ApiItem } from '../items/ApiItem';
|
|
3
|
+
import type { ApiModel } from './ApiModel';
|
|
4
4
|
/**
|
|
5
5
|
* Result object for {@link ApiModel.resolveDeclarationReference}.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelReferenceResolver.d.ts","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"ModelReferenceResolver.d.ts","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,uBAAuB,EAAwC,MAAM,kBAAkB,CAAC;AACtG,OAAO,EAAE,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM3C;;;;GAIG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAW;gBAElB,QAAQ,EAAE,QAAQ;IAI9B,OAAO,CACZ,oBAAoB,EAAE,uBAAuB,EAC7C,cAAc,EAAE,OAAO,GAAG,SAAS,GAClC,kCAAkC;IAiGrC,OAAO,CAAC,0BAA0B;IAsDlC,OAAO,CAAC,yBAAyB;CAoClC"}
|
|
@@ -155,7 +155,7 @@ class ModelReferenceResolver {
|
|
|
155
155
|
errorMessage: undefined
|
|
156
156
|
};
|
|
157
157
|
const selectedMembers = [];
|
|
158
|
-
const selectorOverloadIndex = parseInt(memberSelector.selector);
|
|
158
|
+
const selectorOverloadIndex = parseInt(memberSelector.selector, 10);
|
|
159
159
|
for (const foundMember of foundMembers) {
|
|
160
160
|
if (ApiParameterListMixin_1.ApiParameterListMixin.isBaseClassOf(foundMember)) {
|
|
161
161
|
if (foundMember.overloadIndex === selectorOverloadIndex) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelReferenceResolver.js","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4CAA4F;AAC5F,8CAAwD;AAIxD,2EAAwE;AACxE,2EAAwE;AAoBxE;;;;;;;GAOG;AACH,MAAa,sBAAsB;IAGjC,YAAmB,QAAkB;QACnC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,OAAO,CACZ,oBAA6C,EAC7C,cAAmC;QAEnC,MAAM,MAAM,GAAuC;YACjD,eAAe,EAAE,SAAS;YAC1B,YAAY,EAAE,SAAS;SACxB,CAAC;QAEF,IAAI,UAAU,GAA2B,SAAS,CAAC;QAEnD,iCAAiC;QACjC,IAAI,oBAAoB,CAAC,WAAW,KAAK,SAAS,EAAE;YAClD,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC;YAClF,IAAI,UAAU,KAAK,SAAS,EAAE;gBAC5B,MAAM,CAAC,YAAY,GAAG,gBAAgB,oBAAoB,CAAC,WAAW,wBAAwB,CAAC;gBAC/F,OAAO,MAAM,CAAC;aACf;SACF;aAAM;YACL,mEAAmE;YACnE,IAAI,cAAc,KAAK,SAAS,EAAE;gBAChC,UAAU,GAAG,cAAc,CAAC,oBAAoB,EAAE,CAAC;aACpD;YAED,IAAI,UAAU,KAAK,SAAS,EAAE;gBAC5B,MAAM,CAAC,YAAY;oBACjB,sFAAs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Ae,EAAE,SAAS;YAC1B,YAAY,EAAE,SAAS;SACxB,CAAC;QAEF,MAAM,eAAe,GAAc,EAAE,CAAC;QAEtC,MAAM,qBAAqB,GAAW,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACxE,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;YACtC,IAAI,6CAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;gBACpD,IAAI,WAAW,CAAC,aAAa,KAAK,qBAAqB,EAAE;oBACvD,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBACnC;aACF;SACF;QAED,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC,MAAM,CAAC,YAAY;gBACjB,mBAAmB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,6BAA6B;oBAC1E,yBAAyB,qBAAqB,GAAG,CAAC;YACpD,OAAO,MAAM,CAAC;SACf;QAED,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,YAAY,GAAG,wBAAwB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACzF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AArMD,wDAqMC","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 { DocDeclarationReference, DocMemberSelector, SelectorKind } from '@microsoft/tsdoc';\nimport { ApiItem, ApiItemKind } from '../items/ApiItem';\nimport { ApiModel } from './ApiModel';\nimport { ApiPackage } from './ApiPackage';\nimport { ApiEntryPoint } from './ApiEntryPoint';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Result object for {@link ApiModel.resolveDeclarationReference}.\n *\n * @public\n */\nexport interface IResolveDeclarationReferenceResult {\n /**\n * The referenced ApiItem, if the declaration reference could be resolved.\n */\n resolvedApiItem: ApiItem | undefined;\n\n /**\n * If resolvedApiItem is undefined, then this will always contain an error message explaining why the\n * resolution failed.\n */\n errorMessage: string | undefined;\n}\n\n/**\n * This resolves a TSDoc declaration reference by walking the `ApiModel` hierarchy.\n *\n * @remarks\n *\n * This class is analogous to `AstReferenceResolver` from the `@microsoft/api-extractor` project,\n * which resolves declaration references by walking the compiler state.\n */\nexport class ModelReferenceResolver {\n private readonly _apiModel: ApiModel;\n\n public constructor(apiModel: ApiModel) {\n this._apiModel = apiModel;\n }\n\n public resolve(\n declarationReference: DocDeclarationReference,\n contextApiItem: ApiItem | undefined\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n let apiPackage: ApiPackage | undefined = undefined;\n\n // Is this an absolute reference?\n if (declarationReference.packageName !== undefined) {\n apiPackage = this._apiModel.tryGetPackageByName(declarationReference.packageName);\n if (apiPackage === undefined) {\n result.errorMessage = `The package \"${declarationReference.packageName}\" could not be located`;\n return result;\n }\n } else {\n // If the package name is omitted, try to infer it from the context\n if (contextApiItem !== undefined) {\n apiPackage = contextApiItem.getAssociatedPackage();\n }\n\n if (apiPackage === undefined) {\n result.errorMessage =\n `The reference does not include a package name, and the package could not be inferred` +\n ` from the context`;\n return result;\n }\n }\n\n const importPath: string = declarationReference.importPath || '';\n\n const foundEntryPoints: ReadonlyArray<ApiEntryPoint> = apiPackage.findEntryPointsByPath(importPath);\n if (foundEntryPoints.length !== 1) {\n result.errorMessage = `The import path \"${importPath}\" could not be resolved`;\n return result;\n }\n\n let currentItem: ApiItem = foundEntryPoints[0];\n\n // Now search for the member reference\n for (const memberReference of declarationReference.memberReferences) {\n if (memberReference.memberSymbol !== undefined) {\n result.errorMessage = `Symbols are not yet supported in declaration references`;\n return result;\n }\n\n if (memberReference.memberIdentifier === undefined) {\n result.errorMessage = `Missing member identifier`;\n return result;\n }\n\n const identifier: string = memberReference.memberIdentifier.identifier;\n\n if (!ApiItemContainerMixin.isBaseClassOf(currentItem)) {\n // For example, {@link MyClass.myMethod.X} is invalid because methods cannot contain members\n result.errorMessage = `Unable to resolve ${JSON.stringify(\n identifier\n )} because ${currentItem.getScopedNameWithinPackage()} cannot act as a container`;\n return result;\n }\n\n const foundMembers: ReadonlyArray<ApiItem> = currentItem.findMembersByName(identifier);\n if (foundMembers.length === 0) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was not found`;\n return result;\n }\n\n const memberSelector: DocMemberSelector | undefined = memberReference.selector;\n if (memberSelector === undefined) {\n if (foundMembers.length > 1) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n currentItem = foundMembers[0];\n } else {\n let memberSelectorResult: IResolveDeclarationReferenceResult;\n switch (memberSelector.selectorKind) {\n case SelectorKind.System:\n memberSelectorResult = this._selectUsingSystemSelector(foundMembers, memberSelector, identifier);\n break;\n case SelectorKind.Index:\n memberSelectorResult = this._selectUsingIndexSelector(foundMembers, memberSelector, identifier);\n break;\n default:\n result.errorMessage = `The selector \"${memberSelector.selector}\" is not a supported selector type`;\n return result;\n }\n if (memberSelectorResult.resolvedApiItem === undefined) {\n return memberSelectorResult;\n }\n currentItem = memberSelectorResult.resolvedApiItem;\n }\n }\n result.resolvedApiItem = currentItem;\n return result;\n }\n\n private _selectUsingSystemSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectorName: string = memberSelector.selector;\n\n let selectorItemKind: ApiItemKind;\n switch (selectorName) {\n case 'class':\n selectorItemKind = ApiItemKind.Class;\n break;\n case 'enum':\n selectorItemKind = ApiItemKind.Enum;\n break;\n case 'function':\n selectorItemKind = ApiItemKind.Function;\n break;\n case 'interface':\n selectorItemKind = ApiItemKind.Interface;\n break;\n case 'namespace':\n selectorItemKind = ApiItemKind.Namespace;\n break;\n case 'type':\n selectorItemKind = ApiItemKind.TypeAlias;\n break;\n case 'variable':\n selectorItemKind = ApiItemKind.Variable;\n break;\n default:\n result.errorMessage = `Unsupported system selector \"${selectorName}\"`;\n return result;\n }\n\n const matches: ApiItem[] = foundMembers.filter((x) => x.kind === selectorItemKind);\n if (matches.length === 0) {\n result.errorMessage =\n `A declaration for \"${identifier}\" was not found that matches the` +\n ` TSDoc selector \"${selectorName}\"`;\n return result;\n }\n if (matches.length > 1) {\n result.errorMessage = `More than one declaration \"${identifier}\" matches the TSDoc selector \"${selectorName}\"`;\n }\n result.resolvedApiItem = matches[0];\n return result;\n }\n\n private _selectUsingIndexSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectedMembers: ApiItem[] = [];\n\n const selectorOverloadIndex: number = parseInt(memberSelector.selector);\n for (const foundMember of foundMembers) {\n if (ApiParameterListMixin.isBaseClassOf(foundMember)) {\n if (foundMember.overloadIndex === selectorOverloadIndex) {\n selectedMembers.push(foundMember);\n }\n }\n }\n\n if (selectedMembers.length === 0) {\n result.errorMessage =\n `An overload for ${JSON.stringify(identifier)} was not found that matches` +\n ` the TSDoc selector \":${selectorOverloadIndex}\"`;\n return result;\n }\n\n if (selectedMembers.length === 1) {\n result.resolvedApiItem = selectedMembers[0];\n return result;\n }\n\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ModelReferenceResolver.js","sourceRoot":"","sources":["../../src/model/ModelReferenceResolver.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,4CAAsG;AACtG,8C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KAAK,CAAC,EAAE;YAChC,MAAM,CAAC,YAAY;gBACjB,mBAAmB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,6BAA6B;oBAC1E,yBAAyB,qBAAqB,GAAG,CAAC;YACpD,OAAO,MAAM,CAAC;SACf;QAED,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC5C,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,YAAY,GAAG,wBAAwB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACzF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AArMD,wDAqMC","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 DocDeclarationReference, type DocMemberSelector, SelectorKind } from '@microsoft/tsdoc';\nimport { type ApiItem, ApiItemKind } from '../items/ApiItem';\nimport type { ApiModel } from './ApiModel';\nimport type { ApiPackage } from './ApiPackage';\nimport type { ApiEntryPoint } from './ApiEntryPoint';\nimport { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Result object for {@link ApiModel.resolveDeclarationReference}.\n *\n * @public\n */\nexport interface IResolveDeclarationReferenceResult {\n /**\n * The referenced ApiItem, if the declaration reference could be resolved.\n */\n resolvedApiItem: ApiItem | undefined;\n\n /**\n * If resolvedApiItem is undefined, then this will always contain an error message explaining why the\n * resolution failed.\n */\n errorMessage: string | undefined;\n}\n\n/**\n * This resolves a TSDoc declaration reference by walking the `ApiModel` hierarchy.\n *\n * @remarks\n *\n * This class is analogous to `AstReferenceResolver` from the `@microsoft/api-extractor` project,\n * which resolves declaration references by walking the compiler state.\n */\nexport class ModelReferenceResolver {\n private readonly _apiModel: ApiModel;\n\n public constructor(apiModel: ApiModel) {\n this._apiModel = apiModel;\n }\n\n public resolve(\n declarationReference: DocDeclarationReference,\n contextApiItem: ApiItem | undefined\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n let apiPackage: ApiPackage | undefined = undefined;\n\n // Is this an absolute reference?\n if (declarationReference.packageName !== undefined) {\n apiPackage = this._apiModel.tryGetPackageByName(declarationReference.packageName);\n if (apiPackage === undefined) {\n result.errorMessage = `The package \"${declarationReference.packageName}\" could not be located`;\n return result;\n }\n } else {\n // If the package name is omitted, try to infer it from the context\n if (contextApiItem !== undefined) {\n apiPackage = contextApiItem.getAssociatedPackage();\n }\n\n if (apiPackage === undefined) {\n result.errorMessage =\n `The reference does not include a package name, and the package could not be inferred` +\n ` from the context`;\n return result;\n }\n }\n\n const importPath: string = declarationReference.importPath || '';\n\n const foundEntryPoints: ReadonlyArray<ApiEntryPoint> = apiPackage.findEntryPointsByPath(importPath);\n if (foundEntryPoints.length !== 1) {\n result.errorMessage = `The import path \"${importPath}\" could not be resolved`;\n return result;\n }\n\n let currentItem: ApiItem = foundEntryPoints[0];\n\n // Now search for the member reference\n for (const memberReference of declarationReference.memberReferences) {\n if (memberReference.memberSymbol !== undefined) {\n result.errorMessage = `Symbols are not yet supported in declaration references`;\n return result;\n }\n\n if (memberReference.memberIdentifier === undefined) {\n result.errorMessage = `Missing member identifier`;\n return result;\n }\n\n const identifier: string = memberReference.memberIdentifier.identifier;\n\n if (!ApiItemContainerMixin.isBaseClassOf(currentItem)) {\n // For example, {@link MyClass.myMethod.X} is invalid because methods cannot contain members\n result.errorMessage = `Unable to resolve ${JSON.stringify(\n identifier\n )} because ${currentItem.getScopedNameWithinPackage()} cannot act as a container`;\n return result;\n }\n\n const foundMembers: ReadonlyArray<ApiItem> = currentItem.findMembersByName(identifier);\n if (foundMembers.length === 0) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was not found`;\n return result;\n }\n\n const memberSelector: DocMemberSelector | undefined = memberReference.selector;\n if (memberSelector === undefined) {\n if (foundMembers.length > 1) {\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n currentItem = foundMembers[0];\n } else {\n let memberSelectorResult: IResolveDeclarationReferenceResult;\n switch (memberSelector.selectorKind) {\n case SelectorKind.System:\n memberSelectorResult = this._selectUsingSystemSelector(foundMembers, memberSelector, identifier);\n break;\n case SelectorKind.Index:\n memberSelectorResult = this._selectUsingIndexSelector(foundMembers, memberSelector, identifier);\n break;\n default:\n result.errorMessage = `The selector \"${memberSelector.selector}\" is not a supported selector type`;\n return result;\n }\n if (memberSelectorResult.resolvedApiItem === undefined) {\n return memberSelectorResult;\n }\n currentItem = memberSelectorResult.resolvedApiItem;\n }\n }\n result.resolvedApiItem = currentItem;\n return result;\n }\n\n private _selectUsingSystemSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectorName: string = memberSelector.selector;\n\n let selectorItemKind: ApiItemKind;\n switch (selectorName) {\n case 'class':\n selectorItemKind = ApiItemKind.Class;\n break;\n case 'enum':\n selectorItemKind = ApiItemKind.Enum;\n break;\n case 'function':\n selectorItemKind = ApiItemKind.Function;\n break;\n case 'interface':\n selectorItemKind = ApiItemKind.Interface;\n break;\n case 'namespace':\n selectorItemKind = ApiItemKind.Namespace;\n break;\n case 'type':\n selectorItemKind = ApiItemKind.TypeAlias;\n break;\n case 'variable':\n selectorItemKind = ApiItemKind.Variable;\n break;\n default:\n result.errorMessage = `Unsupported system selector \"${selectorName}\"`;\n return result;\n }\n\n const matches: ApiItem[] = foundMembers.filter((x) => x.kind === selectorItemKind);\n if (matches.length === 0) {\n result.errorMessage =\n `A declaration for \"${identifier}\" was not found that matches the` +\n ` TSDoc selector \"${selectorName}\"`;\n return result;\n }\n if (matches.length > 1) {\n result.errorMessage = `More than one declaration \"${identifier}\" matches the TSDoc selector \"${selectorName}\"`;\n }\n result.resolvedApiItem = matches[0];\n return result;\n }\n\n private _selectUsingIndexSelector(\n foundMembers: ReadonlyArray<ApiItem>,\n memberSelector: DocMemberSelector,\n identifier: string\n ): IResolveDeclarationReferenceResult {\n const result: IResolveDeclarationReferenceResult = {\n resolvedApiItem: undefined,\n errorMessage: undefined\n };\n\n const selectedMembers: ApiItem[] = [];\n\n const selectorOverloadIndex: number = parseInt(memberSelector.selector, 10);\n for (const foundMember of foundMembers) {\n if (ApiParameterListMixin.isBaseClassOf(foundMember)) {\n if (foundMember.overloadIndex === selectorOverloadIndex) {\n selectedMembers.push(foundMember);\n }\n }\n }\n\n if (selectedMembers.length === 0) {\n result.errorMessage =\n `An overload for ${JSON.stringify(identifier)} was not found that matches` +\n ` the TSDoc selector \":${selectorOverloadIndex}\"`;\n return result;\n }\n\n if (selectedMembers.length === 1) {\n result.resolvedApiItem = selectedMembers[0];\n return result;\n }\n\n result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;\n return result;\n }\n}\n"]}
|
package/lib/model/Parameter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as tsdoc from '@microsoft/tsdoc';
|
|
2
|
-
import { Excerpt } from '../mixins/Excerpt';
|
|
3
|
-
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
1
|
+
import type * as tsdoc from '@microsoft/tsdoc';
|
|
2
|
+
import type { Excerpt } from '../mixins/Excerpt';
|
|
3
|
+
import type { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
4
4
|
/**
|
|
5
5
|
* Constructor options for {@link Parameter}.
|
|
6
6
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../src/model/Parameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Parameter.d.ts","sourceRoot":"","sources":["../../src/model/Parameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAG/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,SAAS;IACpB;;OAEG;IACH,SAAgB,oBAAoB,EAAE,OAAO,CAAC;IAE9C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACI,UAAU,EAAE,OAAO,CAAC;IAE3B,OAAO,CAAC,OAAO,CAAwB;gBAEpB,OAAO,EAAE,iBAAiB;IAO7C;;OAEG;IACH,IAAW,eAAe,IAAI,KAAK,CAAC,aAAa,GAAG,SAAS,CAM5D;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../src/model/Parameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;AAe/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,SAAS;IAkBpB,YAAmB,OAA0B;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtE;SACF;IACH,CAAC;CACF;AAnCD,8BAmCC","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 * as tsdoc from '@microsoft/tsdoc';\n\nimport { ApiDocumentedItem } from '../items/ApiDocumentedItem';\nimport { Excerpt } from '../mixins/Excerpt';\nimport { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Constructor options for {@link Parameter}.\n * @public\n */\nexport interface IParameterOptions {\n name: string;\n parameterTypeExcerpt: Excerpt;\n isOptional: boolean;\n parent: ApiParameterListMixin;\n}\n\n/**\n * Represents a named parameter for a function-like declaration.\n *\n * @remarks\n *\n * `Parameter` represents a TypeScript declaration such as `x: number` in this example:\n *\n * ```ts\n * export function add(x: number, y: number): number {\n * return x + y;\n * }\n * ```\n *\n * `Parameter` objects belong to the {@link (ApiParameterListMixin:interface).parameters} collection.\n *\n * @public\n */\nexport class Parameter {\n /**\n * An {@link Excerpt} that describes the type of the parameter.\n */\n public readonly parameterTypeExcerpt: Excerpt;\n\n /**\n * The parameter name.\n */\n public name: string;\n\n /**\n * Whether the parameter is optional.\n */\n public isOptional: boolean;\n\n private _parent: ApiParameterListMixin;\n\n public constructor(options: IParameterOptions) {\n this.name = options.name;\n this.parameterTypeExcerpt = options.parameterTypeExcerpt;\n this.isOptional = options.isOptional;\n this._parent = options.parent;\n }\n\n /**\n * Returns the `@param` documentation for this parameter, if present.\n */\n public get tsdocParamBlock(): tsdoc.DocParamBlock | undefined {\n if (this._parent instanceof ApiDocumentedItem) {\n if (this._parent.tsdocComment) {\n return this._parent.tsdocComment.params.tryGetBlockByName(this.name);\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../src/model/Parameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;AAe/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,SAAS;IAkBpB,YAAmB,OAA0B;QAC3C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtE;SACF;IACH,CAAC;CACF;AAnCD,8BAmCC","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 * as tsdoc from '@microsoft/tsdoc';\n\nimport { ApiDocumentedItem } from '../items/ApiDocumentedItem';\nimport type { Excerpt } from '../mixins/Excerpt';\nimport type { ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\n\n/**\n * Constructor options for {@link Parameter}.\n * @public\n */\nexport interface IParameterOptions {\n name: string;\n parameterTypeExcerpt: Excerpt;\n isOptional: boolean;\n parent: ApiParameterListMixin;\n}\n\n/**\n * Represents a named parameter for a function-like declaration.\n *\n * @remarks\n *\n * `Parameter` represents a TypeScript declaration such as `x: number` in this example:\n *\n * ```ts\n * export function add(x: number, y: number): number {\n * return x + y;\n * }\n * ```\n *\n * `Parameter` objects belong to the {@link (ApiParameterListMixin:interface).parameters} collection.\n *\n * @public\n */\nexport class Parameter {\n /**\n * An {@link Excerpt} that describes the type of the parameter.\n */\n public readonly parameterTypeExcerpt: Excerpt;\n\n /**\n * The parameter name.\n */\n public name: string;\n\n /**\n * Whether the parameter is optional.\n */\n public isOptional: boolean;\n\n private _parent: ApiParameterListMixin;\n\n public constructor(options: IParameterOptions) {\n this.name = options.name;\n this.parameterTypeExcerpt = options.parameterTypeExcerpt;\n this.isOptional = options.isOptional;\n this._parent = options.parent;\n }\n\n /**\n * Returns the `@param` documentation for this parameter, if present.\n */\n public get tsdocParamBlock(): tsdoc.DocParamBlock | undefined {\n if (this._parent instanceof ApiDocumentedItem) {\n if (this._parent.tsdocComment) {\n return this._parent.tsdocComment.params.tryGetBlockByName(this.name);\n }\n }\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as tsdoc from '@microsoft/tsdoc';
|
|
2
|
-
import { Excerpt } from '../mixins/Excerpt';
|
|
3
|
-
import { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
1
|
+
import type * as tsdoc from '@microsoft/tsdoc';
|
|
2
|
+
import type { Excerpt } from '../mixins/Excerpt';
|
|
3
|
+
import type { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
4
4
|
/**
|
|
5
5
|
* Constructor options for {@link TypeParameter}.
|
|
6
6
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeParameter.d.ts","sourceRoot":"","sources":["../../src/model/TypeParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"TypeParameter.d.ts","sourceRoot":"","sources":["../../src/model/TypeParameter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAG/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CA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IAAW,mBAAmB;QAC5B,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC1E;SACF;IACH,CAAC;CACF;AA3DD,sCA2DC","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 * as tsdoc from '@microsoft/tsdoc';\n\nimport { ApiDocumentedItem } from '../items/ApiDocumentedItem';\nimport { Excerpt } from '../mixins/Excerpt';\nimport { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link TypeParameter}.\n * @public\n */\nexport interface ITypeParameterOptions {\n name: string;\n constraintExcerpt: Excerpt;\n defaultTypeExcerpt: Excerpt;\n isOptional: boolean;\n parent: ApiTypeParameterListMixin;\n}\n\n/**\n * Represents a named type parameter for a generic declaration.\n *\n * @remarks\n *\n * `TypeParameter` represents a TypeScript declaration such as `T` in this example:\n *\n * ```ts\n * interface IIdentifier {\n * getCode(): string;\n * }\n *\n * class BarCode implements IIdentifier {\n * private _value: number;\n * public getCode(): string { return this._value.toString(); }\n * }\n *\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n *\n * `TypeParameter` objects belong to the {@link (ApiTypeParameterListMixin:interface).typeParameters} collection.\n *\n * @public\n */\nexport class TypeParameter {\n /**\n * An {@link Excerpt} that describes the base constraint of the type parameter.\n *\n * @remarks\n * In the example below, the `constraintExcerpt` would correspond to the `IIdentifier` subexpression:\n *\n * ```ts\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n */\n public readonly constraintExcerpt: Excerpt;\n\n /**\n * An {@link Excerpt} that describes the default type of the type parameter.\n *\n * @remarks\n * In the example below, the `defaultTypeExcerpt` would correspond to the `BarCode` subexpression:\n *\n * ```ts\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n */\n public readonly defaultTypeExcerpt: Excerpt;\n\n /**\n * The parameter name.\n */\n public name: string;\n\n /**\n * Whether the type parameter is optional. True IFF there exists a `defaultTypeExcerpt`.\n */\n public isOptional: boolean;\n\n private _parent: ApiTypeParameterListMixin;\n\n public constructor(options: ITypeParameterOptions) {\n this.name = options.name;\n this.constraintExcerpt = options.constraintExcerpt;\n this.defaultTypeExcerpt = options.defaultTypeExcerpt;\n this.isOptional = options.isOptional;\n this._parent = options.parent;\n }\n\n /**\n * Returns the `@typeParam` documentation for this parameter, if present.\n */\n public get tsdocTypeParamBlock(): tsdoc.DocParamBlock | undefined {\n if (this._parent instanceof ApiDocumentedItem) {\n if (this._parent.tsdocComment) {\n return this._parent.tsdocComment.typeParams.tryGetBlockByName(this.name);\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TypeParameter.js","sourceRoot":"","sources":["../../src/model/TypeParameter.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,kEAA+D;AAgB/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,aAAa;IAyCxB,YAAmB,OAA8B;QAC/C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;QACnD,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,mBAAmB;QAC5B,IAAI,IAAI,CAAC,OAAO,YAAY,qCAAiB,EAAE;YAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;gBAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC1E;SACF;IACH,CAAC;CACF;AA3DD,sCA2DC","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 * as tsdoc from '@microsoft/tsdoc';\n\nimport { ApiDocumentedItem } from '../items/ApiDocumentedItem';\nimport type { Excerpt } from '../mixins/Excerpt';\nimport type { ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';\n\n/**\n * Constructor options for {@link TypeParameter}.\n * @public\n */\nexport interface ITypeParameterOptions {\n name: string;\n constraintExcerpt: Excerpt;\n defaultTypeExcerpt: Excerpt;\n isOptional: boolean;\n parent: ApiTypeParameterListMixin;\n}\n\n/**\n * Represents a named type parameter for a generic declaration.\n *\n * @remarks\n *\n * `TypeParameter` represents a TypeScript declaration such as `T` in this example:\n *\n * ```ts\n * interface IIdentifier {\n * getCode(): string;\n * }\n *\n * class BarCode implements IIdentifier {\n * private _value: number;\n * public getCode(): string { return this._value.toString(); }\n * }\n *\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n *\n * `TypeParameter` objects belong to the {@link (ApiTypeParameterListMixin:interface).typeParameters} collection.\n *\n * @public\n */\nexport class TypeParameter {\n /**\n * An {@link Excerpt} that describes the base constraint of the type parameter.\n *\n * @remarks\n * In the example below, the `constraintExcerpt` would correspond to the `IIdentifier` subexpression:\n *\n * ```ts\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n */\n public readonly constraintExcerpt: Excerpt;\n\n /**\n * An {@link Excerpt} that describes the default type of the type parameter.\n *\n * @remarks\n * In the example below, the `defaultTypeExcerpt` would correspond to the `BarCode` subexpression:\n *\n * ```ts\n * class Book<TIdentifier extends IIdentifier = BarCode> {\n * public identifier: TIdentifier;\n * }\n * ```\n */\n public readonly defaultTypeExcerpt: Excerpt;\n\n /**\n * The parameter name.\n */\n public name: string;\n\n /**\n * Whether the type parameter is optional. True IFF there exists a `defaultTypeExcerpt`.\n */\n public isOptional: boolean;\n\n private _parent: ApiTypeParameterListMixin;\n\n public constructor(options: ITypeParameterOptions) {\n this.name = options.name;\n this.constraintExcerpt = options.constraintExcerpt;\n this.defaultTypeExcerpt = options.defaultTypeExcerpt;\n this.isOptional = options.isOptional;\n this._parent = options.parent;\n }\n\n /**\n * Returns the `@typeParam` documentation for this parameter, if present.\n */\n public get tsdocTypeParamBlock(): tsdoc.DocParamBlock | undefined {\n if (this._parent instanceof ApiDocumentedItem) {\n if (this._parent.tsdocComment) {\n return this._parent.tsdocComment.typeParams.tryGetBlockByName(this.name);\n }\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/api-extractor-model",
|
|
3
|
-
"version": "7.28.
|
|
3
|
+
"version": "7.28.2",
|
|
4
4
|
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@microsoft/tsdoc": "0.14.2",
|
|
16
16
|
"@microsoft/tsdoc-config": "~0.16.1",
|
|
17
|
-
"@rushstack/node-core-library": "3.
|
|
17
|
+
"@rushstack/node-core-library": "3.61.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@rushstack/heft": "0.
|
|
21
|
-
"@rushstack/heft-node-rig": "2.2
|
|
20
|
+
"@rushstack/heft": "0.62.0",
|
|
21
|
+
"@rushstack/heft-node-rig": "2.3.2",
|
|
22
22
|
"@types/heft-jest": "1.0.1",
|
|
23
23
|
"@types/node": "18.17.15",
|
|
24
|
-
"
|
|
24
|
+
"local-eslint-config": "1.0.0"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "heft build --clean",
|