@microsoft/api-extractor-model 7.17.1 → 7.18.0
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/rollup.d.ts +162 -12
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/items/ApiDocumentedItem.js +5 -1
- package/lib/items/ApiDocumentedItem.js.map +1 -1
- package/lib/items/ApiPropertyItem.d.ts +3 -2
- package/lib/items/ApiPropertyItem.d.ts.map +1 -1
- package/lib/items/ApiPropertyItem.js +2 -1
- package/lib/items/ApiPropertyItem.js.map +1 -1
- package/lib/mixins/ApiProtectedMixin.d.ts +60 -0
- package/lib/mixins/ApiProtectedMixin.d.ts.map +1 -0
- package/lib/mixins/ApiProtectedMixin.js +61 -0
- package/lib/mixins/ApiProtectedMixin.js.map +1 -0
- package/lib/mixins/ApiReadonlyMixin.d.ts +82 -0
- package/lib/mixins/ApiReadonlyMixin.d.ts.map +1 -0
- package/lib/mixins/ApiReadonlyMixin.js +62 -0
- package/lib/mixins/ApiReadonlyMixin.js.map +1 -0
- package/lib/model/ApiConstructor.d.ts +3 -2
- package/lib/model/ApiConstructor.d.ts.map +1 -1
- package/lib/model/ApiConstructor.js +2 -1
- package/lib/model/ApiConstructor.js.map +1 -1
- package/lib/model/ApiMethod.d.ts +3 -2
- package/lib/model/ApiMethod.d.ts.map +1 -1
- package/lib/model/ApiMethod.js +2 -1
- package/lib/model/ApiMethod.js.map +1 -1
- package/lib/model/ApiProperty.d.ts +3 -2
- package/lib/model/ApiProperty.d.ts.map +1 -1
- package/lib/model/ApiProperty.js +2 -1
- package/lib/model/ApiProperty.js.map +1 -1
- package/lib/model/ApiVariable.d.ts +3 -2
- package/lib/model/ApiVariable.d.ts.map +1 -1
- package/lib/model/ApiVariable.js +2 -1
- package/lib/model/ApiVariable.js.map +1 -1
- package/lib/model/DeserializerContext.d.ts +12 -2
- package/lib/model/DeserializerContext.d.ts.map +1 -1
- package/lib/model/DeserializerContext.js +12 -2
- package/lib/model/DeserializerContext.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';
|
|
2
|
+
/**
|
|
3
|
+
* Constructor options for {@link (ApiReadonlyMixin:interface)}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IApiReadonlyMixinOptions extends IApiItemOptions {
|
|
7
|
+
isReadonly: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IApiReadonlyMixinJson extends IApiItemJson {
|
|
10
|
+
isReadonly: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The mixin base class for API items that cannot be modified after instantiation.
|
|
14
|
+
* Examples such as the readonly modifier and only having a getter but no setter.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
19
|
+
* API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use
|
|
20
|
+
* TypeScript "mixin" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various
|
|
21
|
+
* features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class
|
|
22
|
+
* to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components:
|
|
23
|
+
* the function that generates a subclass, an interface that describes the members of the subclass, and
|
|
24
|
+
* a namespace containing static members of the class.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export interface ApiReadonlyMixin extends ApiItem {
|
|
29
|
+
/**
|
|
30
|
+
* Indicates that the API item's value cannot be assigned by an external consumer.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Examples of API items that would be considered "read only" by API Extractor:
|
|
34
|
+
*
|
|
35
|
+
* - A class or interface's property that has the `readonly` modifier.
|
|
36
|
+
*
|
|
37
|
+
* - A variable that has the `const` modifier.
|
|
38
|
+
*
|
|
39
|
+
* - A property or variable whose TSDoc comment includes the `@readonly` tag.
|
|
40
|
+
*
|
|
41
|
+
* - A property declaration with a getter but no setter.
|
|
42
|
+
*
|
|
43
|
+
* Note that if the `readonly` keyword appears in a type annotation, this does not
|
|
44
|
+
* guarantee that that the API item will be considered readonly. For example:
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* declare class C {
|
|
48
|
+
* // isReadonly=false in this case, because C.x is assignable
|
|
49
|
+
* public x: readonly string[];
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
readonly isReadonly: boolean;
|
|
54
|
+
serializeInto(jsonObject: Partial<IApiItemJson>): void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Mixin function for {@link (ApiReadonlyMixin:interface)}.
|
|
58
|
+
*
|
|
59
|
+
* @param baseClass - The base class to be extended
|
|
60
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiReadonlyMixin:interface)}
|
|
61
|
+
* functionality.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
export declare function ApiReadonlyMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiReadonlyMixin);
|
|
66
|
+
/**
|
|
67
|
+
* Static members for {@link (ApiReadonlyMixin:interface)}.
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare namespace ApiReadonlyMixin {
|
|
71
|
+
/**
|
|
72
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiReadonlyMixin` mixin.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
*
|
|
76
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
77
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
78
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
79
|
+
*/
|
|
80
|
+
function isBaseClassOf(apiItem: ApiItem): apiItem is ApiReadonlyMixin;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=ApiReadonlyMixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReadonlyMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiReadonlyMixin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/F;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAC/D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,UAAU,EAAE,OAAO,CAAC;CACrB;AAID;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,SAAS,mBAAmB,EACrE,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,gBAAgB,CAAC,CAoCzD;AAED;;;GAGG;AACH,yBAAiB,gBAAgB,CAAC;IAChC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB,CAE3E;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
|
+
// See LICENSE in the project root for license information.s
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ApiReadonlyMixin = void 0;
|
|
6
|
+
const _isReadonly = Symbol('ApiReadonlyMixin._isReadonly');
|
|
7
|
+
/**
|
|
8
|
+
* Mixin function for {@link (ApiReadonlyMixin:interface)}.
|
|
9
|
+
*
|
|
10
|
+
* @param baseClass - The base class to be extended
|
|
11
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiReadonlyMixin:interface)}
|
|
12
|
+
* functionality.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
function ApiReadonlyMixin(baseClass
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
) {
|
|
19
|
+
class MixedClass extends baseClass {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
constructor(...args) {
|
|
22
|
+
super(...args);
|
|
23
|
+
const options = args[0];
|
|
24
|
+
this[_isReadonly] = options.isReadonly;
|
|
25
|
+
}
|
|
26
|
+
/** @override */
|
|
27
|
+
static onDeserializeInto(options, context, jsonObject) {
|
|
28
|
+
baseClass.onDeserializeInto(options, context, jsonObject);
|
|
29
|
+
options.isReadonly = jsonObject.isReadonly || false;
|
|
30
|
+
}
|
|
31
|
+
get isReadonly() {
|
|
32
|
+
return this[_isReadonly];
|
|
33
|
+
}
|
|
34
|
+
/** @override */
|
|
35
|
+
serializeInto(jsonObject) {
|
|
36
|
+
super.serializeInto(jsonObject);
|
|
37
|
+
jsonObject.isReadonly = this.isReadonly;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return MixedClass;
|
|
41
|
+
}
|
|
42
|
+
exports.ApiReadonlyMixin = ApiReadonlyMixin;
|
|
43
|
+
/**
|
|
44
|
+
* Static members for {@link (ApiReadonlyMixin:interface)}.
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
(function (ApiReadonlyMixin) {
|
|
48
|
+
/**
|
|
49
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiReadonlyMixin` mixin.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
*
|
|
53
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
54
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
55
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
56
|
+
*/
|
|
57
|
+
function isBaseClassOf(apiItem) {
|
|
58
|
+
return apiItem.hasOwnProperty(_isReadonly);
|
|
59
|
+
}
|
|
60
|
+
ApiReadonlyMixin.isBaseClassOf = isBaseClassOf;
|
|
61
|
+
})(ApiReadonlyMixin = exports.ApiReadonlyMixin || (exports.ApiReadonlyMixin = {}));
|
|
62
|
+
//# sourceMappingURL=ApiReadonlyMixin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiReadonlyMixin.js","sourceRoot":"","sources":["../../src/mixins/ApiReadonlyMixin.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,4DAA4D;;;AAiB5D,MAAM,WAAW,GAAkB,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAiD1E;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAC9B,SAAqB;AACrB,8DAA8D;;IAE9D,MAAM,UAAW,SAAQ,SAAS;QAGhC,8DAA8D;QAC9D,YAAmB,GAAG,IAAW;YAC/B,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAEf,MAAM,OAAO,GAA6B,IAAI,CAAC,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QACzC,CAAC;QAED,gBAAgB;QACT,MAAM,CAAC,iBAAiB,CAC7B,OAA0C,EAC1C,OAA4B,EAC5B,UAAiC;YAEjC,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;YAE1D,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,IAAI,KAAK,CAAC;QACtD,CAAC;QAED,IAAW,UAAU;YACnB,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC;QAC3B,CAAC;QAED,gBAAgB;QACT,aAAa,CAAC,UAA0C;YAC7D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAEhC,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAC1C,CAAC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAvCD,4CAuCC;AAED;;;GAGG;AACH,WAAiB,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAgB;QAC5C,OAAO,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC7C,CAAC;IAFe,8BAAa,gBAE5B,CAAA;AACH,CAAC,EAbgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAahC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.s\n\nimport { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';\nimport { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link (ApiReadonlyMixin:interface)}.\n * @public\n */\nexport interface IApiReadonlyMixinOptions extends IApiItemOptions {\n isReadonly: boolean;\n}\n\nexport interface IApiReadonlyMixinJson extends IApiItemJson {\n isReadonly: boolean;\n}\n\nconst _isReadonly: unique symbol = Symbol('ApiReadonlyMixin._isReadonly');\n\n/**\n * The mixin base class for API items that cannot be modified after instantiation.\n * Examples such as the readonly modifier and only having a getter but no setter.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\n * TypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\n * features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\n * to extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\n * the function that generates a subclass, an interface that describes the members of the subclass, and\n * a namespace containing static members of the class.\n *\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface ApiReadonlyMixin extends ApiItem {\n /**\n * Indicates that the API item's value cannot be assigned by an external consumer.\n *\n * @remarks\n * Examples of API items that would be considered \"read only\" by API Extractor:\n *\n * - A class or interface's property that has the `readonly` modifier.\n *\n * - A variable that has the `const` modifier.\n *\n * - A property or variable whose TSDoc comment includes the `@readonly` tag.\n *\n * - A property declaration with a getter but no setter.\n *\n * Note that if the `readonly` keyword appears in a type annotation, this does not\n * guarantee that that the API item will be considered readonly. For example:\n *\n * ```ts\n * declare class C {\n * // isReadonly=false in this case, because C.x is assignable\n * public x: readonly string[];\n * }\n * ```\n */\n readonly isReadonly: boolean;\n\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiReadonlyMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiReadonlyMixin:interface)}\n * functionality.\n *\n * @public\n */\nexport function ApiReadonlyMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiReadonlyMixin) {\n class MixedClass extends baseClass implements ApiReadonlyMixin {\n public [_isReadonly]: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiReadonlyMixinOptions = args[0];\n this[_isReadonly] = options.isReadonly;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiReadonlyMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiReadonlyMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n options.isReadonly = jsonObject.isReadonly || false;\n }\n\n public get isReadonly(): boolean {\n return this[_isReadonly];\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiReadonlyMixinJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.isReadonly = this.isReadonly;\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiReadonlyMixin:interface)}.\n * @public\n */\nexport namespace ApiReadonlyMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiReadonlyMixin` mixin.\n *\n * @remarks\n *\n * The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of\n * the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however\n * the TypeScript type system cannot invoke a runtime test.)\n */\n export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiReadonlyMixin {\n return apiItem.hasOwnProperty(_isReadonly);\n }\n}\n"]}
|
|
@@ -2,14 +2,15 @@ import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/Declara
|
|
|
2
2
|
import { ApiItemKind } from '../items/ApiItem';
|
|
3
3
|
import { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
4
4
|
import { IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
5
|
+
import { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';
|
|
5
6
|
import { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';
|
|
6
7
|
/**
|
|
7
8
|
* Constructor options for {@link ApiConstructor}.
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
|
-
export interface IApiConstructorOptions extends IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
11
|
+
export interface IApiConstructorOptions extends IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
11
12
|
}
|
|
12
|
-
declare const ApiConstructor_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin);
|
|
13
|
+
declare const ApiConstructor_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiProtectedMixin) & (new (...args: any[]) => ApiParameterListMixin);
|
|
13
14
|
/**
|
|
14
15
|
* Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.
|
|
15
16
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiConstructor.d.ts","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAGrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE9F;;;GAGG;AACH,MAAM,WAAW,sBACf,SAAQ,6BAA6B,EACnC,0BAA0B,EAC1B,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,cAAe,SAAQ,
|
|
1
|
+
{"version":3,"file":"ApiConstructor.d.ts","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAGrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE9F;;;GAGG;AACH,MAAM,WAAW,sBACf,SAAQ,6BAA6B,EACnC,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,cAAe,SAAQ,mBAEnC;gBACoB,OAAO,EAAE,sBAAsB;WAIpC,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IAI5D,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
|
|
@@ -7,6 +7,7 @@ const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/Decla
|
|
|
7
7
|
const ApiItem_1 = require("../items/ApiItem");
|
|
8
8
|
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
9
9
|
const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
|
|
10
|
+
const ApiProtectedMixin_1 = require("../mixins/ApiProtectedMixin");
|
|
10
11
|
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
11
12
|
/**
|
|
12
13
|
* Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.
|
|
@@ -35,7 +36,7 @@ const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
|
35
36
|
*
|
|
36
37
|
* @public
|
|
37
38
|
*/
|
|
38
|
-
class ApiConstructor extends (0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem)) {
|
|
39
|
+
class ApiConstructor extends (0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiProtectedMixin_1.ApiProtectedMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
|
|
39
40
|
constructor(options) {
|
|
40
41
|
super(options);
|
|
41
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiConstructor.js","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAIiE;AACjE,8CAA+C;AAC/C,8DAAoF;AACpF,2EAAuG;AACvG,qEAA8F;
|
|
1
|
+
{"version":3,"file":"ApiConstructor.js","sourceRoot":"","sources":["../../src/model/ApiConstructor.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAIiE;AACjE,8CAA+C;AAC/C,8DAAoF;AACpF,2EAAuG;AACvG,mEAA2F;AAC3F,qEAA8F;AAY9F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,cAAe,SAAQ,IAAA,6CAAqB,EACvD,IAAA,qCAAiB,EAAC,IAAA,uCAAkB,EAAC,iCAAe,CAAC,CAAC,CACvD;IACC,YAAmB,OAA+B;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,aAAqB;QACjD,OAAO,IAAI,qBAAW,CAAC,WAAW,IAAI,aAAa,EAAE,CAAC;IACxD,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,WAAW,CAAC;IACjC,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,MAAM,GAAyB,IAAI,CAAC,MAAM;YAC9C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YAChC,CAAC,CAAC,iDAAiD;gBACjD,2CAAoB,CAAC,KAAK,EAAE,CAAC,iBAAiB,oBAAqB,UAAU,CAAC,CAAC;QACnF,OAAO,MAAM,CAAC,WAAW,iCAAqB,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACvF,CAAC;CACF;AA7BD,wCA6BC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\n\n/**\n * Constructor options for {@link ApiConstructor}.\n * @public\n */\nexport interface IApiConstructorOptions\n extends IApiParameterListMixinOptions,\n IApiProtectedMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiConstructor` represents a declaration using the `constructor` keyword such as in this example:\n *\n * ```ts\n * export class Vector {\n * public x: number;\n * public y: number;\n *\n * // A class constructor:\n * public constructor(x: number, y: number) {\n * this.x = x;\n * this.y = y;\n * }\n * }\n * ```\n *\n * Compare with {@link ApiConstructSignature}, which describes the construct signature for a class constructor.\n *\n * @public\n */\nexport class ApiConstructor extends ApiParameterListMixin(\n ApiProtectedMixin(ApiReleaseTagMixin(ApiDeclaredItem))\n) {\n public constructor(options: IApiConstructorOptions) {\n super(options);\n }\n\n public static getContainerKey(overloadIndex: number): string {\n return `|${ApiItemKind.Constructor}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Constructor;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiConstructor.getContainerKey(this.overloadIndex);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const parent: DeclarationReference = this.parent\n ? this.parent.canonicalReference\n : // .withMeaning() requires some kind of component\n DeclarationReference.empty().addNavigationStep(Navigation.Members, '(parent)');\n return parent.withMeaning(Meaning.Constructor).withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
|
package/lib/model/ApiMethod.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
2
2
|
import { ApiItemKind } from '../items/ApiItem';
|
|
3
|
+
import { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';
|
|
3
4
|
import { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';
|
|
4
5
|
import { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
5
6
|
import { IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';
|
|
@@ -12,9 +13,9 @@ import { ApiOptionalMixin, IApiOptionalMixinOptions } from '../mixins/ApiOptiona
|
|
|
12
13
|
* Constructor options for {@link ApiMethod}.
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
|
-
export interface IApiMethodOptions extends IApiNameMixinOptions,
|
|
16
|
+
export interface IApiMethodOptions extends IApiNameMixinOptions, IApiOptionalMixinOptions, IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiStaticMixinOptions, IApiTypeParameterListMixinOptions, IApiDeclaredItemOptions {
|
|
16
17
|
}
|
|
17
|
-
declare const ApiMethod_base: typeof ApiDeclaredItem & (new (...args: any[]) =>
|
|
18
|
+
declare const ApiMethod_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiStaticMixin) & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiProtectedMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiOptionalMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
18
19
|
/**
|
|
19
20
|
* Represents a TypeScript member function declaration that belongs to an `ApiClass`.
|
|
20
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiMethod.d.ts","sourceRoot":"","sources":["../../src/model/ApiMethod.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,
|
|
1
|
+
{"version":3,"file":"ApiMethod.d.ts","sourceRoot":"","sources":["../../src/model/ApiMethod.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,iBACf,SAAQ,oBAAoB,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,iCAAiC,EACjC,uBAAuB;CAAG;;AAE9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,SAAU,SAAQ,cAQ9B;gBACoB,OAAO,EAAE,iBAAiB;WAI/B,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM;IAQ7F,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
|
package/lib/model/ApiMethod.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.ApiMethod = void 0;
|
|
6
6
|
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
|
|
7
7
|
const ApiItem_1 = require("../items/ApiItem");
|
|
8
|
+
const ApiProtectedMixin_1 = require("../mixins/ApiProtectedMixin");
|
|
8
9
|
const ApiStaticMixin_1 = require("../mixins/ApiStaticMixin");
|
|
9
10
|
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
10
11
|
const ApiParameterListMixin_1 = require("../mixins/ApiParameterListMixin");
|
|
@@ -34,7 +35,7 @@ const ApiOptionalMixin_1 = require("../mixins/ApiOptionalMixin");
|
|
|
34
35
|
*
|
|
35
36
|
* @public
|
|
36
37
|
*/
|
|
37
|
-
class ApiMethod extends (0, ApiNameMixin_1.ApiNameMixin)((0,
|
|
38
|
+
class ApiMethod extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiOptionalMixin_1.ApiOptionalMixin)((0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiProtectedMixin_1.ApiProtectedMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReturnTypeMixin_1.ApiReturnTypeMixin)((0, ApiStaticMixin_1.ApiStaticMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))))))) {
|
|
38
39
|
constructor(options) {
|
|
39
40
|
super(options);
|
|
40
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiMethod.js","sourceRoot":"","sources":["../../src/model/ApiMethod.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,6DAAkF;AAClF,8DAAoF;AACpF,2EAAuG;AACvG,qEAA8F;AAC9F,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAG6C;AAC7C,iEAAwF;
|
|
1
|
+
{"version":3,"file":"ApiMethod.js","sourceRoot":"","sources":["../../src/model/ApiMethod.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,mEAA2F;AAC3F,6DAAkF;AAClF,8DAAoF;AACpF,2EAAuG;AACvG,qEAA8F;AAC9F,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAG6C;AAC7C,iEAAwF;AAiBxF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,SAAU,SAAQ,IAAA,2BAAY,EACzC,IAAA,mCAAgB,EACd,IAAA,6CAAqB,EACnB,IAAA,qCAAiB,EACf,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,IAAA,+BAAc,EAAC,IAAA,qDAAyB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CACnG,CACF,CACF,CACF;IACC,YAAmB,OAA0B;QAC3C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,QAAiB,EAAE,aAAqB;QAClF,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,MAAM,WAAW,aAAa,EAAE,CAAC;SAChE;aAAM;YACL,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,MAAM,aAAa,aAAa,EAAE,CAAC;SAClE;IACH,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,MAAM,CAAC;IAC5B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACjF,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,mBAAoB,CAAC,kBAAmB,EAAE,aAAa,CAAC;aACzF,WAAW,uBAAgB;aAC3B,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;CACF;AAvCD,8BAuCC","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 Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\nimport { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { IApiParameterListMixinOptions, ApiParameterListMixin } from '../mixins/ApiParameterListMixin';\nimport { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\nimport { ApiReturnTypeMixin, IApiReturnTypeMixinOptions } from '../mixins/ApiReturnTypeMixin';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n ApiTypeParameterListMixin,\n IApiTypeParameterListMixinOptions\n} from '../mixins/ApiTypeParameterListMixin';\nimport { ApiOptionalMixin, IApiOptionalMixinOptions } from '../mixins/ApiOptionalMixin';\n\n/**\n * Constructor options for {@link ApiMethod}.\n * @public\n */\nexport interface IApiMethodOptions\n extends IApiNameMixinOptions,\n IApiOptionalMixinOptions,\n IApiParameterListMixinOptions,\n IApiProtectedMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiStaticMixinOptions,\n IApiTypeParameterListMixinOptions,\n IApiDeclaredItemOptions {}\n\n/**\n * Represents a TypeScript member function 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 * `ApiMethod` represents a TypeScript declaration such as the `render` member function in this example:\n *\n * ```ts\n * export class Widget {\n * public render(): void { }\n * }\n * ```\n *\n * Compare with {@link ApiMethodSignature}, which represents a method belonging to an interface.\n * For example, a class method can be `static` but an interface method cannot.\n *\n * @public\n */\nexport class ApiMethod extends ApiNameMixin(\n ApiOptionalMixin(\n ApiParameterListMixin(\n ApiProtectedMixin(\n ApiReleaseTagMixin(ApiReturnTypeMixin(ApiStaticMixin(ApiTypeParameterListMixin(ApiDeclaredItem))))\n )\n )\n )\n) {\n public constructor(options: IApiMethodOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, isStatic: boolean, overloadIndex: number): string {\n if (isStatic) {\n return `${name}|${ApiItemKind.Method}|static|${overloadIndex}`;\n } else {\n return `${name}|${ApiItemKind.Method}|instance|${overloadIndex}`;\n }\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Method;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiMethod.getContainerKey(this.name, this.isStatic, this.overloadIndex);\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 .withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';
|
|
2
2
|
import { ApiItemKind } from '../items/ApiItem';
|
|
3
|
+
import { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';
|
|
3
4
|
import { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';
|
|
4
5
|
import { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';
|
|
5
6
|
/**
|
|
6
7
|
* Constructor options for {@link ApiProperty}.
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
|
-
export interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiStaticMixinOptions {
|
|
10
|
+
export interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions {
|
|
10
11
|
}
|
|
11
|
-
declare const ApiProperty_base: typeof ApiPropertyItem & (new (...args: any[]) => ApiStaticMixin);
|
|
12
|
+
declare const ApiProperty_base: typeof ApiPropertyItem & (new (...args: any[]) => ApiStaticMixin) & (new (...args: any[]) => ApiProtectedMixin);
|
|
12
13
|
/**
|
|
13
14
|
* Represents a TypeScript property declaration that belongs to an `ApiClass`.
|
|
14
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiProperty.d.ts","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ApiProperty.d.ts","sourceRoot":"","sources":["../../src/model/ApiProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,uBAAuB,EAC7B,yBAAyB,EACzB,sBAAsB;CAAG;;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,WAAY,SAAQ,gBAAkD;gBAC9D,OAAO,EAAE,mBAAmB;WAIjC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM;IAQtE,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
|
package/lib/model/ApiProperty.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.ApiProperty = void 0;
|
|
6
6
|
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
|
|
7
7
|
const ApiItem_1 = require("../items/ApiItem");
|
|
8
|
+
const ApiProtectedMixin_1 = require("../mixins/ApiProtectedMixin");
|
|
8
9
|
const ApiStaticMixin_1 = require("../mixins/ApiStaticMixin");
|
|
9
10
|
const ApiPropertyItem_1 = require("../items/ApiPropertyItem");
|
|
10
11
|
/**
|
|
@@ -41,7 +42,7 @@ const ApiPropertyItem_1 = require("../items/ApiPropertyItem");
|
|
|
41
42
|
*
|
|
42
43
|
* @public
|
|
43
44
|
*/
|
|
44
|
-
class ApiProperty extends (0, ApiStaticMixin_1.ApiStaticMixin)(ApiPropertyItem_1.ApiPropertyItem) {
|
|
45
|
+
class ApiProperty extends (0, ApiProtectedMixin_1.ApiProtectedMixin)((0, ApiStaticMixin_1.ApiStaticMixin)(ApiPropertyItem_1.ApiPropertyItem)) {
|
|
45
46
|
constructor(options) {
|
|
46
47
|
super(options);
|
|
47
48
|
}
|
|
@@ -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,6DAAkF;AAClF,8DAAoF;
|
|
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,mEAA2F;AAC3F,6DAAkF;AAClF,8DAAoF;AAWpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,WAAY,SAAQ,IAAA,qCAAiB,EAAC,IAAA,+BAAc,EAAC,iCAAe,CAAC,CAAC;IACjF,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,mBAAoB,CAAC,kBAAmB,EAAE,aAAa,CAAC;aACzF,WAAW,uBAAgB,CAAC;IACjC,CAAC;CACF;AA9BD,kCA8BC","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 Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiProtectedMixin, IApiProtectedMixinOptions } from '../mixins/ApiProtectedMixin';\nimport { ApiStaticMixin, IApiStaticMixinOptions } from '../mixins/ApiStaticMixin';\nimport { ApiPropertyItem, IApiPropertyItemOptions } from '../items/ApiPropertyItem';\n\n/**\n * Constructor options for {@link ApiProperty}.\n * @public\n */\nexport interface IApiPropertyOptions\n extends IApiPropertyItemOptions,\n IApiProtectedMixinOptions,\n IApiStaticMixinOptions {}\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 ApiProtectedMixin(ApiStaticMixin(ApiPropertyItem)) {\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"]}
|
|
@@ -2,6 +2,7 @@ import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/Declara
|
|
|
2
2
|
import { ApiItemKind } from '../items/ApiItem';
|
|
3
3
|
import { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';
|
|
4
4
|
import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
|
|
5
|
+
import { ApiReadonlyMixin, IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';
|
|
5
6
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
6
7
|
import { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';
|
|
7
8
|
import { DeserializerContext } from './DeserializerContext';
|
|
@@ -9,13 +10,13 @@ import { DeserializerContext } from './DeserializerContext';
|
|
|
9
10
|
* Constructor options for {@link ApiVariable}.
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
|
-
export interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
13
|
+
export interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions {
|
|
13
14
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
14
15
|
}
|
|
15
16
|
export interface IApiVariableJson extends IApiDeclaredItemJson {
|
|
16
17
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
17
18
|
}
|
|
18
|
-
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
19
|
+
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
19
20
|
/**
|
|
20
21
|
* Represents a TypeScript variable declaration.
|
|
21
22
|
*
|
|
@@ -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,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,uBAAuB;IACzB,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,WAAY,SAAQ,
|
|
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,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,mBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB;IACzB,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,WAAY,SAAQ,gBAAmE;IAClG;;OAEG;IACH,SAAgB,mBAAmB,EAAE,OAAO,CAAC;gBAE1B,OAAO,EAAE,mBAAmB;IAM/C,gBAAgB;WACF,iBAAiB,CAC7B,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,EACrC,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,gBAAgB,GAC3B,IAAI;WAMO,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI;IAMjE,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAMvD"}
|
package/lib/model/ApiVariable.js
CHANGED
|
@@ -7,6 +7,7 @@ const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/Decla
|
|
|
7
7
|
const ApiItem_1 = require("../items/ApiItem");
|
|
8
8
|
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
9
9
|
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
10
|
+
const ApiReadonlyMixin_1 = require("../mixins/ApiReadonlyMixin");
|
|
10
11
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
11
12
|
/**
|
|
12
13
|
* Represents a TypeScript variable declaration.
|
|
@@ -28,7 +29,7 @@ const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
|
28
29
|
*
|
|
29
30
|
* @public
|
|
30
31
|
*/
|
|
31
|
-
class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem)) {
|
|
32
|
+
class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReadonlyMixin_1.ApiReadonlyMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
|
|
32
33
|
constructor(options) {
|
|
33
34
|
super(options);
|
|
34
35
|
this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);
|
|
@@ -1 +1 @@
|
|
|
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,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;
|
|
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,8DAA0G;AAC1G,qEAA8F;AAC9F,iEAAwF;AACxF,yDAA4E;AAoB5E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,WAAY,SAAQ,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC;IAMlG,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,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,oBAAqB,aAAa,CAAC;aACpD,WAAW,sBAAkB,CAAC;IACnC,CAAC;CACF;AAnDD,kCAmDC","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 Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiReadonlyMixin, IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\nimport { DeserializerContext } from './DeserializerContext';\n\n/**\n * Constructor options for {@link ApiVariable}.\n * @public\n */\nexport interface IApiVariableOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiVariableJson extends IApiDeclaredItemJson {\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(ApiReleaseTagMixin(ApiReadonlyMixin(ApiDeclaredItem))) {\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 return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(Navigation.Exports, nameComponent)\n .withMeaning(Meaning.Variable);\n }\n}\n"]}
|
|
@@ -27,18 +27,28 @@ export declare enum ApiJsonSchemaVersion {
|
|
|
27
27
|
*/
|
|
28
28
|
V_1004 = 1004,
|
|
29
29
|
/**
|
|
30
|
-
* Add an `isOptional` field to `
|
|
30
|
+
* Add an `isOptional` field to `Parameter` and `TypeParameter` to track whether a function parameter is optional.
|
|
31
31
|
*
|
|
32
32
|
* When loading older JSON files, the value defaults to `false`.
|
|
33
33
|
*/
|
|
34
34
|
V_1005 = 1005,
|
|
35
|
+
/**
|
|
36
|
+
* Add an `isProtected` field to `ApiConstructor`, `ApiMethod`, and `ApiProperty` to
|
|
37
|
+
* track whether a class member has the `protected` modifier.
|
|
38
|
+
*
|
|
39
|
+
* Add an `isReadonly` field to `ApiProperty`, `ApiPropertySignature`, and `ApiVariable` to
|
|
40
|
+
* track whether the item is readonly.
|
|
41
|
+
*
|
|
42
|
+
* When loading older JSON files, the values default to `false`.
|
|
43
|
+
*/
|
|
44
|
+
V_1006 = 1006,
|
|
35
45
|
/**
|
|
36
46
|
* The current latest .api.json schema version.
|
|
37
47
|
*
|
|
38
48
|
* IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`
|
|
39
49
|
* should be updated.
|
|
40
50
|
*/
|
|
41
|
-
LATEST =
|
|
51
|
+
LATEST = 1006,
|
|
42
52
|
/**
|
|
43
53
|
* The oldest .api.json schema version that is still supported for backwards compatibility.
|
|
44
54
|
*
|
|
@@ -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;AAEtD,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;;;;;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
|
+
{"version":3,"file":"DeserializerContext.d.ts","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,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;;;;;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"}
|
|
@@ -32,18 +32,28 @@ var ApiJsonSchemaVersion;
|
|
|
32
32
|
*/
|
|
33
33
|
ApiJsonSchemaVersion[ApiJsonSchemaVersion["V_1004"] = 1004] = "V_1004";
|
|
34
34
|
/**
|
|
35
|
-
* Add an `isOptional` field to `
|
|
35
|
+
* Add an `isOptional` field to `Parameter` and `TypeParameter` to track whether a function parameter is optional.
|
|
36
36
|
*
|
|
37
37
|
* When loading older JSON files, the value defaults to `false`.
|
|
38
38
|
*/
|
|
39
39
|
ApiJsonSchemaVersion[ApiJsonSchemaVersion["V_1005"] = 1005] = "V_1005";
|
|
40
|
+
/**
|
|
41
|
+
* Add an `isProtected` field to `ApiConstructor`, `ApiMethod`, and `ApiProperty` to
|
|
42
|
+
* track whether a class member has the `protected` modifier.
|
|
43
|
+
*
|
|
44
|
+
* Add an `isReadonly` field to `ApiProperty`, `ApiPropertySignature`, and `ApiVariable` to
|
|
45
|
+
* track whether the item is readonly.
|
|
46
|
+
*
|
|
47
|
+
* When loading older JSON files, the values default to `false`.
|
|
48
|
+
*/
|
|
49
|
+
ApiJsonSchemaVersion[ApiJsonSchemaVersion["V_1006"] = 1006] = "V_1006";
|
|
40
50
|
/**
|
|
41
51
|
* The current latest .api.json schema version.
|
|
42
52
|
*
|
|
43
53
|
* IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`
|
|
44
54
|
* should be updated.
|
|
45
55
|
*/
|
|
46
|
-
ApiJsonSchemaVersion[ApiJsonSchemaVersion["LATEST"] =
|
|
56
|
+
ApiJsonSchemaVersion[ApiJsonSchemaVersion["LATEST"] = 1006] = "LATEST";
|
|
47
57
|
/**
|
|
48
58
|
* The oldest .api.json schema version that is still supported for backwards compatibility.
|
|
49
59
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeserializerContext.js","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,IAAY,
|
|
1
|
+
{"version":3,"file":"DeserializerContext.js","sourceRoot":"","sources":["../../src/model/DeserializerContext.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAI3D,IAAY,oBA0EX;AA1ED,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;;;;;OAKG;IACH,sEAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAyB,CAAA;IAEzB;;;;;;OAMG;IACH,8GAAmC,CAAA;AACrC,CAAC,EA1EW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QA0E/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 * 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_1006,\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/api-extractor-model",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.18.0",
|
|
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,12 +14,12 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@microsoft/tsdoc": "0.14.1",
|
|
16
16
|
"@microsoft/tsdoc-config": "~0.16.1",
|
|
17
|
-
"@rushstack/node-core-library": "3.45.
|
|
17
|
+
"@rushstack/node-core-library": "3.45.5"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@rushstack/eslint-config": "2.
|
|
21
|
-
"@rushstack/heft": "0.
|
|
22
|
-
"@rushstack/heft-node-rig": "1.
|
|
20
|
+
"@rushstack/eslint-config": "2.6.0",
|
|
21
|
+
"@rushstack/heft": "0.45.1",
|
|
22
|
+
"@rushstack/heft-node-rig": "1.9.2",
|
|
23
23
|
"@types/heft-jest": "1.0.1",
|
|
24
24
|
"@types/node": "12.20.24"
|
|
25
25
|
},
|