@microsoft/api-extractor-model 7.17.3 → 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/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/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 +1 -1
package/dist/rollup.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ export declare class ApiConstructor extends ApiConstructor_base {
|
|
|
148
148
|
buildCanonicalReference(): DeclarationReference;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
declare const ApiConstructor_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin);
|
|
151
|
+
declare const ApiConstructor_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiProtectedMixin) & (new (...args: any[]) => ApiParameterListMixin);
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Represents a TypeScript construct signature that belongs to an `ApiInterface`.
|
|
@@ -753,18 +753,28 @@ declare enum ApiJsonSchemaVersion {
|
|
|
753
753
|
*/
|
|
754
754
|
V_1004 = 1004,
|
|
755
755
|
/**
|
|
756
|
-
* Add an `isOptional` field to `
|
|
756
|
+
* Add an `isOptional` field to `Parameter` and `TypeParameter` to track whether a function parameter is optional.
|
|
757
757
|
*
|
|
758
758
|
* When loading older JSON files, the value defaults to `false`.
|
|
759
759
|
*/
|
|
760
760
|
V_1005 = 1005,
|
|
761
|
+
/**
|
|
762
|
+
* Add an `isProtected` field to `ApiConstructor`, `ApiMethod`, and `ApiProperty` to
|
|
763
|
+
* track whether a class member has the `protected` modifier.
|
|
764
|
+
*
|
|
765
|
+
* Add an `isReadonly` field to `ApiProperty`, `ApiPropertySignature`, and `ApiVariable` to
|
|
766
|
+
* track whether the item is readonly.
|
|
767
|
+
*
|
|
768
|
+
* When loading older JSON files, the values default to `false`.
|
|
769
|
+
*/
|
|
770
|
+
V_1006 = 1006,
|
|
761
771
|
/**
|
|
762
772
|
* The current latest .api.json schema version.
|
|
763
773
|
*
|
|
764
774
|
* IMPORTANT: When incrementing this number, consider whether `OLDEST_SUPPORTED` or `OLDEST_FORWARDS_COMPATIBLE`
|
|
765
775
|
* should be updated.
|
|
766
776
|
*/
|
|
767
|
-
LATEST =
|
|
777
|
+
LATEST = 1006,
|
|
768
778
|
/**
|
|
769
779
|
* The oldest .api.json schema version that is still supported for backwards compatibility.
|
|
770
780
|
*
|
|
@@ -814,7 +824,7 @@ export declare class ApiMethod extends ApiMethod_base {
|
|
|
814
824
|
buildCanonicalReference(): DeclarationReference;
|
|
815
825
|
}
|
|
816
826
|
|
|
817
|
-
declare const ApiMethod_base: typeof ApiDeclaredItem & (new (...args: any[]) =>
|
|
827
|
+
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);
|
|
818
828
|
|
|
819
829
|
/**
|
|
820
830
|
* Represents a TypeScript member function declaration that belongs to an `ApiInterface`.
|
|
@@ -1232,7 +1242,7 @@ export declare class ApiProperty extends ApiProperty_base {
|
|
|
1232
1242
|
buildCanonicalReference(): DeclarationReference;
|
|
1233
1243
|
}
|
|
1234
1244
|
|
|
1235
|
-
declare const ApiProperty_base: typeof ApiPropertyItem & (new (...args: any[]) => ApiStaticMixin);
|
|
1245
|
+
declare const ApiProperty_base: typeof ApiPropertyItem & (new (...args: any[]) => ApiStaticMixin) & (new (...args: any[]) => ApiProtectedMixin);
|
|
1236
1246
|
|
|
1237
1247
|
/**
|
|
1238
1248
|
* The abstract base class for {@link ApiProperty} and {@link ApiPropertySignature}.
|
|
@@ -1262,7 +1272,7 @@ export declare class ApiPropertyItem extends ApiPropertyItem_base {
|
|
|
1262
1272
|
serializeInto(jsonObject: Partial<IApiPropertyItemJson>): void;
|
|
1263
1273
|
}
|
|
1264
1274
|
|
|
1265
|
-
declare const ApiPropertyItem_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiOptionalMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
1275
|
+
declare const ApiPropertyItem_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiOptionalMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
1266
1276
|
|
|
1267
1277
|
/**
|
|
1268
1278
|
* Represents a TypeScript property declaration that belongs to an `ApiInterface`.
|
|
@@ -1297,6 +1307,130 @@ export declare class ApiPropertySignature extends ApiPropertyItem {
|
|
|
1297
1307
|
buildCanonicalReference(): DeclarationReference;
|
|
1298
1308
|
}
|
|
1299
1309
|
|
|
1310
|
+
/**
|
|
1311
|
+
* Mixin function for {@link (ApiProtectedMixin:interface)}.
|
|
1312
|
+
*
|
|
1313
|
+
* @param baseClass - The base class to be extended
|
|
1314
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiProtectedMixin:interface)} functionality.
|
|
1315
|
+
*
|
|
1316
|
+
* @public
|
|
1317
|
+
*/
|
|
1318
|
+
export declare function ApiProtectedMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiProtectedMixin);
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* The mixin base class for API items that can have the TypeScript `protected` keyword applied to them.
|
|
1322
|
+
*
|
|
1323
|
+
* @remarks
|
|
1324
|
+
*
|
|
1325
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
1326
|
+
* API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use
|
|
1327
|
+
* TypeScript "mixin" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various
|
|
1328
|
+
* features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class
|
|
1329
|
+
* to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components:
|
|
1330
|
+
* the function that generates a subclass, an interface that describes the members of the subclass, and
|
|
1331
|
+
* a namespace containing static members of the class.
|
|
1332
|
+
*
|
|
1333
|
+
* @public
|
|
1334
|
+
*/
|
|
1335
|
+
export declare interface ApiProtectedMixin extends ApiItem {
|
|
1336
|
+
/**
|
|
1337
|
+
* Whether the declaration has the TypeScript `protected` keyword.
|
|
1338
|
+
*/
|
|
1339
|
+
readonly isProtected: boolean;
|
|
1340
|
+
/** @override */
|
|
1341
|
+
serializeInto(jsonObject: Partial<IApiItemJson>): void;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Static members for {@link (ApiProtectedMixin:interface)}.
|
|
1346
|
+
* @public
|
|
1347
|
+
*/
|
|
1348
|
+
export declare namespace ApiProtectedMixin {
|
|
1349
|
+
/**
|
|
1350
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiProtectedMixin` mixin.
|
|
1351
|
+
*
|
|
1352
|
+
* @remarks
|
|
1353
|
+
*
|
|
1354
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
1355
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
1356
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
1357
|
+
*/
|
|
1358
|
+
export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiProtectedMixin;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* Mixin function for {@link (ApiReadonlyMixin:interface)}.
|
|
1363
|
+
*
|
|
1364
|
+
* @param baseClass - The base class to be extended
|
|
1365
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiReadonlyMixin:interface)}
|
|
1366
|
+
* functionality.
|
|
1367
|
+
*
|
|
1368
|
+
* @public
|
|
1369
|
+
*/
|
|
1370
|
+
export declare function ApiReadonlyMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiReadonlyMixin);
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* The mixin base class for API items that cannot be modified after instantiation.
|
|
1374
|
+
* Examples such as the readonly modifier and only having a getter but no setter.
|
|
1375
|
+
*
|
|
1376
|
+
* @remarks
|
|
1377
|
+
*
|
|
1378
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
1379
|
+
* API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use
|
|
1380
|
+
* TypeScript "mixin" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various
|
|
1381
|
+
* features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class
|
|
1382
|
+
* to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components:
|
|
1383
|
+
* the function that generates a subclass, an interface that describes the members of the subclass, and
|
|
1384
|
+
* a namespace containing static members of the class.
|
|
1385
|
+
*
|
|
1386
|
+
* @public
|
|
1387
|
+
*/
|
|
1388
|
+
export declare interface ApiReadonlyMixin extends ApiItem {
|
|
1389
|
+
/**
|
|
1390
|
+
* Indicates that the API item's value cannot be assigned by an external consumer.
|
|
1391
|
+
*
|
|
1392
|
+
* @remarks
|
|
1393
|
+
* Examples of API items that would be considered "read only" by API Extractor:
|
|
1394
|
+
*
|
|
1395
|
+
* - A class or interface's property that has the `readonly` modifier.
|
|
1396
|
+
*
|
|
1397
|
+
* - A variable that has the `const` modifier.
|
|
1398
|
+
*
|
|
1399
|
+
* - A property or variable whose TSDoc comment includes the `@readonly` tag.
|
|
1400
|
+
*
|
|
1401
|
+
* - A property declaration with a getter but no setter.
|
|
1402
|
+
*
|
|
1403
|
+
* Note that if the `readonly` keyword appears in a type annotation, this does not
|
|
1404
|
+
* guarantee that that the API item will be considered readonly. For example:
|
|
1405
|
+
*
|
|
1406
|
+
* ```ts
|
|
1407
|
+
* declare class C {
|
|
1408
|
+
* // isReadonly=false in this case, because C.x is assignable
|
|
1409
|
+
* public x: readonly string[];
|
|
1410
|
+
* }
|
|
1411
|
+
* ```
|
|
1412
|
+
*/
|
|
1413
|
+
readonly isReadonly: boolean;
|
|
1414
|
+
serializeInto(jsonObject: Partial<IApiItemJson>): void;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Static members for {@link (ApiReadonlyMixin:interface)}.
|
|
1419
|
+
* @public
|
|
1420
|
+
*/
|
|
1421
|
+
export declare namespace ApiReadonlyMixin {
|
|
1422
|
+
/**
|
|
1423
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiReadonlyMixin` mixin.
|
|
1424
|
+
*
|
|
1425
|
+
* @remarks
|
|
1426
|
+
*
|
|
1427
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
1428
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
1429
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
1430
|
+
*/
|
|
1431
|
+
export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiReadonlyMixin;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1300
1434
|
/**
|
|
1301
1435
|
* Mixin function for {@link (ApiReleaseTagMixin:interface)}.
|
|
1302
1436
|
*
|
|
@@ -1600,7 +1734,7 @@ export declare class ApiVariable extends ApiVariable_base {
|
|
|
1600
1734
|
buildCanonicalReference(): DeclarationReference;
|
|
1601
1735
|
}
|
|
1602
1736
|
|
|
1603
|
-
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
1737
|
+
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
1604
1738
|
|
|
1605
1739
|
/**
|
|
1606
1740
|
* This abstraction is used by the mixin pattern.
|
|
@@ -1781,7 +1915,7 @@ export declare interface IApiClassOptions extends IApiItemContainerMixinOptions,
|
|
|
1781
1915
|
* Constructor options for {@link ApiConstructor}.
|
|
1782
1916
|
* @public
|
|
1783
1917
|
*/
|
|
1784
|
-
export declare interface IApiConstructorOptions extends IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
1918
|
+
export declare interface IApiConstructorOptions extends IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
1785
1919
|
}
|
|
1786
1920
|
|
|
1787
1921
|
/**
|
|
@@ -1904,7 +2038,7 @@ export declare interface IApiItemOptions {
|
|
|
1904
2038
|
* Constructor options for {@link ApiMethod}.
|
|
1905
2039
|
* @public
|
|
1906
2040
|
*/
|
|
1907
|
-
export declare interface IApiMethodOptions extends IApiNameMixinOptions,
|
|
2041
|
+
export declare interface IApiMethodOptions extends IApiNameMixinOptions, IApiOptionalMixinOptions, IApiParameterListMixinOptions, IApiProtectedMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiStaticMixinOptions, IApiTypeParameterListMixinOptions, IApiDeclaredItemOptions {
|
|
1908
2042
|
}
|
|
1909
2043
|
|
|
1910
2044
|
/** @public */
|
|
@@ -1998,7 +2132,7 @@ declare interface IApiPropertyItemJson extends IApiDeclaredItemJson {
|
|
|
1998
2132
|
* Constructor options for {@link ApiPropertyItem}.
|
|
1999
2133
|
* @public
|
|
2000
2134
|
*/
|
|
2001
|
-
export declare interface IApiPropertyItemOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiOptionalMixinOptions, IApiDeclaredItemOptions {
|
|
2135
|
+
export declare interface IApiPropertyItemOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiOptionalMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions {
|
|
2002
2136
|
propertyTypeTokenRange: IExcerptTokenRange;
|
|
2003
2137
|
}
|
|
2004
2138
|
|
|
@@ -2006,7 +2140,7 @@ export declare interface IApiPropertyItemOptions extends IApiNameMixinOptions, I
|
|
|
2006
2140
|
* Constructor options for {@link ApiProperty}.
|
|
2007
2141
|
* @public
|
|
2008
2142
|
*/
|
|
2009
|
-
export declare interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiStaticMixinOptions {
|
|
2143
|
+
export declare interface IApiPropertyOptions extends IApiPropertyItemOptions, IApiProtectedMixinOptions, IApiStaticMixinOptions {
|
|
2010
2144
|
}
|
|
2011
2145
|
|
|
2012
2146
|
/**
|
|
@@ -2016,6 +2150,22 @@ export declare interface IApiPropertyOptions extends IApiPropertyItemOptions, IA
|
|
|
2016
2150
|
export declare interface IApiPropertySignatureOptions extends IApiPropertyItemOptions {
|
|
2017
2151
|
}
|
|
2018
2152
|
|
|
2153
|
+
/**
|
|
2154
|
+
* Constructor options for {@link (IApiProtectedMixinOptions:interface)}.
|
|
2155
|
+
* @public
|
|
2156
|
+
*/
|
|
2157
|
+
export declare interface IApiProtectedMixinOptions extends IApiItemOptions {
|
|
2158
|
+
isProtected: boolean;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* Constructor options for {@link (ApiReadonlyMixin:interface)}.
|
|
2163
|
+
* @public
|
|
2164
|
+
*/
|
|
2165
|
+
export declare interface IApiReadonlyMixinOptions extends IApiItemOptions {
|
|
2166
|
+
isReadonly: boolean;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2019
2169
|
declare interface IApiReleaseTagMixinJson extends IApiItemJson {
|
|
2020
2170
|
releaseTag: string;
|
|
2021
2171
|
}
|
|
@@ -2090,7 +2240,7 @@ declare interface IApiVariableJson extends IApiDeclaredItemJson {
|
|
|
2090
2240
|
* Constructor options for {@link ApiVariable}.
|
|
2091
2241
|
* @public
|
|
2092
2242
|
*/
|
|
2093
|
-
export declare interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
2243
|
+
export declare interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions {
|
|
2094
2244
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
2095
2245
|
}
|
|
2096
2246
|
|
package/lib/index.d.ts
CHANGED
|
@@ -15,11 +15,13 @@ export { IApiPropertyItemOptions, ApiPropertyItem } from './items/ApiPropertyIte
|
|
|
15
15
|
export { IApiParameterListMixinOptions, IApiParameterOptions, ApiParameterListMixin } from './mixins/ApiParameterListMixin';
|
|
16
16
|
export { IApiTypeParameterOptions, IApiTypeParameterListMixinOptions, ApiTypeParameterListMixin } from './mixins/ApiTypeParameterListMixin';
|
|
17
17
|
export { IApiItemContainerMixinOptions, ApiItemContainerMixin } from './mixins/ApiItemContainerMixin';
|
|
18
|
+
export { IApiProtectedMixinOptions, ApiProtectedMixin } from './mixins/ApiProtectedMixin';
|
|
18
19
|
export { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from './mixins/ApiReleaseTagMixin';
|
|
19
20
|
export { IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from './mixins/ApiReturnTypeMixin';
|
|
20
21
|
export { IApiStaticMixinOptions, ApiStaticMixin } from './mixins/ApiStaticMixin';
|
|
21
22
|
export { IApiNameMixinOptions, ApiNameMixin } from './mixins/ApiNameMixin';
|
|
22
23
|
export { IApiOptionalMixinOptions, ApiOptionalMixin } from './mixins/ApiOptionalMixin';
|
|
24
|
+
export { IApiReadonlyMixinOptions, ApiReadonlyMixin } from './mixins/ApiReadonlyMixin';
|
|
23
25
|
export { ExcerptTokenKind, IExcerptTokenRange, IExcerptToken, ExcerptToken, Excerpt } from './mixins/Excerpt';
|
|
24
26
|
export { Constructor, PropertiesOf } from './mixins/Mixin';
|
|
25
27
|
export { IApiCallSignatureOptions, ApiCallSignature } from './model/ApiCallSignature';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":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B,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
|
3
3
|
// See LICENSE in the project root for license information.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
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.ApiEnumMember = exports.ApiEnum = exports.ApiEntryPoint = exports.ApiConstructSignature = exports.ApiConstructor = exports.ApiClass = exports.ApiCallSignature = exports.Excerpt = exports.ExcerptToken = exports.ExcerptTokenKind = exports.ApiOptionalMixin = exports.ApiNameMixin = exports.ApiStaticMixin = exports.ApiReturnTypeMixin = exports.ApiReleaseTagMixin = exports.ApiItemContainerMixin = exports.ApiTypeParameterListMixin = exports.ApiParameterListMixin = exports.ApiPropertyItem = exports.ApiItem = exports.ApiItemKind = exports.ApiDocumentedItem = exports.ApiDeclaredItem = exports.ReleaseTag = exports.AedocDefinitions = void 0;
|
|
5
|
+
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.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;
|
|
6
6
|
/**
|
|
7
7
|
* Use this library to read and write *.api.json files as defined by the
|
|
8
8
|
* {@link https://api-extractor.com/ | API Extractor} tool. These files are used to generate a documentation
|
|
@@ -32,6 +32,8 @@ var ApiTypeParameterListMixin_1 = require("./mixins/ApiTypeParameterListMixin");
|
|
|
32
32
|
Object.defineProperty(exports, "ApiTypeParameterListMixin", { enumerable: true, get: function () { return ApiTypeParameterListMixin_1.ApiTypeParameterListMixin; } });
|
|
33
33
|
var ApiItemContainerMixin_1 = require("./mixins/ApiItemContainerMixin");
|
|
34
34
|
Object.defineProperty(exports, "ApiItemContainerMixin", { enumerable: true, get: function () { return ApiItemContainerMixin_1.ApiItemContainerMixin; } });
|
|
35
|
+
var ApiProtectedMixin_1 = require("./mixins/ApiProtectedMixin");
|
|
36
|
+
Object.defineProperty(exports, "ApiProtectedMixin", { enumerable: true, get: function () { return ApiProtectedMixin_1.ApiProtectedMixin; } });
|
|
35
37
|
var ApiReleaseTagMixin_1 = require("./mixins/ApiReleaseTagMixin");
|
|
36
38
|
Object.defineProperty(exports, "ApiReleaseTagMixin", { enumerable: true, get: function () { return ApiReleaseTagMixin_1.ApiReleaseTagMixin; } });
|
|
37
39
|
var ApiReturnTypeMixin_1 = require("./mixins/ApiReturnTypeMixin");
|
|
@@ -42,6 +44,8 @@ var ApiNameMixin_1 = require("./mixins/ApiNameMixin");
|
|
|
42
44
|
Object.defineProperty(exports, "ApiNameMixin", { enumerable: true, get: function () { return ApiNameMixin_1.ApiNameMixin; } });
|
|
43
45
|
var ApiOptionalMixin_1 = require("./mixins/ApiOptionalMixin");
|
|
44
46
|
Object.defineProperty(exports, "ApiOptionalMixin", { enumerable: true, get: function () { return ApiOptionalMixin_1.ApiOptionalMixin; } });
|
|
47
|
+
var ApiReadonlyMixin_1 = require("./mixins/ApiReadonlyMixin");
|
|
48
|
+
Object.defineProperty(exports, "ApiReadonlyMixin", { enumerable: true, get: function () { return ApiReadonlyMixin_1.ApiReadonlyMixin; } });
|
|
45
49
|
var Excerpt_1 = require("./mixins/Excerpt");
|
|
46
50
|
Object.defineProperty(exports, "ExcerptTokenKind", { enumerable: true, get: function () { return Excerpt_1.ExcerptTokenKind; } });
|
|
47
51
|
Object.defineProperty(exports, "ExcerptToken", { enumerable: true, get: function () { return Excerpt_1.ExcerptToken; } });
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D;;;;;;;GAOG;AAEH,6DAA4D;AAAnD,oHAAA,gBAAgB,OAAA;AACzB,iDAAgD;AAAvC,wGAAA,UAAU,OAAA;AAEnB,QA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AAA,YAAY,OAAA;AAC3C,iDAA4F;AAA/D,wGAAA,UAAU,OAAA;AACvC,+CAAiE;AAArC,sGAAA,SAAS,OAAA;AACrC,mDAAuE;AAAzC,0GAAA,WAAW,OAAA;AACzC,qEAAkG;AAA3D,4HAAA,oBAAoB,OAAA;AAC3D,qDAA0E;AAA3C,4GAAA,YAAY,OAAA;AAC3C,uDAA6E;AAA7C,8GAAA,aAAa,OAAA;AAC7C,mDAAuE;AAAzC,0GAAA,WAAW,OAAA;AAEzC,qDAAoD;AAA3C,4GAAA,YAAY,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * Use this library to read and write *.api.json files as defined by the\n * {@link https://api-extractor.com/ | API Extractor} tool. These files are used to generate a documentation\n * website for your TypeScript package. The files store the API signatures and doc comments that were extracted\n * from your package.\n *\n * @packageDocumentation\n */\n\nexport { AedocDefinitions } from './aedoc/AedocDefinitions';\nexport { ReleaseTag } from './aedoc/ReleaseTag';\n\n// items\nexport { IApiDeclaredItemOptions, ApiDeclaredItem } from './items/ApiDeclaredItem';\nexport { IApiDocumentedItemOptions, ApiDocumentedItem } from './items/ApiDocumentedItem';\nexport { ApiItemKind, IApiItemOptions, ApiItem, IApiItemConstructor } from './items/ApiItem';\nexport { IApiPropertyItemOptions, ApiPropertyItem } from './items/ApiPropertyItem';\n\n// mixins\nexport {\n IApiParameterListMixinOptions,\n IApiParameterOptions,\n ApiParameterListMixin\n} from './mixins/ApiParameterListMixin';\nexport {\n IApiTypeParameterOptions,\n IApiTypeParameterListMixinOptions,\n ApiTypeParameterListMixin\n} from './mixins/ApiTypeParameterListMixin';\nexport { IApiItemContainerMixinOptions, ApiItemContainerMixin } from './mixins/ApiItemContainerMixin';\nexport { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from './mixins/ApiReleaseTagMixin';\nexport { IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from './mixins/ApiReturnTypeMixin';\nexport { IApiStaticMixinOptions, ApiStaticMixin } from './mixins/ApiStaticMixin';\nexport { IApiNameMixinOptions, ApiNameMixin } from './mixins/ApiNameMixin';\nexport { IApiOptionalMixinOptions, ApiOptionalMixin } from './mixins/ApiOptionalMixin';\n\nexport { ExcerptTokenKind, IExcerptTokenRange, IExcerptToken, ExcerptToken, Excerpt } from './mixins/Excerpt';\nexport { Constructor, PropertiesOf } from './mixins/Mixin';\n\n// model\nexport { IApiCallSignatureOptions, ApiCallSignature } from './model/ApiCallSignature';\nexport { IApiClassOptions, ApiClass } from './model/ApiClass';\nexport { IApiConstructorOptions, ApiConstructor } from './model/ApiConstructor';\nexport { IApiConstructSignatureOptions, ApiConstructSignature } from './model/ApiConstructSignature';\nexport { IApiEntryPointOptions, ApiEntryPoint } from './model/ApiEntryPoint';\nexport { IApiEnumOptions, ApiEnum } from './model/ApiEnum';\nexport { IApiEnumMemberOptions, ApiEnumMember } from './model/ApiEnumMember';\nexport { IApiFunctionOptions, ApiFunction } from './model/ApiFunction';\nexport { IApiIndexSignatureOptions, ApiIndexSignature } from './model/ApiIndexSignature';\nexport { IApiInterfaceOptions, ApiInterface } from './model/ApiInterface';\nexport { IApiMethodOptions, ApiMethod } from './model/ApiMethod';\nexport { IApiMethodSignatureOptions, ApiMethodSignature } from './model/ApiMethodSignature';\nexport { ApiModel } from './model/ApiModel';\nexport { IApiNamespaceOptions, ApiNamespace } from './model/ApiNamespace';\nexport { IApiPackageOptions, ApiPackage, IApiPackageSaveOptions } from './model/ApiPackage';\nexport { IParameterOptions, Parameter } from './model/Parameter';\nexport { IApiPropertyOptions, ApiProperty } from './model/ApiProperty';\nexport { IApiPropertySignatureOptions, ApiPropertySignature } from './model/ApiPropertySignature';\nexport { IApiTypeAliasOptions, ApiTypeAlias } from './model/ApiTypeAlias';\nexport { ITypeParameterOptions, TypeParameter } from './model/TypeParameter';\nexport { IApiVariableOptions, ApiVariable } from './model/ApiVariable';\nexport { IResolveDeclarationReferenceResult } from './model/ModelReferenceResolver';\nexport { HeritageType } from './model/HeritageType';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D;;;;;;;GAOG;AAEH,6DAA4D;AAAnD,oHAAA,gBAAgB,OAAA;AACzB,iDAAgD;AAAvC,wGAAA,UAAU,OAAA;AAEnB,QAAQ;AACR,2DAAmF;AAAjD,kHAAA,eAAe,OAAA;AACjD,+DAAyF;AAArD,sHAAA,iBAAiB,OAAA;AACrD,2CAA6F;AAApF,sGAAA,WAAW,OAAA;AAAmB,kGAAA,OAAO,OAAA;AAC9C,2DAAmF;AAAjD,kHAAA,eAAe,OAAA;AAEjD,SAAS;AACT,wEAIwC;AADtC,8HAAA,qBAAqB,OAAA;AAEvB,gFAI4C;AAD1C,sIAAA,yBAAyB,OAAA;AAE3B,wEAAsG;AAA9D,8HAAA,qBAAqB,OAAA;AAC7D,gEAA0F;AAAtD,sHAAA,iBAAiB,OAAA;AACrD,kEAA6F;AAAxD,wHAAA,kBAAkB,OAAA;AACvD,kEAA6F;AAAxD,wHAAA,kBAAkB,OAAA;AACvD,0DAAiF;AAAhD,gHAAA,cAAc,OAAA;AAC/C,sDAA2E;AAA5C,4GAAA,YAAY,OAAA;AAC3C,8DAAuF;AAApD,oHAAA,gBAAgB,OAAA;AACnD,8DAAuF;AAApD,oHAAA,gBAAgB,OAAA;AAEnD,4CAA8G;AAArG,2GAAA,gBAAgB,OAAA;AAAqC,uGAAA,YAAY,OAAA;AAAE,kGAAA,OAAO,OAAA;AAGnF,QAAQ;AACR,6DAAsF;AAAnD,oHAAA,gBAAgB,OAAA;AACnD,6CAA8D;AAAnC,oGAAA,QAAQ,OAAA;AACnC,yDAAgF;AAA/C,gHAAA,cAAc,OAAA;AAC/C,uEAAqG;AAA7D,8HAAA,qBAAqB,OAAA;AAC7D,uDAA6E;AAA7C,8GAAA,aAAa,OAAA;AAC7C,2CAA2D;AAAjC,kGAAA,OAAO,OAAA;AACjC,uDAA6E;AAA7C,8GAAA,aAAa,OAAA;AAC7C,mDAAuE;AAAzC,0GAAA,WAAW,OAAA;AACzC,+DAAyF;AAArD,sHAAA,iBAAiB,OAAA;AACrD,qDAA0E;AAA3C,4GAAA,YAAY,OAAA;AAC3C,+CAAiE;AAArC,sGAAA,SAAS,OAAA;AACrC,iEAA4F;AAAvD,wHAAA,kBAAkB,OAAA;AACvD,6CAA4C;AAAnC,oGAAA,QAAQ,OAAA;AACjB,qDAA0E;AAA3C,4GAAA,YAAY,OAAA;AAC3C,iDAA4F;AAA/D,wGAAA,UAAU,OAAA;AACvC,+CAAiE;AAArC,sGAAA,SAAS,OAAA;AACrC,mDAAuE;AAAzC,0GAAA,WAAW,OAAA;AACzC,qEAAkG;AAA3D,4HAAA,oBAAoB,OAAA;AAC3D,qDAA0E;AAA3C,4GAAA,YAAY,OAAA;AAC3C,uDAA6E;AAA7C,8GAAA,aAAa,OAAA;AAC7C,mDAAuE;AAAzC,0GAAA,WAAW,OAAA;AAEzC,qDAAoD;AAA3C,4GAAA,YAAY,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\n/**\n * Use this library to read and write *.api.json files as defined by the\n * {@link https://api-extractor.com/ | API Extractor} tool. These files are used to generate a documentation\n * website for your TypeScript package. The files store the API signatures and doc comments that were extracted\n * from your package.\n *\n * @packageDocumentation\n */\n\nexport { AedocDefinitions } from './aedoc/AedocDefinitions';\nexport { ReleaseTag } from './aedoc/ReleaseTag';\n\n// items\nexport { IApiDeclaredItemOptions, ApiDeclaredItem } from './items/ApiDeclaredItem';\nexport { IApiDocumentedItemOptions, ApiDocumentedItem } from './items/ApiDocumentedItem';\nexport { ApiItemKind, IApiItemOptions, ApiItem, IApiItemConstructor } from './items/ApiItem';\nexport { IApiPropertyItemOptions, ApiPropertyItem } from './items/ApiPropertyItem';\n\n// mixins\nexport {\n IApiParameterListMixinOptions,\n IApiParameterOptions,\n ApiParameterListMixin\n} from './mixins/ApiParameterListMixin';\nexport {\n IApiTypeParameterOptions,\n IApiTypeParameterListMixinOptions,\n ApiTypeParameterListMixin\n} from './mixins/ApiTypeParameterListMixin';\nexport { IApiItemContainerMixinOptions, ApiItemContainerMixin } from './mixins/ApiItemContainerMixin';\nexport { IApiProtectedMixinOptions, ApiProtectedMixin } from './mixins/ApiProtectedMixin';\nexport { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from './mixins/ApiReleaseTagMixin';\nexport { IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from './mixins/ApiReturnTypeMixin';\nexport { IApiStaticMixinOptions, ApiStaticMixin } from './mixins/ApiStaticMixin';\nexport { IApiNameMixinOptions, ApiNameMixin } from './mixins/ApiNameMixin';\nexport { IApiOptionalMixinOptions, ApiOptionalMixin } from './mixins/ApiOptionalMixin';\nexport { IApiReadonlyMixinOptions, ApiReadonlyMixin } from './mixins/ApiReadonlyMixin';\n\nexport { ExcerptTokenKind, IExcerptTokenRange, IExcerptToken, ExcerptToken, Excerpt } from './mixins/Excerpt';\nexport { Constructor, PropertiesOf } from './mixins/Mixin';\n\n// model\nexport { IApiCallSignatureOptions, ApiCallSignature } from './model/ApiCallSignature';\nexport { IApiClassOptions, ApiClass } from './model/ApiClass';\nexport { IApiConstructorOptions, ApiConstructor } from './model/ApiConstructor';\nexport { IApiConstructSignatureOptions, ApiConstructSignature } from './model/ApiConstructSignature';\nexport { IApiEntryPointOptions, ApiEntryPoint } from './model/ApiEntryPoint';\nexport { IApiEnumOptions, ApiEnum } from './model/ApiEnum';\nexport { IApiEnumMemberOptions, ApiEnumMember } from './model/ApiEnumMember';\nexport { IApiFunctionOptions, ApiFunction } from './model/ApiFunction';\nexport { IApiIndexSignatureOptions, ApiIndexSignature } from './model/ApiIndexSignature';\nexport { IApiInterfaceOptions, ApiInterface } from './model/ApiInterface';\nexport { IApiMethodOptions, ApiMethod } from './model/ApiMethod';\nexport { IApiMethodSignatureOptions, ApiMethodSignature } from './model/ApiMethodSignature';\nexport { ApiModel } from './model/ApiModel';\nexport { IApiNamespaceOptions, ApiNamespace } from './model/ApiNamespace';\nexport { IApiPackageOptions, ApiPackage, IApiPackageSaveOptions } from './model/ApiPackage';\nexport { IParameterOptions, Parameter } from './model/Parameter';\nexport { IApiPropertyOptions, ApiProperty } from './model/ApiProperty';\nexport { IApiPropertySignatureOptions, ApiPropertySignature } from './model/ApiPropertySignature';\nexport { IApiTypeAliasOptions, ApiTypeAlias } from './model/ApiTypeAlias';\nexport { ITypeParameterOptions, TypeParameter } from './model/TypeParameter';\nexport { IApiVariableOptions, ApiVariable } from './model/ApiVariable';\nexport { IResolveDeclarationReferenceResult } from './model/ModelReferenceResolver';\nexport { HeritageType } from './model/HeritageType';\n"]}
|
|
@@ -4,17 +4,18 @@ import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiRel
|
|
|
4
4
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
5
5
|
import { DeserializerContext } from '../model/DeserializerContext';
|
|
6
6
|
import { ApiOptionalMixin, IApiOptionalMixinOptions } from '../mixins/ApiOptionalMixin';
|
|
7
|
+
import { ApiReadonlyMixin, IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';
|
|
7
8
|
/**
|
|
8
9
|
* Constructor options for {@link ApiPropertyItem}.
|
|
9
10
|
* @public
|
|
10
11
|
*/
|
|
11
|
-
export interface IApiPropertyItemOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiOptionalMixinOptions, IApiDeclaredItemOptions {
|
|
12
|
+
export interface IApiPropertyItemOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiOptionalMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions {
|
|
12
13
|
propertyTypeTokenRange: IExcerptTokenRange;
|
|
13
14
|
}
|
|
14
15
|
export interface IApiPropertyItemJson extends IApiDeclaredItemJson {
|
|
15
16
|
propertyTypeTokenRange: IExcerptTokenRange;
|
|
16
17
|
}
|
|
17
|
-
declare const ApiPropertyItem_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiOptionalMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
18
|
+
declare const ApiPropertyItem_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiOptionalMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
18
19
|
/**
|
|
19
20
|
* The abstract base class for {@link ApiProperty} and {@link ApiPropertySignature}.
|
|
20
21
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiPropertyItem.d.ts","sourceRoot":"","sources":["../../src/items/ApiPropertyItem.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,eAAe,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,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,uBACf,SAAQ,oBAAoB,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB;IACzB,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;;AAED;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,
|
|
1
|
+
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const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
|
7
7
|
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
8
8
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
9
9
|
const ApiOptionalMixin_1 = require("../mixins/ApiOptionalMixin");
|
|
10
|
+
const ApiReadonlyMixin_1 = require("../mixins/ApiReadonlyMixin");
|
|
10
11
|
/**
|
|
11
12
|
* The abstract base class for {@link ApiProperty} and {@link ApiPropertySignature}.
|
|
12
13
|
*
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
|
-
class ApiPropertyItem extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiOptionalMixin_1.ApiOptionalMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
|
|
16
|
+
class ApiPropertyItem extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiOptionalMixin_1.ApiOptionalMixin)((0, ApiReadonlyMixin_1.ApiReadonlyMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
16
17
|
constructor(options) {
|
|
17
18
|
super(options);
|
|
18
19
|
this.propertyTypeExcerpt = this.buildExcerpt(options.propertyTypeTokenRange);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiPropertyItem.js","sourceRoot":"","sources":["../../src/items/ApiPropertyItem.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAE5E,iEAAwF;
|
|
1
|
+
{"version":3,"file":"ApiPropertyItem.js","sourceRoot":"","sources":["../../src/items/ApiPropertyItem.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAG3D,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAE5E,iEAAwF;AACxF,iEAAwF;AAmBxF;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,IAAA,2BAAY,EAC/C,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACxE;IAMC,YAAmB,OAAgC;QACjD,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,OAAyC,EACzC,OAA4B,EAC5B,UAAgC;QAEhC,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,sBAAsB,GAAG,UAAU,CAAC,sBAAsB,CAAC;IACrE,CAAC;IAED;;;;;;;;;OASG;IACH,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,OAAO,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC;SAC3D;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAyC;QAC5D,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,UAAU,CAAC,sBAAsB,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC;IAC1E,CAAC;CACF;AAhDD,0CAgDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\nimport { IApiDeclaredItemOptions, ApiDeclaredItem, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { DeserializerContext } from '../model/DeserializerContext';\nimport { ApiOptionalMixin, IApiOptionalMixinOptions } from '../mixins/ApiOptionalMixin';\nimport { ApiReadonlyMixin, IApiReadonlyMixinOptions } from '../mixins/ApiReadonlyMixin';\n\n/**\n * Constructor options for {@link ApiPropertyItem}.\n * @public\n */\nexport interface IApiPropertyItemOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiOptionalMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions {\n propertyTypeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiPropertyItemJson extends IApiDeclaredItemJson {\n propertyTypeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * The abstract base class for {@link ApiProperty} and {@link ApiPropertySignature}.\n *\n * @public\n */\nexport class ApiPropertyItem extends ApiNameMixin(\n ApiReleaseTagMixin(ApiOptionalMixin(ApiReadonlyMixin(ApiDeclaredItem)))\n) {\n /**\n * An {@link Excerpt} that describes the type of the property.\n */\n public readonly propertyTypeExcerpt: Excerpt;\n\n public constructor(options: IApiPropertyItemOptions) {\n super(options);\n\n this.propertyTypeExcerpt = this.buildExcerpt(options.propertyTypeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiPropertyItemOptions>,\n context: DeserializerContext,\n jsonObject: IApiPropertyItemJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.propertyTypeTokenRange = jsonObject.propertyTypeTokenRange;\n }\n\n /**\n * Returns true if this property should be documented as an event.\n *\n * @remarks\n * The `@eventProperty` TSDoc modifier can be added to readonly properties to indicate that they return an\n * event object that event handlers can be attached to. The event-handling API is implementation-defined, but\n * typically the return type would be a class with members such as `addHandler()` and `removeHandler()`.\n * The documentation should display such properties under an \"Events\" heading instead of the\n * usual \"Properties\" heading.\n */\n public get isEventProperty(): boolean {\n if (this.tsdocComment) {\n return this.tsdocComment.modifierTagSet.isEventProperty();\n }\n return false;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiPropertyItemJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.propertyTypeTokenRange = this.propertyTypeExcerpt.tokenRange;\n }\n}\n"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';
|
|
2
|
+
/**
|
|
3
|
+
* Constructor options for {@link (IApiProtectedMixinOptions:interface)}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IApiProtectedMixinOptions extends IApiItemOptions {
|
|
7
|
+
isProtected: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IApiProtectedMixinJson extends IApiItemJson {
|
|
10
|
+
isProtected: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The mixin base class for API items that can have the TypeScript `protected` keyword applied to them.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
*
|
|
17
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
18
|
+
* API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use
|
|
19
|
+
* TypeScript "mixin" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various
|
|
20
|
+
* features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class
|
|
21
|
+
* to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components:
|
|
22
|
+
* the function that generates a subclass, an interface that describes the members of the subclass, and
|
|
23
|
+
* a namespace containing static members of the class.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export interface ApiProtectedMixin extends ApiItem {
|
|
28
|
+
/**
|
|
29
|
+
* Whether the declaration has the TypeScript `protected` keyword.
|
|
30
|
+
*/
|
|
31
|
+
readonly isProtected: boolean;
|
|
32
|
+
/** @override */
|
|
33
|
+
serializeInto(jsonObject: Partial<IApiItemJson>): void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Mixin function for {@link (ApiProtectedMixin:interface)}.
|
|
37
|
+
*
|
|
38
|
+
* @param baseClass - The base class to be extended
|
|
39
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiProtectedMixin:interface)} functionality.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export declare function ApiProtectedMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiProtectedMixin);
|
|
44
|
+
/**
|
|
45
|
+
* Static members for {@link (ApiProtectedMixin:interface)}.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export declare namespace ApiProtectedMixin {
|
|
49
|
+
/**
|
|
50
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiProtectedMixin` mixin.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
*
|
|
54
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
55
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
56
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
57
|
+
*/
|
|
58
|
+
function isBaseClassOf(apiItem: ApiItem): apiItem is ApiProtectedMixin;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=ApiProtectedMixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiProtectedMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiProtectedMixin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/F;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAChE,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D,WAAW,EAAE,OAAO,CAAC;CACtB;AAID;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,iBAAkB,SAAQ,OAAO;IAChD;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAE9B,gBAAgB;IAChB,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,SAAS,mBAAmB,EACtE,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,iBAAiB,CAAC,CAoC1D;AAED;;;GAGG;AACH,yBAAiB,iBAAiB,CAAC;IACjC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,iBAAiB,CAE5E;CACF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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.ApiProtectedMixin = void 0;
|
|
6
|
+
const _isProtected = Symbol('ApiProtectedMixin._isProtected');
|
|
7
|
+
/**
|
|
8
|
+
* Mixin function for {@link (ApiProtectedMixin:interface)}.
|
|
9
|
+
*
|
|
10
|
+
* @param baseClass - The base class to be extended
|
|
11
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiProtectedMixin:interface)} functionality.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
function ApiProtectedMixin(baseClass
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
) {
|
|
18
|
+
class MixedClass extends baseClass {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
constructor(...args) {
|
|
21
|
+
super(...args);
|
|
22
|
+
const options = args[0];
|
|
23
|
+
this[_isProtected] = options.isProtected;
|
|
24
|
+
}
|
|
25
|
+
/** @override */
|
|
26
|
+
static onDeserializeInto(options, context, jsonObject) {
|
|
27
|
+
baseClass.onDeserializeInto(options, context, jsonObject);
|
|
28
|
+
options.isProtected = jsonObject.isProtected;
|
|
29
|
+
}
|
|
30
|
+
get isProtected() {
|
|
31
|
+
return this[_isProtected];
|
|
32
|
+
}
|
|
33
|
+
/** @override */
|
|
34
|
+
serializeInto(jsonObject) {
|
|
35
|
+
super.serializeInto(jsonObject);
|
|
36
|
+
jsonObject.isProtected = this.isProtected;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return MixedClass;
|
|
40
|
+
}
|
|
41
|
+
exports.ApiProtectedMixin = ApiProtectedMixin;
|
|
42
|
+
/**
|
|
43
|
+
* Static members for {@link (ApiProtectedMixin:interface)}.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
(function (ApiProtectedMixin) {
|
|
47
|
+
/**
|
|
48
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiProtectedMixin` mixin.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
*
|
|
52
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
53
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
54
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
55
|
+
*/
|
|
56
|
+
function isBaseClassOf(apiItem) {
|
|
57
|
+
return apiItem.hasOwnProperty(_isProtected);
|
|
58
|
+
}
|
|
59
|
+
ApiProtectedMixin.isBaseClassOf = isBaseClassOf;
|
|
60
|
+
})(ApiProtectedMixin = exports.ApiProtectedMixin || (exports.ApiProtectedMixin = {}));
|
|
61
|
+
//# sourceMappingURL=ApiProtectedMixin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiProtectedMixin.js","sourceRoot":"","sources":["../../src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. 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 (IApiProtectedMixinOptions:interface)}.\n * @public\n */\nexport interface IApiProtectedMixinOptions extends IApiItemOptions {\n isProtected: boolean;\n}\n\nexport interface IApiProtectedMixinJson extends IApiItemJson {\n isProtected: boolean;\n}\n\nconst _isProtected: unique symbol = Symbol('ApiProtectedMixin._isProtected');\n\n/**\n * The mixin base class for API items that can have the TypeScript `protected` keyword applied to them.\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 ApiProtectedMixin extends ApiItem {\n /**\n * Whether the declaration has the TypeScript `protected` keyword.\n */\n readonly isProtected: boolean;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiProtectedMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiProtectedMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiProtectedMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiProtectedMixin) {\n class MixedClass extends baseClass implements ApiProtectedMixin {\n public [_isProtected]: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiProtectedMixinOptions = args[0];\n this[_isProtected] = options.isProtected;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiProtectedMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiProtectedMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n options.isProtected = jsonObject.isProtected;\n }\n\n public get isProtected(): boolean {\n return this[_isProtected];\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiProtectedMixinJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.isProtected = this.isProtected;\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiProtectedMixin:interface)}.\n * @public\n */\nexport namespace ApiProtectedMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiProtectedMixin` 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 ApiProtectedMixin {\n return apiItem.hasOwnProperty(_isProtected);\n }\n}\n"]}
|
|
@@ -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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E5B,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,uB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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,O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AC;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,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ACnC,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"]}
|