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AC1D,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,CAAC,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAU,CAAC,MAAM,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,CAAC,8BAAO,CAAC,SAAS,CAAC,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';\n\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"]}
{"version":3,"file":"ApiVariable.js","sourceRoot":"","sources":["../../src/model/ApiVariable.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,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,CAAC,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAU,CAAC,MAAM,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,CAAC,8BAAO,CAAC,QAAQ,CAAC,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';\n\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"]}
{"version":3,"file":"Deserializer.js","sourceRoot":"","sources":["../../src/model/Deserializer.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,8CAAsG;AACtG,yCAAiF;AACjF,mDAA4E;AAC5E,2CAAgE;AAChE,yCAAsC;AACtC,iDAAyE;AACzE,6CAAyF;AACzF,iDAAiG;AACjG,iEAAiG;AACjG,6DAA2F;AAC3F,+CAAsE;AACtE,mDAA4E;AAC5E,uCAA0D;AAE1D,qDAA+E;AAC/E,mEAAoG;AACpG,+CAAsE;AACtE,yDAAqF;AACrF,2DAAwF;AACxF,iDAAiG;AACjG,+CAA6F;AAI7F,MAAa,YAAY;IAChB,MAAM,CAAC,WAAW,CAAC,OAA4B,EAAE,UAAwB;QAC9E,MAAM,OAAO,GAA6B,EAAE,CAAC;QAE7C,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;YACxB,KAAK,qBAAW,CAAC,KAAK;gBACpB,mBAAQ,CAAC,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,CAAC;YACzD,KAAK,qBAAW,CAAC,iBAAiB;gBAChC,2CAAoB,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAkC,CAAC,CAAC;gBAC7F,OAAO,IAAI,2CAAoB,CAAC,OAAuC,CAAC,CAAC;YAC3E,KAAK,qBAAW,CAAC,SAAS;gBACxB,2BAAY,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAA+B,CAAC,CAAC;gBAClF,OAAO,IAAI,2BAAY,CAAC,OAA+B,CAAC,CAAC;YAC3D,KAAK,qBAAW,CAAC,QAAQ;gBACvB,yBAAW,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAA8B,CAAC,CAAC;gBAChF,OAAO,IAAI,yBAAW,CAAC,OAA8B,CAAC,CAAC;YACzD;gBACE,MAAM,IAAI,KAAK,CAAC,mDAAmD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1G,CAAC;IACH,CAAC;CACF;AAjED,oCAiEC","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 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"]}
{"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,oCAApB,oBAAoB,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"]}
{"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"]}