@microsoft/api-extractor-model
Advanced tools
Comparing version 7.19.1 to 7.20.0
@@ -25,2 +25,3 @@ /** | ||
export { IApiReadonlyMixinOptions, ApiReadonlyMixin } from './mixins/ApiReadonlyMixin'; | ||
export { IApiInitializerMixinOptions, ApiInitializerMixin } from './mixins/ApiInitializerMixin'; | ||
export { ExcerptTokenKind, IExcerptTokenRange, IExcerptToken, ExcerptToken, Excerpt } from './mixins/Excerpt'; | ||
@@ -27,0 +28,0 @@ export { Constructor, PropertiesOf } from './mixins/Mixin'; |
@@ -5,3 +5,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HeritageType = exports.ApiVariable = exports.TypeParameter = exports.ApiTypeAlias = exports.ApiPropertySignature = exports.ApiProperty = exports.Parameter = exports.ApiPackage = exports.ApiNamespace = exports.ApiModel = exports.ApiMethodSignature = exports.ApiMethod = exports.ApiInterface = exports.ApiIndexSignature = exports.ApiFunction = exports.EnumMemberOrder = exports.ApiEnumMember = exports.ApiEnum = exports.ApiEntryPoint = exports.ApiConstructSignature = exports.ApiConstructor = exports.ApiClass = exports.ApiCallSignature = exports.Excerpt = exports.ExcerptToken = exports.ExcerptTokenKind = exports.ApiReadonlyMixin = exports.ApiOptionalMixin = exports.ApiNameMixin = exports.ApiStaticMixin = exports.ApiReturnTypeMixin = exports.ApiReleaseTagMixin = exports.ApiProtectedMixin = exports.ApiItemContainerMixin = exports.ApiTypeParameterListMixin = exports.ApiParameterListMixin = exports.ApiPropertyItem = exports.ApiItem = exports.ApiItemKind = exports.ApiDocumentedItem = exports.ApiDeclaredItem = exports.ReleaseTag = exports.AedocDefinitions = void 0; | ||
exports.HeritageType = exports.ApiVariable = exports.TypeParameter = exports.ApiTypeAlias = exports.ApiPropertySignature = exports.ApiProperty = exports.Parameter = exports.ApiPackage = exports.ApiNamespace = exports.ApiModel = exports.ApiMethodSignature = exports.ApiMethod = exports.ApiInterface = exports.ApiIndexSignature = exports.ApiFunction = exports.EnumMemberOrder = exports.ApiEnumMember = exports.ApiEnum = exports.ApiEntryPoint = exports.ApiConstructSignature = exports.ApiConstructor = exports.ApiClass = exports.ApiCallSignature = exports.Excerpt = exports.ExcerptToken = exports.ExcerptTokenKind = exports.ApiInitializerMixin = exports.ApiReadonlyMixin = exports.ApiOptionalMixin = exports.ApiNameMixin = exports.ApiStaticMixin = exports.ApiReturnTypeMixin = exports.ApiReleaseTagMixin = exports.ApiProtectedMixin = exports.ApiItemContainerMixin = exports.ApiTypeParameterListMixin = exports.ApiParameterListMixin = exports.ApiPropertyItem = exports.ApiItem = exports.ApiItemKind = exports.ApiDocumentedItem = exports.ApiDeclaredItem = exports.ReleaseTag = exports.AedocDefinitions = void 0; | ||
/** | ||
@@ -50,2 +50,4 @@ * Use this library to read and write *.api.json files as defined by the | ||
Object.defineProperty(exports, "ApiReadonlyMixin", { enumerable: true, get: function () { return ApiReadonlyMixin_1.ApiReadonlyMixin; } }); | ||
var ApiInitializerMixin_1 = require("./mixins/ApiInitializerMixin"); | ||
Object.defineProperty(exports, "ApiInitializerMixin", { enumerable: true, get: function () { return ApiInitializerMixin_1.ApiInitializerMixin; } }); | ||
var Excerpt_1 = require("./mixins/Excerpt"); | ||
@@ -52,0 +54,0 @@ Object.defineProperty(exports, "ExcerptTokenKind", { enumerable: true, get: function () { return Excerpt_1.ExcerptTokenKind; } }); |
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference'; | ||
import { ApiItemKind } from '../items/ApiItem'; | ||
import { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem'; | ||
import { ApiDeclaredItem, IApiDeclaredItemOptions } from '../items/ApiDeclaredItem'; | ||
import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin'; | ||
import { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt'; | ||
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin'; | ||
import { DeserializerContext } from './DeserializerContext'; | ||
import { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin'; | ||
/** | ||
@@ -12,4 +11,3 @@ * Constructor options for {@link ApiEnumMember}. | ||
*/ | ||
export interface IApiEnumMemberOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions { | ||
initializerTokenRange: IExcerptTokenRange; | ||
export interface IApiEnumMemberOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions { | ||
} | ||
@@ -42,6 +40,3 @@ /** | ||
} | ||
export interface IApiEnumMemberJson extends IApiDeclaredItemJson { | ||
initializerTokenRange: IExcerptTokenRange; | ||
} | ||
declare const ApiEnumMember_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin); | ||
declare const ApiEnumMember_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin); | ||
/** | ||
@@ -68,16 +63,8 @@ * Represents a member of a TypeScript enum declaration. | ||
export declare class ApiEnumMember extends ApiEnumMember_base { | ||
/** | ||
* An {@link Excerpt} that describes the value of the enum member. | ||
*/ | ||
readonly initializerExcerpt: Excerpt; | ||
constructor(options: IApiEnumMemberOptions); | ||
static getContainerKey(name: string): string; | ||
/** @override */ | ||
static onDeserializeInto(options: Partial<IApiEnumMemberOptions>, context: DeserializerContext, jsonObject: IApiEnumMemberJson): void; | ||
/** @override */ | ||
get kind(): ApiItemKind; | ||
/** @override */ | ||
get containerKey(): string; | ||
/** @override */ | ||
serializeInto(jsonObject: Partial<IApiEnumMemberJson>): void; | ||
/** @beta @override */ | ||
@@ -84,0 +71,0 @@ buildCanonicalReference(): DeclarationReference; |
@@ -11,2 +11,3 @@ "use strict"; | ||
const ApiNameMixin_1 = require("../mixins/ApiNameMixin"); | ||
const ApiInitializerMixin_1 = require("../mixins/ApiInitializerMixin"); | ||
/** | ||
@@ -59,6 +60,5 @@ * Options for customizing the sort order of {@link ApiEnum} members. | ||
*/ | ||
class ApiEnumMember extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem)) { | ||
class ApiEnumMember extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiInitializerMixin_1.ApiInitializerMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) { | ||
constructor(options) { | ||
super(options); | ||
this.initializerExcerpt = this.buildExcerpt(options.initializerTokenRange); | ||
} | ||
@@ -70,7 +70,2 @@ static getContainerKey(name) { | ||
/** @override */ | ||
static onDeserializeInto(options, context, jsonObject) { | ||
super.onDeserializeInto(options, context, jsonObject); | ||
options.initializerTokenRange = jsonObject.initializerTokenRange; | ||
} | ||
/** @override */ | ||
get kind() { | ||
@@ -83,7 +78,2 @@ return ApiItem_1.ApiItemKind.EnumMember; | ||
} | ||
/** @override */ | ||
serializeInto(jsonObject) { | ||
super.serializeInto(jsonObject); | ||
jsonObject.initializerTokenRange = this.initializerExcerpt.tokenRange; | ||
} | ||
/** @beta @override */ | ||
@@ -90,0 +80,0 @@ buildCanonicalReference() { |
@@ -5,2 +5,3 @@ import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference'; | ||
import { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin'; | ||
import { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin'; | ||
import { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem'; | ||
@@ -11,5 +12,5 @@ /** | ||
*/ | ||
export interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions { | ||
export interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions, IApiInitializerMixinOptions { | ||
} | ||
declare const ApiProperty_base: typeof ApiPropertyItem & (new (...args: any[]) => ApiStaticMixin) & (new (...args: any[]) => ApiProtectedMixin); | ||
declare const ApiProperty_base: typeof ApiPropertyItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiStaticMixin) & (new (...args: any[]) => ApiProtectedMixin); | ||
/** | ||
@@ -16,0 +17,0 @@ * Represents a TypeScript property declaration that belongs to an `ApiClass`. |
@@ -10,2 +10,3 @@ "use strict"; | ||
const ApiStaticMixin_1 = require("../mixins/ApiStaticMixin"); | ||
const ApiInitializerMixin_1 = require("../mixins/ApiInitializerMixin"); | ||
const ApiPropertyItem_1 = require("../items/ApiPropertyItem"); | ||
@@ -46,3 +47,3 @@ /** | ||
*/ | ||
class ApiProperty extends (0, ApiProtectedMixin_1.ApiProtectedMixin)((0, ApiStaticMixin_1.ApiStaticMixin)(ApiPropertyItem_1.ApiPropertyItem)) { | ||
class ApiProperty extends (0, ApiProtectedMixin_1.ApiProtectedMixin)((0, ApiStaticMixin_1.ApiStaticMixin)((0, ApiInitializerMixin_1.ApiInitializerMixin)(ApiPropertyItem_1.ApiPropertyItem))) { | ||
constructor(options) { | ||
@@ -49,0 +50,0 @@ super(options); |
@@ -7,2 +7,3 @@ import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference'; | ||
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin'; | ||
import { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin'; | ||
import { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt'; | ||
@@ -14,3 +15,3 @@ import { DeserializerContext } from './DeserializerContext'; | ||
*/ | ||
export interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions { | ||
export interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions { | ||
variableTypeTokenRange: IExcerptTokenRange; | ||
@@ -21,3 +22,3 @@ } | ||
} | ||
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin); | ||
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin); | ||
/** | ||
@@ -24,0 +25,0 @@ * Represents a TypeScript variable declaration. |
@@ -12,2 +12,3 @@ "use strict"; | ||
const ApiNameMixin_1 = require("../mixins/ApiNameMixin"); | ||
const ApiInitializerMixin_1 = require("../mixins/ApiInitializerMixin"); | ||
/** | ||
@@ -33,3 +34,3 @@ * Represents a TypeScript variable declaration. | ||
*/ | ||
class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReadonlyMixin_1.ApiReadonlyMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) { | ||
class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReadonlyMixin_1.ApiReadonlyMixin)((0, ApiInitializerMixin_1.ApiInitializerMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) { | ||
constructor(options) { | ||
@@ -36,0 +37,0 @@ super(options); |
@@ -52,2 +52,9 @@ import { TSDocConfiguration } from '@microsoft/tsdoc'; | ||
/** | ||
* Add an `initializerTokenRange` field to `ApiProperty` and `ApiVariable` to track the item's | ||
* initializer. | ||
* | ||
* When loading older JSON files, this range is empty. | ||
*/ | ||
V_1008 = 1008, | ||
/** | ||
* The current latest .api.json schema version. | ||
@@ -58,3 +65,3 @@ * | ||
*/ | ||
LATEST = 1007, | ||
LATEST = 1008, | ||
/** | ||
@@ -61,0 +68,0 @@ * The oldest .api.json schema version that is still supported for backwards compatibility. |
@@ -57,2 +57,9 @@ "use strict"; | ||
/** | ||
* Add an `initializerTokenRange` field to `ApiProperty` and `ApiVariable` to track the item's | ||
* initializer. | ||
* | ||
* When loading older JSON files, this range is empty. | ||
*/ | ||
ApiJsonSchemaVersion[ApiJsonSchemaVersion["V_1008"] = 1008] = "V_1008"; | ||
/** | ||
* The current latest .api.json schema version. | ||
@@ -63,3 +70,3 @@ * | ||
*/ | ||
ApiJsonSchemaVersion[ApiJsonSchemaVersion["LATEST"] = 1007] = "LATEST"; | ||
ApiJsonSchemaVersion[ApiJsonSchemaVersion["LATEST"] = 1008] = "LATEST"; | ||
/** | ||
@@ -66,0 +73,0 @@ * The oldest .api.json schema version that is still supported for backwards compatibility. |
{ | ||
"name": "@microsoft/api-extractor-model", | ||
"version": "7.19.1", | ||
"version": "7.20.0", | ||
"description": "A helper library for loading and saving the .api.json files created by API Extractor", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
690843
185
8931