@microsoft/api-extractor-model 7.23.3 → 7.24.1
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 +104 -18
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/mixins/ApiExportedMixin.d.ts +83 -0
- package/lib/mixins/ApiExportedMixin.d.ts.map +1 -0
- package/lib/mixins/ApiExportedMixin.js +66 -0
- package/lib/mixins/ApiExportedMixin.js.map +1 -0
- package/lib/model/ApiClass.d.ts +4 -3
- package/lib/model/ApiClass.d.ts.map +1 -1
- package/lib/model/ApiClass.js +4 -2
- package/lib/model/ApiClass.js.map +1 -1
- package/lib/model/ApiEnum.d.ts +3 -2
- package/lib/model/ApiEnum.d.ts.map +1 -1
- package/lib/model/ApiEnum.js +4 -2
- package/lib/model/ApiEnum.js.map +1 -1
- package/lib/model/ApiFunction.d.ts +3 -2
- package/lib/model/ApiFunction.d.ts.map +1 -1
- package/lib/model/ApiFunction.js +4 -2
- package/lib/model/ApiFunction.js.map +1 -1
- package/lib/model/ApiInterface.d.ts +4 -3
- package/lib/model/ApiInterface.d.ts.map +1 -1
- package/lib/model/ApiInterface.js +4 -2
- package/lib/model/ApiInterface.js.map +1 -1
- package/lib/model/ApiNamespace.d.ts +3 -2
- package/lib/model/ApiNamespace.d.ts.map +1 -1
- package/lib/model/ApiNamespace.js +4 -2
- package/lib/model/ApiNamespace.js.map +1 -1
- package/lib/model/ApiTypeAlias.d.ts +4 -3
- package/lib/model/ApiTypeAlias.d.ts.map +1 -1
- package/lib/model/ApiTypeAlias.js +4 -2
- package/lib/model/ApiTypeAlias.js.map +1 -1
- package/lib/model/ApiVariable.d.ts +4 -3
- package/lib/model/ApiVariable.d.ts.map +1 -1
- package/lib/model/ApiVariable.js +4 -2
- package/lib/model/ApiVariable.js.map +1 -1
- package/package.json +4 -5
package/dist/rollup.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ export declare class ApiClass extends ApiClass_base {
|
|
|
108
108
|
buildCanonicalReference(): DeclarationReference;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
declare const ApiClass_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
111
|
+
declare const ApiClass_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Represents a TypeScript class constructor declaration that belongs to an `ApiClass`.
|
|
@@ -352,7 +352,7 @@ export declare class ApiEnum extends ApiEnum_base {
|
|
|
352
352
|
buildCanonicalReference(): DeclarationReference;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
declare const ApiEnum_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
355
|
+
declare const ApiEnum_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
356
356
|
|
|
357
357
|
/**
|
|
358
358
|
* Represents a member of a TypeScript enum declaration.
|
|
@@ -387,6 +387,80 @@ export declare class ApiEnumMember extends ApiEnumMember_base {
|
|
|
387
387
|
|
|
388
388
|
declare const ApiEnumMember_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
389
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Mixin function for {@link (ApiExportedMixin:interface)}.
|
|
392
|
+
*
|
|
393
|
+
* @param baseClass - The base class to be extended
|
|
394
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiExportedMixin:interface)} functionality.
|
|
395
|
+
*
|
|
396
|
+
* @public
|
|
397
|
+
*/
|
|
398
|
+
export declare function ApiExportedMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiExportedMixin);
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* The mixin base class for API items that can be exported.
|
|
402
|
+
*
|
|
403
|
+
* @remarks
|
|
404
|
+
*
|
|
405
|
+
* This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of
|
|
406
|
+
* API declarations. The non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use
|
|
407
|
+
* TypeScript "mixin" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various
|
|
408
|
+
* features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class
|
|
409
|
+
* to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components:
|
|
410
|
+
* the function that generates a subclass, an interface that describes the members of the subclass, and
|
|
411
|
+
* a namespace containing static members of the class.
|
|
412
|
+
*
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
415
|
+
export declare interface ApiExportedMixin extends ApiItem {
|
|
416
|
+
/**
|
|
417
|
+
* Whether the declaration is exported from its parent item container (i.e. either an `ApiEntryPoint` or an
|
|
418
|
+
* `ApiNamespace`).
|
|
419
|
+
*
|
|
420
|
+
* @remarks
|
|
421
|
+
* Suppose `index.ts` is your entry point:
|
|
422
|
+
*
|
|
423
|
+
* ```ts
|
|
424
|
+
* // index.ts
|
|
425
|
+
*
|
|
426
|
+
* export class A {}
|
|
427
|
+
* class B {}
|
|
428
|
+
*
|
|
429
|
+
* namespace n {
|
|
430
|
+
* export class C {}
|
|
431
|
+
* class D {}
|
|
432
|
+
* }
|
|
433
|
+
*
|
|
434
|
+
* // file.ts
|
|
435
|
+
* export class E {}
|
|
436
|
+
* ```
|
|
437
|
+
*
|
|
438
|
+
* Classes `A` and `C` are both exported, while classes `B`, `D`, and `E` are not. `E` is exported from its
|
|
439
|
+
* local file, but not from its parent item container (i.e. the entry point).
|
|
440
|
+
*
|
|
441
|
+
*/
|
|
442
|
+
readonly isExported: boolean;
|
|
443
|
+
/** @override */
|
|
444
|
+
serializeInto(jsonObject: Partial<IApiItemJson>): void;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Static members for {@link (ApiExportedMixin:interface)}.
|
|
449
|
+
* @public
|
|
450
|
+
*/
|
|
451
|
+
export declare namespace ApiExportedMixin {
|
|
452
|
+
/**
|
|
453
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiExportedMixin` mixin.
|
|
454
|
+
*
|
|
455
|
+
* @remarks
|
|
456
|
+
*
|
|
457
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
458
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
459
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
460
|
+
*/
|
|
461
|
+
export function isBaseClassOf(apiItem: ApiItem): apiItem is ApiExportedMixin;
|
|
462
|
+
}
|
|
463
|
+
|
|
390
464
|
/**
|
|
391
465
|
* Represents a TypeScript function declaration.
|
|
392
466
|
*
|
|
@@ -419,7 +493,7 @@ export declare class ApiFunction extends ApiFunction_base {
|
|
|
419
493
|
buildCanonicalReference(): DeclarationReference;
|
|
420
494
|
}
|
|
421
495
|
|
|
422
|
-
declare const ApiFunction_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
496
|
+
declare const ApiFunction_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
423
497
|
|
|
424
498
|
/**
|
|
425
499
|
* Represents a TypeScript index signature.
|
|
@@ -544,7 +618,7 @@ export declare class ApiInterface extends ApiInterface_base {
|
|
|
544
618
|
buildCanonicalReference(): DeclarationReference;
|
|
545
619
|
}
|
|
546
620
|
|
|
547
|
-
declare const ApiInterface_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
621
|
+
declare const ApiInterface_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
548
622
|
|
|
549
623
|
/**
|
|
550
624
|
* The abstract base class for all members of an `ApiModel` object.
|
|
@@ -1167,7 +1241,7 @@ export declare class ApiNamespace extends ApiNamespace_base {
|
|
|
1167
1241
|
buildCanonicalReference(): DeclarationReference;
|
|
1168
1242
|
}
|
|
1169
1243
|
|
|
1170
|
-
declare const ApiNamespace_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
1244
|
+
declare const ApiNamespace_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
1171
1245
|
|
|
1172
1246
|
/**
|
|
1173
1247
|
* Mixin function for {@link (ApiOptionalMixin:interface)}.
|
|
@@ -1790,7 +1864,7 @@ export declare class ApiTypeAlias extends ApiTypeAlias_base {
|
|
|
1790
1864
|
buildCanonicalReference(): DeclarationReference;
|
|
1791
1865
|
}
|
|
1792
1866
|
|
|
1793
|
-
declare const ApiTypeAlias_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiTypeParameterListMixin);
|
|
1867
|
+
declare const ApiTypeAlias_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiTypeParameterListMixin);
|
|
1794
1868
|
|
|
1795
1869
|
/**
|
|
1796
1870
|
* Mixin function for {@link (ApiTypeParameterListMixin:interface)}.
|
|
@@ -1882,7 +1956,7 @@ export declare class ApiVariable extends ApiVariable_base {
|
|
|
1882
1956
|
buildCanonicalReference(): DeclarationReference;
|
|
1883
1957
|
}
|
|
1884
1958
|
|
|
1885
|
-
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
1959
|
+
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
1886
1960
|
|
|
1887
1961
|
/**
|
|
1888
1962
|
* This abstraction is used by the mixin pattern.
|
|
@@ -2097,7 +2171,7 @@ export declare class HeritageType {
|
|
|
2097
2171
|
export declare interface IApiCallSignatureOptions extends IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions {
|
|
2098
2172
|
}
|
|
2099
2173
|
|
|
2100
|
-
declare interface IApiClassJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson {
|
|
2174
|
+
declare interface IApiClassJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson, IApiExportedMixinJson {
|
|
2101
2175
|
extendsTokenRange?: IExcerptTokenRange;
|
|
2102
2176
|
implementsTokenRanges: IExcerptTokenRange[];
|
|
2103
2177
|
}
|
|
@@ -2106,7 +2180,7 @@ declare interface IApiClassJson extends IApiDeclaredItemJson, IApiTypeParameterL
|
|
|
2106
2180
|
* Constructor options for {@link ApiClass}.
|
|
2107
2181
|
* @public
|
|
2108
2182
|
*/
|
|
2109
|
-
export declare interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions {
|
|
2183
|
+
export declare interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions {
|
|
2110
2184
|
extendsTokenRange: IExcerptTokenRange | undefined;
|
|
2111
2185
|
implementsTokenRanges: IExcerptTokenRange[];
|
|
2112
2186
|
}
|
|
@@ -2167,14 +2241,26 @@ export declare interface IApiEnumMemberOptions extends IApiNameMixinOptions, IAp
|
|
|
2167
2241
|
* Constructor options for {@link ApiEnum}.
|
|
2168
2242
|
* @public
|
|
2169
2243
|
*/
|
|
2170
|
-
export declare interface IApiEnumOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
2244
|
+
export declare interface IApiEnumOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
declare interface IApiExportedMixinJson extends IApiItemJson {
|
|
2248
|
+
isExported: boolean;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* Constructor options for {@link (IApiExportedMixinOptions:interface)}.
|
|
2253
|
+
* @public
|
|
2254
|
+
*/
|
|
2255
|
+
export declare interface IApiExportedMixinOptions extends IApiItemOptions {
|
|
2256
|
+
isExported: boolean;
|
|
2171
2257
|
}
|
|
2172
2258
|
|
|
2173
2259
|
/**
|
|
2174
2260
|
* Constructor options for {@link ApiFunction}.
|
|
2175
2261
|
* @public
|
|
2176
2262
|
*/
|
|
2177
|
-
export declare interface IApiFunctionOptions extends IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions {
|
|
2263
|
+
export declare interface IApiFunctionOptions extends IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
2178
2264
|
}
|
|
2179
2265
|
|
|
2180
2266
|
/**
|
|
@@ -2196,7 +2282,7 @@ export declare interface IApiInitializerMixinOptions extends IApiItemOptions {
|
|
|
2196
2282
|
initializerTokenRange?: IExcerptTokenRange;
|
|
2197
2283
|
}
|
|
2198
2284
|
|
|
2199
|
-
declare interface IApiInterfaceJson extends IApiItemContainerJson, IApiNameMixinJson, IApiTypeParameterListMixinJson, IApiReleaseTagMixinJson, IApiDeclaredItemJson {
|
|
2285
|
+
declare interface IApiInterfaceJson extends IApiItemContainerJson, IApiNameMixinJson, IApiTypeParameterListMixinJson, IApiReleaseTagMixinJson, IApiDeclaredItemJson, IApiExportedMixinJson {
|
|
2200
2286
|
extendsTokenRanges: IExcerptTokenRange[];
|
|
2201
2287
|
}
|
|
2202
2288
|
|
|
@@ -2204,7 +2290,7 @@ declare interface IApiInterfaceJson extends IApiItemContainerJson, IApiNameMixin
|
|
|
2204
2290
|
* Constructor options for {@link ApiInterface}.
|
|
2205
2291
|
* @public
|
|
2206
2292
|
*/
|
|
2207
|
-
export declare interface IApiInterfaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
2293
|
+
export declare interface IApiInterfaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
2208
2294
|
extendsTokenRanges: IExcerptTokenRange[];
|
|
2209
2295
|
}
|
|
2210
2296
|
|
|
@@ -2270,7 +2356,7 @@ export declare interface IApiNameMixinOptions extends IApiItemOptions {
|
|
|
2270
2356
|
* Constructor options for {@link ApiClass}.
|
|
2271
2357
|
* @public
|
|
2272
2358
|
*/
|
|
2273
|
-
export declare interface IApiNamespaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
2359
|
+
export declare interface IApiNamespaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
2274
2360
|
}
|
|
2275
2361
|
|
|
2276
2362
|
/**
|
|
@@ -2407,7 +2493,7 @@ export declare interface IApiStaticMixinOptions extends IApiItemOptions {
|
|
|
2407
2493
|
isStatic: boolean;
|
|
2408
2494
|
}
|
|
2409
2495
|
|
|
2410
|
-
declare interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson {
|
|
2496
|
+
declare interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson, IApiExportedMixinJson {
|
|
2411
2497
|
typeTokenRange: IExcerptTokenRange;
|
|
2412
2498
|
}
|
|
2413
2499
|
|
|
@@ -2415,7 +2501,7 @@ declare interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParame
|
|
|
2415
2501
|
* Constructor options for {@link ApiTypeAlias}.
|
|
2416
2502
|
* @public
|
|
2417
2503
|
*/
|
|
2418
|
-
export declare interface IApiTypeAliasOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions {
|
|
2504
|
+
export declare interface IApiTypeAliasOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions {
|
|
2419
2505
|
typeTokenRange: IExcerptTokenRange;
|
|
2420
2506
|
}
|
|
2421
2507
|
|
|
@@ -2441,7 +2527,7 @@ export declare interface IApiTypeParameterOptions {
|
|
|
2441
2527
|
defaultTypeTokenRange: IExcerptTokenRange;
|
|
2442
2528
|
}
|
|
2443
2529
|
|
|
2444
|
-
declare interface IApiVariableJson extends IApiDeclaredItemJson {
|
|
2530
|
+
declare interface IApiVariableJson extends IApiDeclaredItemJson, IApiExportedMixinJson {
|
|
2445
2531
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
2446
2532
|
}
|
|
2447
2533
|
|
|
@@ -2449,7 +2535,7 @@ declare interface IApiVariableJson extends IApiDeclaredItemJson {
|
|
|
2449
2535
|
* Constructor options for {@link ApiVariable}.
|
|
2450
2536
|
* @public
|
|
2451
2537
|
*/
|
|
2452
|
-
export declare interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions {
|
|
2538
|
+
export declare interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions, IApiExportedMixinOptions {
|
|
2453
2539
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
2454
2540
|
}
|
|
2455
2541
|
|
package/lib/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { IApiNameMixinOptions, ApiNameMixin } from './mixins/ApiNameMixin';
|
|
|
23
23
|
export { IApiOptionalMixinOptions, ApiOptionalMixin } from './mixins/ApiOptionalMixin';
|
|
24
24
|
export { IApiReadonlyMixinOptions, ApiReadonlyMixin } from './mixins/ApiReadonlyMixin';
|
|
25
25
|
export { IApiInitializerMixinOptions, ApiInitializerMixin } from './mixins/ApiInitializerMixin';
|
|
26
|
+
export { IApiExportedMixinOptions, ApiExportedMixin } from './mixins/ApiExportedMixin';
|
|
26
27
|
export { IFindApiItemsResult, IFindApiItemsMessage, FindApiItemsMessageId } from './mixins/IFindApiItemsResult';
|
|
27
28
|
export { ExcerptTokenKind, IExcerptTokenRange, IExcerptToken, ExcerptToken, Excerpt } from './mixins/Excerpt';
|
|
28
29
|
export { Constructor, PropertiesOf } from './mixins/Mixin';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGnF,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,wBAAwB,EACxB,iCAAiC,EACjC,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,6BAA6B,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AO,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.EnumMemberOrder = exports.ApiEnumMember = exports.ApiEnum = exports.ApiEntryPoint = exports.ApiConstructSignature = exports.ApiConstructor = exports.ApiClass = exports.ApiCallSignature = exports.Excerpt = exports.ExcerptToken = exports.ExcerptTokenKind = exports.FindApiItemsMessageId = exports.ApiInitializerMixin = exports.ApiReadonlyMixin = exports.ApiOptionalMixin = exports.ApiNameMixin = exports.ApiStaticMixin = exports.ApiReturnTypeMixin = exports.ApiReleaseTagMixin = exports.ApiProtectedMixin = exports.ApiItemContainerMixin = exports.ApiTypeParameterListMixin = exports.ApiParameterListMixin = exports.ApiPropertyItem = exports.ApiItem = exports.ApiItemKind = exports.ApiDocumentedItem = exports.ApiDeclaredItem = exports.ReleaseTag = exports.AedocDefinitions = void 0;
|
|
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.EnumMemberOrder = exports.ApiEnumMember = exports.ApiEnum = exports.ApiEntryPoint = exports.ApiConstructSignature = exports.ApiConstructor = exports.ApiClass = exports.ApiCallSignature = exports.Excerpt = exports.ExcerptToken = exports.ExcerptTokenKind = exports.FindApiItemsMessageId = exports.ApiExportedMixin = exports.ApiInitializerMixin = exports.ApiReadonlyMixin = exports.ApiOptionalMixin = exports.ApiNameMixin = exports.ApiStaticMixin = exports.ApiReturnTypeMixin = exports.ApiReleaseTagMixin = exports.ApiProtectedMixin = exports.ApiItemContainerMixin = exports.ApiTypeParameterListMixin = exports.ApiParameterListMixin = exports.ApiPropertyItem = exports.ApiItem = exports.ApiItemKind = exports.ApiDocumentedItem = exports.ApiDeclaredItem = exports.ReleaseTag = exports.AedocDefinitions = void 0;
|
|
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
|
|
@@ -48,6 +48,8 @@ var ApiReadonlyMixin_1 = require("./mixins/ApiReadonlyMixin");
|
|
|
48
48
|
Object.defineProperty(exports, "ApiReadonlyMixin", { enumerable: true, get: function () { return ApiReadonlyMixin_1.ApiReadonlyMixin; } });
|
|
49
49
|
var ApiInitializerMixin_1 = require("./mixins/ApiInitializerMixin");
|
|
50
50
|
Object.defineProperty(exports, "ApiInitializerMixin", { enumerable: true, get: function () { return ApiInitializerMixin_1.ApiInitializerMixin; } });
|
|
51
|
+
var ApiExportedMixin_1 = require("./mixins/ApiExportedMixin");
|
|
52
|
+
Object.defineProperty(exports, "ApiExportedMixin", { enumerable: true, get: function () { return ApiExportedMixin_1.ApiExportedMixin; } });
|
|
51
53
|
var IFindApiItemsResult_1 = require("./mixins/IFindApiItemsResult");
|
|
52
54
|
Object.defineProperty(exports, "FindApiItemsMessageId", { enumerable: true, get: function () { return IFindApiItemsResult_1.FindApiItemsMessageId; } });
|
|
53
55
|
var Excerpt_1 = require("./mixins/Excerpt");
|
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,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;AACnD,oEAAgG;AAA1D,0HAAA,mBAAmB,OAAA;AACzD,oEAIsC;AADpC,4HAAA,qBAAqB,OAAA;AAGvB,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,uDAA8F;AAA9D,8GAAA,aAAa,OAAA;AAAE,gHAAA,eAAe,OAAA;AAC9D,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';\nexport { IApiInitializerMixinOptions, ApiInitializerMixin } from './mixins/ApiInitializerMixin';\nexport {\n IFindApiItemsResult,\n IFindApiItemsMessage,\n FindApiItemsMessageId\n} from './mixins/IFindApiItemsResult';\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, EnumMemberOrder } 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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A,eAAe,OAAA;AAC9D,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';\nexport { IApiInitializerMixinOptions, ApiInitializerMixin } from './mixins/ApiInitializerMixin';\nexport { IApiExportedMixinOptions, ApiExportedMixin } from './mixins/ApiExportedMixin';\nexport {\n IFindApiItemsResult,\n IFindApiItemsMessage,\n FindApiItemsMessageId\n} from './mixins/IFindApiItemsResult';\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, EnumMemberOrder } 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"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';
|
|
2
|
+
/**
|
|
3
|
+
* Constructor options for {@link (IApiExportedMixinOptions:interface)}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IApiExportedMixinOptions extends IApiItemOptions {
|
|
7
|
+
isExported: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IApiExportedMixinJson extends IApiItemJson {
|
|
10
|
+
isExported: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The mixin base class for API items that can be exported.
|
|
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 ApiExportedMixin extends ApiItem {
|
|
28
|
+
/**
|
|
29
|
+
* Whether the declaration is exported from its parent item container (i.e. either an `ApiEntryPoint` or an
|
|
30
|
+
* `ApiNamespace`).
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Suppose `index.ts` is your entry point:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* // index.ts
|
|
37
|
+
*
|
|
38
|
+
* export class A {}
|
|
39
|
+
* class B {}
|
|
40
|
+
*
|
|
41
|
+
* namespace n {
|
|
42
|
+
* export class C {}
|
|
43
|
+
* class D {}
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* // file.ts
|
|
47
|
+
* export class E {}
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* Classes `A` and `C` are both exported, while classes `B`, `D`, and `E` are not. `E` is exported from its
|
|
51
|
+
* local file, but not from its parent item container (i.e. the entry point).
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
readonly isExported: boolean;
|
|
55
|
+
/** @override */
|
|
56
|
+
serializeInto(jsonObject: Partial<IApiItemJson>): void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Mixin function for {@link (ApiExportedMixin:interface)}.
|
|
60
|
+
*
|
|
61
|
+
* @param baseClass - The base class to be extended
|
|
62
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiExportedMixin:interface)} functionality.
|
|
63
|
+
*
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export declare function ApiExportedMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiExportedMixin);
|
|
67
|
+
/**
|
|
68
|
+
* Static members for {@link (ApiExportedMixin:interface)}.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare namespace ApiExportedMixin {
|
|
72
|
+
/**
|
|
73
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiExportedMixin` mixin.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
*
|
|
77
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
78
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
79
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
80
|
+
*/
|
|
81
|
+
function isBaseClassOf(apiItem: ApiItem): apiItem is ApiExportedMixin;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=ApiExportedMixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiExportedMixin.d.ts","sourceRoot":"","sources":["../../src/mixins/ApiExportedMixin.ts"],"names":[],"mappings":"AAIA,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;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,gBAAgB;IAChB,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,SAAS,mBAAmB,EACrE,SAAS,EAAE,UAAU,GAEpB,UAAU,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,gBAAgB,CAAC,CAyCzD;AAED;;;GAGG;AACH,yBAAiB,gBAAgB,CAAC;IAChC;;;;;;;;OAQG;IACH,SAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,gBAAgB,CAE3E;CACF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.ApiExportedMixin = void 0;
|
|
6
|
+
const DeclarationReference_1 = require("@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference");
|
|
7
|
+
const _isExported = Symbol('ApiExportedMixin._isExported');
|
|
8
|
+
/**
|
|
9
|
+
* Mixin function for {@link (ApiExportedMixin:interface)}.
|
|
10
|
+
*
|
|
11
|
+
* @param baseClass - The base class to be extended
|
|
12
|
+
* @returns A child class that extends baseClass, adding the {@link (ApiExportedMixin:interface)} functionality.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
function ApiExportedMixin(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[_isExported] = options.isExported;
|
|
25
|
+
}
|
|
26
|
+
/** @override */
|
|
27
|
+
static onDeserializeInto(options, context, jsonObject) {
|
|
28
|
+
baseClass.onDeserializeInto(options, context, jsonObject);
|
|
29
|
+
const declarationReference = DeclarationReference_1.DeclarationReference.parse(jsonObject.canonicalReference);
|
|
30
|
+
options.isExported = declarationReference.navigation === "." /* Navigation.Exports */;
|
|
31
|
+
}
|
|
32
|
+
get isExported() {
|
|
33
|
+
return this[_isExported];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The `isExported` property is intentionally not serialized because the information is already present
|
|
37
|
+
* in the item's `canonicalReference`.
|
|
38
|
+
* @override
|
|
39
|
+
*/
|
|
40
|
+
serializeInto(jsonObject) {
|
|
41
|
+
super.serializeInto(jsonObject);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return MixedClass;
|
|
45
|
+
}
|
|
46
|
+
exports.ApiExportedMixin = ApiExportedMixin;
|
|
47
|
+
/**
|
|
48
|
+
* Static members for {@link (ApiExportedMixin:interface)}.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
(function (ApiExportedMixin) {
|
|
52
|
+
/**
|
|
53
|
+
* A type guard that tests whether the specified `ApiItem` subclass extends the `ApiExportedMixin` mixin.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
*
|
|
57
|
+
* The JavaScript `instanceof` operator cannot be used to test for mixin inheritance, because each invocation of
|
|
58
|
+
* the mixin function produces a different subclass. (This could be mitigated by `Symbol.hasInstance`, however
|
|
59
|
+
* the TypeScript type system cannot invoke a runtime test.)
|
|
60
|
+
*/
|
|
61
|
+
function isBaseClassOf(apiItem) {
|
|
62
|
+
return apiItem.hasOwnProperty(_isExported);
|
|
63
|
+
}
|
|
64
|
+
ApiExportedMixin.isBaseClassOf = isBaseClassOf;
|
|
65
|
+
})(ApiExportedMixin = exports.ApiExportedMixin || (exports.ApiExportedMixin = {}));
|
|
66
|
+
//# sourceMappingURL=ApiExportedMixin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApiExportedMixin.js","sourceRoot":"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,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 { DeclarationReference, Navigation } from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { ApiItem, IApiItemJson, IApiItemConstructor, IApiItemOptions } from '../items/ApiItem';\nimport { DeserializerContext } from '../model/DeserializerContext';\n\n/**\n * Constructor options for {@link (IApiExportedMixinOptions:interface)}.\n * @public\n */\nexport interface IApiExportedMixinOptions extends IApiItemOptions {\n isExported: boolean;\n}\n\nexport interface IApiExportedMixinJson extends IApiItemJson {\n isExported: boolean;\n}\n\nconst _isExported: unique symbol = Symbol('ApiExportedMixin._isExported');\n\n/**\n * The mixin base class for API items that can be exported.\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 ApiExportedMixin extends ApiItem {\n /**\n * Whether the declaration is exported from its parent item container (i.e. either an `ApiEntryPoint` or an\n * `ApiNamespace`).\n *\n * @remarks\n * Suppose `index.ts` is your entry point:\n *\n * ```ts\n * // index.ts\n *\n * export class A {}\n * class B {}\n *\n * namespace n {\n * export class C {}\n * class D {}\n * }\n *\n * // file.ts\n * export class E {}\n * ```\n *\n * Classes `A` and `C` are both exported, while classes `B`, `D`, and `E` are not. `E` is exported from its\n * local file, but not from its parent item container (i.e. the entry point).\n *\n */\n readonly isExported: boolean;\n\n /** @override */\n serializeInto(jsonObject: Partial<IApiItemJson>): void;\n}\n\n/**\n * Mixin function for {@link (ApiExportedMixin:interface)}.\n *\n * @param baseClass - The base class to be extended\n * @returns A child class that extends baseClass, adding the {@link (ApiExportedMixin:interface)} functionality.\n *\n * @public\n */\nexport function ApiExportedMixin<TBaseClass extends IApiItemConstructor>(\n baseClass: TBaseClass\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): TBaseClass & (new (...args: any[]) => ApiExportedMixin) {\n class MixedClass extends baseClass implements ApiExportedMixin {\n public [_isExported]: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public constructor(...args: any[]) {\n super(...args);\n\n const options: IApiExportedMixinOptions = args[0];\n this[_isExported] = options.isExported;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiExportedMixinOptions>,\n context: DeserializerContext,\n jsonObject: IApiExportedMixinJson\n ): void {\n baseClass.onDeserializeInto(options, context, jsonObject);\n\n const declarationReference: DeclarationReference = DeclarationReference.parse(\n jsonObject.canonicalReference\n );\n options.isExported = declarationReference.navigation === Navigation.Exports;\n }\n\n public get isExported(): boolean {\n return this[_isExported];\n }\n\n /**\n * The `isExported` property is intentionally not serialized because the information is already present\n * in the item's `canonicalReference`.\n * @override\n */\n public serializeInto(jsonObject: Partial<IApiExportedMixinJson>): void {\n super.serializeInto(jsonObject);\n }\n }\n\n return MixedClass;\n}\n\n/**\n * Static members for {@link (ApiExportedMixin:interface)}.\n * @public\n */\nexport namespace ApiExportedMixin {\n /**\n * A type guard that tests whether the specified `ApiItem` subclass extends the `ApiExportedMixin` 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 ApiExportedMixin {\n return apiItem.hasOwnProperty(_isExported);\n }\n}\n"]}
|
package/lib/model/ApiClass.d.ts
CHANGED
|
@@ -8,19 +8,20 @@ import { HeritageType } from './HeritageType';
|
|
|
8
8
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
9
9
|
import { ApiTypeParameterListMixin, IApiTypeParameterListMixinOptions, IApiTypeParameterListMixinJson } from '../mixins/ApiTypeParameterListMixin';
|
|
10
10
|
import { DeserializerContext } from './DeserializerContext';
|
|
11
|
+
import { IApiExportedMixinJson, IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
11
12
|
/**
|
|
12
13
|
* Constructor options for {@link ApiClass}.
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
|
-
export interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions {
|
|
16
|
+
export interface IApiClassOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions {
|
|
16
17
|
extendsTokenRange: IExcerptTokenRange | undefined;
|
|
17
18
|
implementsTokenRanges: IExcerptTokenRange[];
|
|
18
19
|
}
|
|
19
|
-
export interface IApiClassJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson {
|
|
20
|
+
export interface IApiClassJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson, IApiExportedMixinJson {
|
|
20
21
|
extendsTokenRange?: IExcerptTokenRange;
|
|
21
22
|
implementsTokenRanges: IExcerptTokenRange[];
|
|
22
23
|
}
|
|
23
|
-
declare const ApiClass_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
24
|
+
declare const ApiClass_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
24
25
|
/**
|
|
25
26
|
* Represents a TypeScript class declaration.
|
|
26
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClass.d.ts","sourceRoot":"","sources":["../../src/model/ApiClass.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,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiClass.d.ts","sourceRoot":"","sources":["../../src/model/ApiClass.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,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAA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gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,aAAa,CAAC,YAAY,CAAC,CAExD;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAW9D,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
|
package/lib/model/ApiClass.js
CHANGED
|
@@ -11,6 +11,7 @@ const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
|
11
11
|
const HeritageType_1 = require("./HeritageType");
|
|
12
12
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
13
13
|
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
|
|
14
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
14
15
|
/**
|
|
15
16
|
* Represents a TypeScript class declaration.
|
|
16
17
|
*
|
|
@@ -27,7 +28,7 @@ const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin
|
|
|
27
28
|
*
|
|
28
29
|
* @public
|
|
29
30
|
*/
|
|
30
|
-
class ApiClass extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
31
|
+
class ApiClass extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem))))) {
|
|
31
32
|
constructor(options) {
|
|
32
33
|
super(options);
|
|
33
34
|
this._implementsTypes = [];
|
|
@@ -76,8 +77,9 @@ class ApiClass extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, Ap
|
|
|
76
77
|
/** @beta @override */
|
|
77
78
|
buildCanonicalReference() {
|
|
78
79
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
80
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
79
81
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
80
|
-
.addNavigationStep(
|
|
82
|
+
.addNavigationStep(navigation, nameComponent)
|
|
81
83
|
.withMeaning("class" /* Meaning.Class */);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiClass.js","sourceRoot":"","sources":["../../src/model/ApiClass.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAA0G;AAC1G,2EAAuG;AACvG,qEAA8F;AAE9F,iDAA8C;AAC9C,yDAA4E;AAC5E,mFAI6C;
|
|
1
|
+
{"version":3,"file":"ApiClass.js","sourceRoot":"","sources":["../../src/model/ApiClass.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAA0G;AAC1G,2EAAuG;AACvG,qEAA8F;AAE9F,iDAA8C;AAC9C,yDAA4E;AAC5E,mFAI6C;AAE7C,iEAIoC;AAyBpC;;;;;;;;;;;;;;;GAeG;AACH,MAAa,QAAS,SAAQ,IAAA,6CAAqB,EACjD,IAAA,2BAAY,EAAC,IAAA,qDAAyB,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CAC/F;IAQC,YAAmB,OAAyB;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QAHA,q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AW,EAAE;YACpB,UAAU,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC;SACpE;QAED,UAAU,CAAC,qBAAqB,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3F,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,6BAAe,CAAC;IAChC,CAAC;CACF;AA7ED,4BA6EC","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 { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { IExcerptTokenRange } from '../mixins/Excerpt';\nimport { HeritageType } from './HeritageType';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n ApiTypeParameterListMixin,\n IApiTypeParameterListMixinOptions,\n IApiTypeParameterListMixinJson\n} from '../mixins/ApiTypeParameterListMixin';\nimport { DeserializerContext } from './DeserializerContext';\nimport {\n IApiExportedMixinJson,\n IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiClass}.\n * @public\n */\nexport interface IApiClassOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n extendsTokenRange: IExcerptTokenRange | undefined;\n implementsTokenRanges: IExcerptTokenRange[];\n}\n\nexport interface IApiClassJson\n extends IApiDeclaredItemJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n extendsTokenRange?: IExcerptTokenRange;\n implementsTokenRanges: IExcerptTokenRange[];\n}\n\n/**\n * Represents a TypeScript class 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 * `ApiClass` represents a TypeScript declaration such as this:\n *\n * ```ts\n * export class X { }\n * ```\n *\n * @public\n */\nexport class ApiClass extends ApiItemContainerMixin(\n ApiNameMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem))))\n) {\n /**\n * The base class that this class inherits from (using the `extends` keyword), or undefined if there is no base class.\n */\n public readonly extendsType: HeritageType | undefined;\n\n private readonly _implementsTypes: HeritageType[] = [];\n\n public constructor(options: IApiClassOptions) {\n super(options);\n\n if (options.extendsTokenRange) {\n this.extendsType = new HeritageType(this.buildExcerpt(options.extendsTokenRange));\n } else {\n this.extendsType = undefined;\n }\n\n for (const implementsTokenRange of options.implementsTokenRanges) {\n this._implementsTypes.push(new HeritageType(this.buildExcerpt(implementsTokenRange)));\n }\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Class}`;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiClassOptions>,\n context: DeserializerContext,\n jsonObject: IApiClassJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.extendsTokenRange = jsonObject.extendsTokenRange;\n options.implementsTokenRanges = jsonObject.implementsTokenRanges;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Class;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiClass.getContainerKey(this.name);\n }\n\n /**\n * The list of interfaces that this class implements using the `implements` keyword.\n */\n public get implementsTypes(): ReadonlyArray<HeritageType> {\n return this._implementsTypes;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiClassJson>): void {\n super.serializeInto(jsonObject);\n\n // Note that JSON does not support the \"undefined\" value, so we simply omit the field entirely if it is undefined\n if (this.extendsType) {\n jsonObject.extendsTokenRange = this.extendsType.excerpt.tokenRange;\n }\n\n jsonObject.implementsTokenRanges = this.implementsTypes.map((x) => x.excerpt.tokenRange);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Class);\n }\n}\n"]}
|
package/lib/model/ApiEnum.d.ts
CHANGED
|
@@ -5,13 +5,14 @@ import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiRel
|
|
|
5
5
|
import { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';
|
|
6
6
|
import { ApiEnumMember } from './ApiEnumMember';
|
|
7
7
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
8
|
+
import { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
8
9
|
/**
|
|
9
10
|
* Constructor options for {@link ApiEnum}.
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
|
-
export interface IApiEnumOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
13
|
+
export interface IApiEnumOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
13
14
|
}
|
|
14
|
-
declare const ApiEnum_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
15
|
+
declare const ApiEnum_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
15
16
|
/**
|
|
16
17
|
* Represents a TypeScript enum declaration.
|
|
17
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiEnum.d.ts","sourceRoot":"","sources":["../../src/model/ApiEnum.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiEnum.d.ts","sourceRoot":"","sources":["../../src/model/ApiEnum.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,eACf,SAAQ,6BAA6B,EACnC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB;CAAG;;AAE/B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,OAAQ,SAAQ,YAE5B;gBACoB,OAAO,EAAE,eAAe;WAI7B,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAInD,gBAAgB;IAChB,IAAW,IAAI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,OAAO,IAAI,aAAa,CAAC,aAAa,CAAC,CAEjD;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,gBAAgB;IACT,SAAS,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAO7C,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
|
package/lib/model/ApiEnum.js
CHANGED
|
@@ -9,6 +9,7 @@ const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
|
9
9
|
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
10
10
|
const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
|
|
11
11
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
12
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
12
13
|
/**
|
|
13
14
|
* Represents a TypeScript enum declaration.
|
|
14
15
|
*
|
|
@@ -29,7 +30,7 @@ const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
|
29
30
|
*
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
32
|
-
class ApiEnum extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
|
|
33
|
+
class ApiEnum extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
33
34
|
constructor(options) {
|
|
34
35
|
super(options);
|
|
35
36
|
}
|
|
@@ -58,8 +59,9 @@ class ApiEnum extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, Api
|
|
|
58
59
|
/** @beta @override */
|
|
59
60
|
buildCanonicalReference() {
|
|
60
61
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
62
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
61
63
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
62
|
-
.addNavigationStep(
|
|
64
|
+
.addNavigationStep(navigation, nameComponent)
|
|
63
65
|
.withMeaning("enum" /* Meaning.Enum */);
|
|
64
66
|
}
|
|
65
67
|
}
|
package/lib/model/ApiEnum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiEnum.js","sourceRoot":"","sources":["../../src/model/ApiEnum.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,k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CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,2BAAc,CAAC;IAC/B,CAAC;CACF;AA1CD,0BA0CC","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 } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { ApiEnumMember } from './ApiEnumMember';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiEnum}.\n * @public\n */\nexport interface IApiEnumOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript enum 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 * `ApiEnum` represents an enum declaration such as `FontSizes` in the example below:\n *\n * ```ts\n * export enum FontSizes {\n * Small = 100,\n * Medium = 200,\n * Large = 300\n * }\n * ```\n *\n * @public\n */\nexport class ApiEnum extends ApiItemContainerMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiEnumOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Enum}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Enum;\n }\n\n /** @override */\n public get members(): ReadonlyArray<ApiEnumMember> {\n return super.members as ReadonlyArray<ApiEnumMember>;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiEnum.getContainerKey(this.name);\n }\n\n /** @override */\n public addMember(member: ApiEnumMember): void {\n if (member.kind !== ApiItemKind.EnumMember) {\n throw new Error('Only ApiEnumMember objects can be added to an ApiEnum');\n }\n super.addMember(member);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Enum);\n }\n}\n"]}
|
|
@@ -6,13 +6,14 @@ import { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiRel
|
|
|
6
6
|
import { IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';
|
|
7
7
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
8
8
|
import { IApiTypeParameterListMixinOptions, ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
9
|
+
import { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
9
10
|
/**
|
|
10
11
|
* Constructor options for {@link ApiFunction}.
|
|
11
12
|
* @public
|
|
12
13
|
*/
|
|
13
|
-
export interface IApiFunctionOptions extends IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions {
|
|
14
|
+
export interface IApiFunctionOptions extends IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiReturnTypeMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
14
15
|
}
|
|
15
|
-
declare const ApiFunction_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
16
|
+
declare const ApiFunction_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReturnTypeMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiParameterListMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
16
17
|
/**
|
|
17
18
|
* Represents a TypeScript function declaration.
|
|
18
19
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiFunction.d.ts","sourceRoot":"","sources":["../../src/model/ApiFunction.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAA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.js
CHANGED
|
@@ -11,6 +11,7 @@ const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
|
11
11
|
const ApiReturnTypeMixin_1 = require("../mixins/ApiReturnTypeMixin");
|
|
12
12
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
13
13
|
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
|
|
14
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
14
15
|
/**
|
|
15
16
|
* Represents a TypeScript function declaration.
|
|
16
17
|
*
|
|
@@ -32,7 +33,7 @@ const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin
|
|
|
32
33
|
*
|
|
33
34
|
* @public
|
|
34
35
|
*/
|
|
35
|
-
class ApiFunction extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReturnTypeMixin_1.ApiReturnTypeMixin)(ApiDeclaredItem_1.ApiDeclaredItem))))) {
|
|
36
|
+
class ApiFunction extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiParameterListMixin_1.ApiParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReturnTypeMixin_1.ApiReturnTypeMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))))) {
|
|
36
37
|
constructor(options) {
|
|
37
38
|
super(options);
|
|
38
39
|
}
|
|
@@ -50,8 +51,9 @@ class ApiFunction extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterL
|
|
|
50
51
|
/** @beta @override */
|
|
51
52
|
buildCanonicalReference() {
|
|
52
53
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
54
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
53
55
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
54
|
-
.addNavigationStep(
|
|
56
|
+
.addNavigationStep(navigation, nameComponent)
|
|
55
57
|
.withMeaning("function" /* Meaning.Function */)
|
|
56
58
|
.withOverloadIndex(this.overloadIndex);
|
|
57
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiFunction.js","sourceRoot":"","sources":["../../src/model/ApiFunction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAAoF;AACpF,2EAAuG;AACvG,qEAA8F;AAC9F,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAG6C;
|
|
1
|
+
{"version":3,"file":"ApiFunction.js","sourceRoot":"","sources":["../../src/model/ApiFunction.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,8DAAoF;AACpF,2EAAuG;AACvG,qEAA8F;AAC9F,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAG6C;AAC7C,iEAAwF;AAexF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,WAAY,SAAQ,IAAA,2BAAY,EAC3C,IAAA,qDAAyB,EACvB,IAAA,6CAAqB,EAAC,IAAA,uCAAkB,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CACjG,CACF;IACC,YAAmB,OAA4B;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY,EAAE,aAAqB;QAC/D,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,QAAQ,IAAI,aAAa,EAAE,CAAC;IAC5D,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,aAAa,CAAC,CAAC;IACpE,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,mCAAkB;aAC7B,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;CACF;AAhCD,kCAgCC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n Component\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 { IApiReleaseTagMixinOptions, ApiReleaseTagMixin } from '../mixins/ApiReleaseTagMixin';\nimport { IApiReturnTypeMixinOptions, ApiReturnTypeMixin } from '../mixins/ApiReturnTypeMixin';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n IApiTypeParameterListMixinOptions,\n ApiTypeParameterListMixin\n} from '../mixins/ApiTypeParameterListMixin';\nimport { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiFunction}.\n * @public\n */\nexport interface IApiFunctionOptions\n extends IApiNameMixinOptions,\n IApiTypeParameterListMixinOptions,\n IApiParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReturnTypeMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript function 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 * `ApiFunction` represents a TypeScript declaration such as this example:\n *\n * ```ts\n * export function getAverage(x: number, y: number): number {\n * return (x + y) / 2.0;\n * }\n * ```\n *\n * Functions are exported by an entry point module or by a namespace. Compare with {@link ApiMethod}, which\n * represents a function that is a member of a class.\n *\n * @public\n */\nexport class ApiFunction extends ApiNameMixin(\n ApiTypeParameterListMixin(\n ApiParameterListMixin(ApiReleaseTagMixin(ApiReturnTypeMixin(ApiExportedMixin(ApiDeclaredItem))))\n )\n) {\n public constructor(options: IApiFunctionOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string, overloadIndex: number): string {\n return `${name}|${ApiItemKind.Function}|${overloadIndex}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Function;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiFunction.getContainerKey(this.name, this.overloadIndex);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Function)\n .withOverloadIndex(this.overloadIndex);\n }\n}\n"]}
|
|
@@ -8,17 +8,18 @@ import { HeritageType } from './HeritageType';
|
|
|
8
8
|
import { IApiNameMixinOptions, ApiNameMixin, IApiNameMixinJson } from '../mixins/ApiNameMixin';
|
|
9
9
|
import { IApiTypeParameterListMixinOptions, IApiTypeParameterListMixinJson, ApiTypeParameterListMixin } from '../mixins/ApiTypeParameterListMixin';
|
|
10
10
|
import { DeserializerContext } from './DeserializerContext';
|
|
11
|
+
import { IApiExportedMixinJson, IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
11
12
|
/**
|
|
12
13
|
* Constructor options for {@link ApiInterface}.
|
|
13
14
|
* @public
|
|
14
15
|
*/
|
|
15
|
-
export interface IApiInterfaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
16
|
+
export interface IApiInterfaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiTypeParameterListMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
16
17
|
extendsTokenRanges: IExcerptTokenRange[];
|
|
17
18
|
}
|
|
18
|
-
export interface IApiInterfaceJson extends IApiItemContainerJson, IApiNameMixinJson, IApiTypeParameterListMixinJson, IApiReleaseTagMixinJson, IApiDeclaredItemJson {
|
|
19
|
+
export interface IApiInterfaceJson extends IApiItemContainerJson, IApiNameMixinJson, IApiTypeParameterListMixinJson, IApiReleaseTagMixinJson, IApiDeclaredItemJson, IApiExportedMixinJson {
|
|
19
20
|
extendsTokenRanges: IExcerptTokenRange[];
|
|
20
21
|
}
|
|
21
|
-
declare const ApiInterface_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
22
|
+
declare const ApiInterface_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiTypeParameterListMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
22
23
|
/**
|
|
23
24
|
* Represents a TypeScript class declaration.
|
|
24
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiInterface.d.ts","sourceRoot":"","sources":["../../src/model/ApiInterface.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OAAO,EACL,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EACL,iCAAiC,EACjC,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiInterface.d.ts","sourceRoot":"","sources":["../../src/model/ApiInterface.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC1G,OA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MAAM,CAEhC;IAED;;OAEG;IACH,IAAW,YAAY,IAAI,aAAa,CAAC,YAAY,CAAC,CAErD;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAMlE,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
|
|
@@ -11,6 +11,7 @@ const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
|
11
11
|
const HeritageType_1 = require("./HeritageType");
|
|
12
12
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
13
13
|
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
|
|
14
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
14
15
|
/**
|
|
15
16
|
* Represents a TypeScript class declaration.
|
|
16
17
|
*
|
|
@@ -28,7 +29,7 @@ const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin
|
|
|
28
29
|
*
|
|
29
30
|
* @public
|
|
30
31
|
*/
|
|
31
|
-
class ApiInterface extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
32
|
+
class ApiInterface extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem))))) {
|
|
32
33
|
constructor(options) {
|
|
33
34
|
super(options);
|
|
34
35
|
this._extendsTypes = [];
|
|
@@ -66,8 +67,9 @@ class ApiInterface extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0
|
|
|
66
67
|
/** @beta @override */
|
|
67
68
|
buildCanonicalReference() {
|
|
68
69
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
70
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
69
71
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
70
|
-
.addNavigationStep(
|
|
72
|
+
.addNavigationStep(navigation, nameComponent)
|
|
71
73
|
.withMeaning("interface" /* Meaning.Interface */);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiInterface.js","sourceRoot":"","sources":["../../src/model/ApiInterface.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,2EAIyC;AACzC,8DAA0G;AAC1G,qEAIsC;AAEtC,iDAA8C;AAC9C,yDAA+F;AAC/F,mFAI6C;
|
|
1
|
+
{"version":3,"file":"ApiInterface.js","sourceRoot":"","sources":["../../src/model/ApiInterface.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,2EAIyC;AACzC,8DAA0G;AAC1G,qEAIsC;AAEtC,iDAA8C;AAC9C,yDAA+F;AAC/F,mFAI6C;AAE7C,iEAIoC;AA0BpC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,YAAa,SAAQ,IAAA,6CAAqB,EACrD,IAAA,2BAAY,EAAC,IAAA,qDAAyB,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CAAC,CAC/F;IAGC,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;QAHA,kBAAa,GAAmB,EAAE,CAAC;QAKlD,KAAK,MAAM,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,EAAE;YAC1D,IAAI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AM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,qCAAmB,CAAC;IACpC,CAAC;CACF;AA5DD,oCA4DC","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 {\n ApiItemContainerMixin,\n IApiItemContainerMixinOptions,\n IApiItemContainerJson\n} from '../mixins/ApiItemContainerMixin';\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\nimport {\n IApiReleaseTagMixinOptions,\n ApiReleaseTagMixin,\n IApiReleaseTagMixinJson\n} from '../mixins/ApiReleaseTagMixin';\nimport { IExcerptTokenRange } from '../mixins/Excerpt';\nimport { HeritageType } from './HeritageType';\nimport { IApiNameMixinOptions, ApiNameMixin, IApiNameMixinJson } from '../mixins/ApiNameMixin';\nimport {\n IApiTypeParameterListMixinOptions,\n IApiTypeParameterListMixinJson,\n ApiTypeParameterListMixin\n} from '../mixins/ApiTypeParameterListMixin';\nimport { DeserializerContext } from './DeserializerContext';\nimport {\n IApiExportedMixinJson,\n IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiInterface}.\n * @public\n */\nexport interface IApiInterfaceOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiTypeParameterListMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {\n extendsTokenRanges: IExcerptTokenRange[];\n}\n\nexport interface IApiInterfaceJson\n extends IApiItemContainerJson,\n IApiNameMixinJson,\n IApiTypeParameterListMixinJson,\n IApiReleaseTagMixinJson,\n IApiDeclaredItemJson,\n IApiExportedMixinJson {\n extendsTokenRanges: IExcerptTokenRange[];\n}\n\n/**\n * Represents a TypeScript class 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 * `ApiInterface` represents a TypeScript declaration such as this:\n *\n * ```ts\n * export interface X extends Y {\n * }\n * ```\n *\n * @public\n */\nexport class ApiInterface extends ApiItemContainerMixin(\n ApiNameMixin(ApiTypeParameterListMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem))))\n) {\n private readonly _extendsTypes: HeritageType[] = [];\n\n public constructor(options: IApiInterfaceOptions) {\n super(options);\n\n for (const extendsTokenRange of options.extendsTokenRanges) {\n this._extendsTypes.push(new HeritageType(this.buildExcerpt(extendsTokenRange)));\n }\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Interface}`;\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiInterfaceOptions>,\n context: DeserializerContext,\n jsonObject: IApiInterfaceJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.extendsTokenRanges = jsonObject.extendsTokenRanges;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Interface;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiInterface.getContainerKey(this.name);\n }\n\n /**\n * The list of base interfaces that this interface inherits from using the `extends` keyword.\n */\n public get extendsTypes(): ReadonlyArray<HeritageType> {\n return this._extendsTypes;\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiInterfaceJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.extendsTokenRanges = this.extendsTypes.map((x) => x.excerpt.tokenRange);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Interface);\n }\n}\n"]}
|
|
@@ -4,13 +4,14 @@ import { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/
|
|
|
4
4
|
import { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';
|
|
5
5
|
import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';
|
|
6
6
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
|
+
import { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
7
8
|
/**
|
|
8
9
|
* Constructor options for {@link ApiClass}.
|
|
9
10
|
* @public
|
|
10
11
|
*/
|
|
11
|
-
export interface IApiNamespaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions {
|
|
12
|
+
export interface IApiNamespaceOptions extends IApiItemContainerMixinOptions, IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiExportedMixinOptions {
|
|
12
13
|
}
|
|
13
|
-
declare const ApiNamespace_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
14
|
+
declare const ApiNamespace_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiItemContainerMixin);
|
|
14
15
|
/**
|
|
15
16
|
* Represents a TypeScript namespace declaration.
|
|
16
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiNamespace.d.ts","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE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uBAAuB,IAAI,oBAAoB;CAOvD"}
|
|
@@ -9,6 +9,7 @@ const ApiItemContainerMixin_1 = require("../mixins/ApiItemContainerMixin");
|
|
|
9
9
|
const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
10
10
|
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
11
11
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
12
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
12
13
|
/**
|
|
13
14
|
* Represents a TypeScript namespace declaration.
|
|
14
15
|
*
|
|
@@ -31,7 +32,7 @@ const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
|
31
32
|
*
|
|
32
33
|
* @public
|
|
33
34
|
*/
|
|
34
|
-
class ApiNamespace extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
|
|
35
|
+
class ApiNamespace extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
35
36
|
constructor(options) {
|
|
36
37
|
super(options);
|
|
37
38
|
}
|
|
@@ -49,8 +50,9 @@ class ApiNamespace extends (0, ApiItemContainerMixin_1.ApiItemContainerMixin)((0
|
|
|
49
50
|
/** @beta @override */
|
|
50
51
|
buildCanonicalReference() {
|
|
51
52
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
53
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
52
54
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
53
|
-
.addNavigationStep(
|
|
55
|
+
.addNavigationStep(navigation, nameComponent)
|
|
54
56
|
.withMeaning("namespace" /* Meaning.Namespace */);
|
|
55
57
|
}
|
|
56
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiNamespace.js","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,2EAAuG;AACvG,8DAAoF;AACpF,qEAA8F;AAC9F,yDAA4E;
|
|
1
|
+
{"version":3,"file":"ApiNamespace.js","sourceRoot":"","sources":["../../src/model/ApiNamespace.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AACjE,8CAA+C;AAC/C,2EAAuG;AACvG,8DAAoF;AACpF,qEAA8F;AAC9F,yDAA4E;AAC5E,iEAAwF;AAaxF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAa,YAAa,SAAQ,IAAA,6CAAqB,EACrD,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACpE;IACC,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,SAAS,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,qCAAmB,CAAC;IACpC,CAAC;CACF;AA7BD,oCA6BC","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 { ApiItemContainerMixin, IApiItemContainerMixinOptions } from '../mixins/ApiItemContainerMixin';\nimport { IApiDeclaredItemOptions, ApiDeclaredItem } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport { IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiClass}.\n * @public\n */\nexport interface IApiNamespaceOptions\n extends IApiItemContainerMixinOptions,\n IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiExportedMixinOptions {}\n\n/**\n * Represents a TypeScript namespace 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 * `ApiNamespace` represents a TypeScript declaration such `X` or `Y` in this example:\n *\n * ```ts\n * export namespace X {\n * export namespace Y {\n * export interface IWidget {\n * render(): void;\n * }\n * }\n * }\n * ```\n *\n * @public\n */\nexport class ApiNamespace extends ApiItemContainerMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n public constructor(options: IApiNamespaceOptions) {\n super(options);\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Namespace}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Namespace;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiNamespace.getContainerKey(this.name);\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Namespace);\n }\n}\n"]}
|
|
@@ -6,17 +6,18 @@ import { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiRel
|
|
|
6
6
|
import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
7
7
|
import { ApiTypeParameterListMixin, IApiTypeParameterListMixinOptions, IApiTypeParameterListMixinJson } from '../mixins/ApiTypeParameterListMixin';
|
|
8
8
|
import { DeserializerContext } from './DeserializerContext';
|
|
9
|
+
import { IApiExportedMixinJson, IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
9
10
|
/**
|
|
10
11
|
* Constructor options for {@link ApiTypeAlias}.
|
|
11
12
|
* @public
|
|
12
13
|
*/
|
|
13
|
-
export interface IApiTypeAliasOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions {
|
|
14
|
+
export interface IApiTypeAliasOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions, IApiExportedMixinOptions {
|
|
14
15
|
typeTokenRange: IExcerptTokenRange;
|
|
15
16
|
}
|
|
16
|
-
export interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson {
|
|
17
|
+
export interface IApiTypeAliasJson extends IApiDeclaredItemJson, IApiTypeParameterListMixinJson, IApiExportedMixinJson {
|
|
17
18
|
typeTokenRange: IExcerptTokenRange;
|
|
18
19
|
}
|
|
19
|
-
declare const ApiTypeAlias_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiTypeParameterListMixin);
|
|
20
|
+
declare const ApiTypeAlias_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin) & (new (...args: any[]) => ApiTypeParameterListMixin);
|
|
20
21
|
/**
|
|
21
22
|
* Represents a TypeScript type alias declaration.
|
|
22
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiTypeAlias.d.ts","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAIrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAChE,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,EACL,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ApiTypeAlias.d.ts","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":"AAGA,OAAO,E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AI,IAAI,WAAW,CAE7B;IAED,gBAAgB;IAChB,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAMlE,sBAAsB;IACf,uBAAuB,IAAI,oBAAoB;CAOvD"}
|
|
@@ -9,6 +9,7 @@ const ApiDeclaredItem_1 = require("../items/ApiDeclaredItem");
|
|
|
9
9
|
const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
10
10
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
11
11
|
const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin");
|
|
12
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
12
13
|
/**
|
|
13
14
|
* Represents a TypeScript type alias declaration.
|
|
14
15
|
*
|
|
@@ -35,7 +36,7 @@ const ApiTypeParameterListMixin_1 = require("../mixins/ApiTypeParameterListMixin
|
|
|
35
36
|
*
|
|
36
37
|
* @public
|
|
37
38
|
*/
|
|
38
|
-
class ApiTypeAlias extends (0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)(ApiDeclaredItem_1.ApiDeclaredItem))) {
|
|
39
|
+
class ApiTypeAlias extends (0, ApiTypeParameterListMixin_1.ApiTypeParameterListMixin)((0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
39
40
|
constructor(options) {
|
|
40
41
|
super(options);
|
|
41
42
|
this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);
|
|
@@ -64,8 +65,9 @@ class ApiTypeAlias extends (0, ApiTypeParameterListMixin_1.ApiTypeParameterListM
|
|
|
64
65
|
/** @beta @override */
|
|
65
66
|
buildCanonicalReference() {
|
|
66
67
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
68
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
67
69
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
68
|
-
.addNavigationStep(
|
|
70
|
+
.addNavigationStep(navigation, nameComponent)
|
|
69
71
|
.withMeaning("type" /* Meaning.TypeAlias */);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiTypeAlias.js","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAI6C;
|
|
1
|
+
{"version":3,"file":"ApiTypeAlias.js","sourceRoot":"","sources":["../../src/model/ApiTypeAlias.ts"],"names":[],"mappings":";AAAA,4FAA4F;AAC5F,2DAA2D;;;AAE3D,kGAKiE;AAEjE,8CAA+C;AAC/C,8DAA0G;AAC1G,qEAA8F;AAC9F,yDAA4E;AAC5E,mFAI6C;AAE7C,iEAIoC;AAsBpC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,YAAa,SAAQ,IAAA,qDAAyB,EACzD,IAAA,2BAAY,EAAC,IAAA,uCAAkB,EAAC,IAAA,mCAAgB,EAAC,iCAAe,CAAC,CAAC,CAAC,CACpE;IAcC,YAAmB,OAA6B;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/D,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,iBAAiB,CAC7B,OAAsC,EACtC,OAA4B,EAC5B,UAA6B;QAE7B,KAAK,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAEtD,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IACrD,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,IAAY;QACxC,OAAO,GAAG,IAAI,IAAI,qBAAW,CAAC,SAAS,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB;IAChB,IAAW,IAAI;QACb,OAAO,qBAAW,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,gBAAgB;IAChB,IAAW,YAAY;QACrB,OAAO,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,gBAAgB;IACT,aAAa,CAAC,UAAsC;QACzD,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;IAC1D,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,gCAAmB,CAAC;IACpC,CAAC;CACF;AA9DD,oCA8DC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n Component\n} from '@microsoft/tsdoc/lib-commonjs/beta/DeclarationReference';\nimport { Excerpt, IExcerptTokenRange } from '../mixins/Excerpt';\nimport { ApiItemKind } from '../items/ApiItem';\nimport { ApiDeclaredItem, IApiDeclaredItemOptions, IApiDeclaredItemJson } from '../items/ApiDeclaredItem';\nimport { ApiReleaseTagMixin, IApiReleaseTagMixinOptions } from '../mixins/ApiReleaseTagMixin';\nimport { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';\nimport {\n ApiTypeParameterListMixin,\n IApiTypeParameterListMixinOptions,\n IApiTypeParameterListMixinJson\n} from '../mixins/ApiTypeParameterListMixin';\nimport { DeserializerContext } from './DeserializerContext';\nimport {\n IApiExportedMixinJson,\n IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiTypeAlias}.\n * @public\n */\nexport interface IApiTypeAliasOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiDeclaredItemOptions,\n IApiTypeParameterListMixinOptions,\n IApiExportedMixinOptions {\n typeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiTypeAliasJson\n extends IApiDeclaredItemJson,\n IApiTypeParameterListMixinJson,\n IApiExportedMixinJson {\n typeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript type alias declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiTypeAlias` represents a definition such as one of these examples:\n *\n * ```ts\n * // A union type:\n * export type Shape = Square | Triangle | Circle;\n *\n * // A generic type alias:\n * export type BoxedValue<T> = { value: T };\n *\n * export type BoxedArray<T> = { array: T[] };\n *\n * // A conditional type alias:\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n *\n * ```\n *\n * @public\n */\nexport class ApiTypeAlias extends ApiTypeParameterListMixin(\n ApiNameMixin(ApiReleaseTagMixin(ApiExportedMixin(ApiDeclaredItem)))\n) {\n /**\n * An {@link Excerpt} that describes the type of the alias.\n *\n * @remarks\n * In the example below, the `typeExcerpt` would correspond to the subexpression\n * `T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;`:\n *\n * ```ts\n * export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;\n * ```\n */\n public readonly typeExcerpt: Excerpt;\n\n public constructor(options: IApiTypeAliasOptions) {\n super(options);\n\n this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiTypeAliasOptions>,\n context: DeserializerContext,\n jsonObject: IApiTypeAliasJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.typeTokenRange = jsonObject.typeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.TypeAlias}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.TypeAlias;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiTypeAlias.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.typeTokenRange = this.typeExcerpt.tokenRange;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.TypeAlias);\n }\n}\n"]}
|
|
@@ -7,17 +7,18 @@ import { IApiNameMixinOptions, ApiNameMixin } from '../mixins/ApiNameMixin';
|
|
|
7
7
|
import { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';
|
|
8
8
|
import { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';
|
|
9
9
|
import { DeserializerContext } from './DeserializerContext';
|
|
10
|
+
import { IApiExportedMixinJson, IApiExportedMixinOptions, ApiExportedMixin } from '../mixins/ApiExportedMixin';
|
|
10
11
|
/**
|
|
11
12
|
* Constructor options for {@link ApiVariable}.
|
|
12
13
|
* @public
|
|
13
14
|
*/
|
|
14
|
-
export interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions {
|
|
15
|
+
export interface IApiVariableOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiReadonlyMixinOptions, IApiDeclaredItemOptions, IApiInitializerMixinOptions, IApiExportedMixinOptions {
|
|
15
16
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
16
17
|
}
|
|
17
|
-
export interface IApiVariableJson extends IApiDeclaredItemJson {
|
|
18
|
+
export interface IApiVariableJson extends IApiDeclaredItemJson, IApiExportedMixinJson {
|
|
18
19
|
variableTypeTokenRange: IExcerptTokenRange;
|
|
19
20
|
}
|
|
20
|
-
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
21
|
+
declare const ApiVariable_base: typeof ApiDeclaredItem & (new (...args: any[]) => ApiExportedMixin) & (new (...args: any[]) => ApiInitializerMixin) & (new (...args: any[]) => ApiReadonlyMixin) & (new (...args: any[]) => ApiReleaseTagMixin) & (new (...args: any[]) => ApiNameMixin);
|
|
21
22
|
/**
|
|
22
23
|
* Represents a TypeScript variable declaration.
|
|
23
24
|
*
|
|
@@ -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,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BAA2B,EAC3B,wBAAwB;IAC1B,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB,EAAE,qBAAqB;IACnF,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C;;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,WAAY,SAAQ,gBAEhC;IACC;;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;CAOvD"}
|
package/lib/model/ApiVariable.js
CHANGED
|
@@ -10,6 +10,7 @@ const ApiReleaseTagMixin_1 = require("../mixins/ApiReleaseTagMixin");
|
|
|
10
10
|
const ApiReadonlyMixin_1 = require("../mixins/ApiReadonlyMixin");
|
|
11
11
|
const ApiNameMixin_1 = require("../mixins/ApiNameMixin");
|
|
12
12
|
const ApiInitializerMixin_1 = require("../mixins/ApiInitializerMixin");
|
|
13
|
+
const ApiExportedMixin_1 = require("../mixins/ApiExportedMixin");
|
|
13
14
|
/**
|
|
14
15
|
* Represents a TypeScript variable declaration.
|
|
15
16
|
*
|
|
@@ -30,7 +31,7 @@ const ApiInitializerMixin_1 = require("../mixins/ApiInitializerMixin");
|
|
|
30
31
|
*
|
|
31
32
|
* @public
|
|
32
33
|
*/
|
|
33
|
-
class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReadonlyMixin_1.ApiReadonlyMixin)((0, ApiInitializerMixin_1.ApiInitializerMixin)(ApiDeclaredItem_1.ApiDeclaredItem)))) {
|
|
34
|
+
class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixin_1.ApiReleaseTagMixin)((0, ApiReadonlyMixin_1.ApiReadonlyMixin)((0, ApiInitializerMixin_1.ApiInitializerMixin)((0, ApiExportedMixin_1.ApiExportedMixin)(ApiDeclaredItem_1.ApiDeclaredItem))))) {
|
|
34
35
|
constructor(options) {
|
|
35
36
|
super(options);
|
|
36
37
|
this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);
|
|
@@ -59,8 +60,9 @@ class ApiVariable extends (0, ApiNameMixin_1.ApiNameMixin)((0, ApiReleaseTagMixi
|
|
|
59
60
|
/** @beta @override */
|
|
60
61
|
buildCanonicalReference() {
|
|
61
62
|
const nameComponent = DeclarationReference_1.DeclarationReference.parseComponent(this.name);
|
|
63
|
+
const navigation = this.isExported ? "." /* Navigation.Exports */ : "~" /* Navigation.Locals */;
|
|
62
64
|
return (this.parent ? this.parent.canonicalReference : DeclarationReference_1.DeclarationReference.empty())
|
|
63
|
-
.addNavigationStep(
|
|
65
|
+
.addNavigationStep(navigation, nameComponent)
|
|
64
66
|
.withMeaning("var" /* Meaning.Variable */);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -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,iEAAwF;AACxF,yDAA4E;AAC5E,uEAAiG;
|
|
1
|
+
{"version":3,"file":"ApiVariable.js","sourceRoot":"","sources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AAU,CAAC;IAC1E,CAAC;IAED,sBAAsB;IACf,uBAAuB;QAC5B,MAAM,aAAa,GAAc,2CAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChF,MAAM,UAAU,GAAe,IAAI,CAAC,UAAU,CAAC,CAAC,8BAAoB,CAAC,4BAAkB,CAAC;QACxF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,2CAAoB,CAAC,KAAK,EAAE,CAAC;aACjF,iBAAiB,CAAC,UAAU,EAAE,aAAa,CAAC;aAC5C,WAAW,8BAAkB,CAAC;IACnC,CAAC;CACF;AAtDD,kCAsDC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n// See LICENSE in the project root for license information.\n\nimport {\n DeclarationReference,\n Meaning,\n Navigation,\n 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 { ApiInitializerMixin, IApiInitializerMixinOptions } from '../mixins/ApiInitializerMixin';\nimport { IExcerptTokenRange, Excerpt } from '../mixins/Excerpt';\nimport { DeserializerContext } from './DeserializerContext';\nimport {\n IApiExportedMixinJson,\n IApiExportedMixinOptions,\n ApiExportedMixin\n} from '../mixins/ApiExportedMixin';\n\n/**\n * Constructor options for {@link ApiVariable}.\n * @public\n */\nexport interface IApiVariableOptions\n extends IApiNameMixinOptions,\n IApiReleaseTagMixinOptions,\n IApiReadonlyMixinOptions,\n IApiDeclaredItemOptions,\n IApiInitializerMixinOptions,\n IApiExportedMixinOptions {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\nexport interface IApiVariableJson extends IApiDeclaredItemJson, IApiExportedMixinJson {\n variableTypeTokenRange: IExcerptTokenRange;\n}\n\n/**\n * Represents a TypeScript variable declaration.\n *\n * @remarks\n *\n * This is part of the {@link ApiModel} hierarchy of classes, which are serializable representations of\n * API declarations.\n *\n * `ApiVariable` represents an exported `const` or `let` object such as these examples:\n *\n * ```ts\n * // A variable declaration\n * export let verboseLogging: boolean;\n *\n * // A constant variable declaration with an initializer\n * export const canvas: IWidget = createCanvas();\n * ```\n *\n * @public\n */\nexport class ApiVariable extends ApiNameMixin(\n ApiReleaseTagMixin(ApiReadonlyMixin(ApiInitializerMixin(ApiExportedMixin(ApiDeclaredItem))))\n) {\n /**\n * An {@link Excerpt} that describes the type of the variable.\n */\n public readonly variableTypeExcerpt: Excerpt;\n\n public constructor(options: IApiVariableOptions) {\n super(options);\n\n this.variableTypeExcerpt = this.buildExcerpt(options.variableTypeTokenRange);\n }\n\n /** @override */\n public static onDeserializeInto(\n options: Partial<IApiVariableOptions>,\n context: DeserializerContext,\n jsonObject: IApiVariableJson\n ): void {\n super.onDeserializeInto(options, context, jsonObject);\n\n options.variableTypeTokenRange = jsonObject.variableTypeTokenRange;\n }\n\n public static getContainerKey(name: string): string {\n return `${name}|${ApiItemKind.Variable}`;\n }\n\n /** @override */\n public get kind(): ApiItemKind {\n return ApiItemKind.Variable;\n }\n\n /** @override */\n public get containerKey(): string {\n return ApiVariable.getContainerKey(this.name);\n }\n\n /** @override */\n public serializeInto(jsonObject: Partial<IApiVariableJson>): void {\n super.serializeInto(jsonObject);\n\n jsonObject.variableTypeTokenRange = this.variableTypeExcerpt.tokenRange;\n }\n\n /** @beta @override */\n public buildCanonicalReference(): DeclarationReference {\n const nameComponent: Component = DeclarationReference.parseComponent(this.name);\n const navigation: Navigation = this.isExported ? Navigation.Exports : Navigation.Locals;\n return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())\n .addNavigationStep(navigation, nameComponent)\n .withMeaning(Meaning.Variable);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/api-extractor-model",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.24.1",
|
|
4
4
|
"description": "A helper library for loading and saving the .api.json files created by API Extractor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@microsoft/tsdoc": "0.14.1",
|
|
16
16
|
"@microsoft/tsdoc-config": "~0.16.1",
|
|
17
|
-
"@rushstack/node-core-library": "3.51.
|
|
17
|
+
"@rushstack/node-core-library": "3.51.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@rushstack/eslint-config": "3.0.
|
|
20
|
+
"@rushstack/eslint-config": "3.0.1",
|
|
21
21
|
"@rushstack/heft": "0.47.0",
|
|
22
22
|
"@rushstack/heft-node-rig": "1.10.0",
|
|
23
23
|
"@types/heft-jest": "1.0.1",
|
|
@@ -27,6 +27,5 @@
|
|
|
27
27
|
"build": "heft build --clean",
|
|
28
28
|
"_phase:build": "heft build --clean",
|
|
29
29
|
"_phase:test": "heft test --no-build"
|
|
30
|
-
}
|
|
31
|
-
"readme": "# @microsoft/api-extractor-model\n\nUse this library to read and write *.api.json files as defined by the [API Extractor](https://api-extractor.com/) tool.\nThese files are used to generate a documentation website for your TypeScript package. The files store the\nAPI signatures and doc comments that were extracted from your package.\n\nAPI documentation for this package: https://rushstack.io/pages/api/api-extractor-model/\n\n## Example Usage\n\nThe following code sample shows how to load `example.api.json`, which would be generated by API Extractor\nwhen it analyzes a hypothetical NPM package called `example`:\n\n```ts\nimport { ApiModel, ApiPackage } from '@microsoft/api-extractor-model';\n\nconst apiModel: ApiModel = new ApiModel();\nconst apiPackage: ApiPackage = apiModel.loadPackage('example.api.json');\n\nfor (const member of apiPackage.members) {\n console.log(member.displayName);\n}\n```\n\nThe `ApiModel` is acts as a container for various packages that are loaded and operated on as a group.\nFor example, a documentation tool may need to resolve `@link` references across different packages.\nIn this case we would load the various packages into the `ApiModel`, and then use\nthe `ApiModel.resolveDeclarationReference()` to resolve the `@link` targets.\n\nThe data structure forms a tree of various classes that start with the `Api` prefix. The nesting hierarchy\nmight look like this:\n\n```\n- ApiModel\n - ApiPackage\n - ApiEntryPoint\n - ApiClass\n - ApiMethod\n - ApiProperty\n - ApiEnum\n - ApiEnumMember\n - ApiInterface\n - ApiMethodSignature\n - ApiPropertySignature\n - ApiNamespace\n - (ApiClass, ApiEnum, ApiInterface, ...)\n```\n\nYou can use the `ApiItem.members` property to traverse this tree.\n\nNote that the non-abstract classes (e.g. `ApiClass`, `ApiEnum`, `ApiInterface`, etc.) use\nTypeScript \"mixin\" functions (e.g. `ApiDeclaredItem`, `ApiItemContainerMixin`, etc.) to add various\nfeatures that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class\nto extend more than one base class). The \"mixin\" is a TypeScript merged declaration with three components:\nthe function that generates a subclass, an interface that describes the members of the subclass, and\na namespace containing static members of the class.\n\n> For a complete project that uses these APIs to generate an API reference web site,\n> see the [@microsoft/api-documenter](https://www.npmjs.com/package/@microsoft/api-documenter) source code.\n\n## Links\n\n- [CHANGELOG.md](\n https://github.com/microsoft/rushstack/blob/main/libraries/api-extractor-model/CHANGELOG.md) - Find\n out what's new in the latest version\n- [API Reference](https://rushstack.io/pages/api/api-extractor-model/)\n\nAPI Extractor is part of the [Rush Stack](https://rushstack.io/) family of projects.\n"
|
|
30
|
+
}
|
|
32
31
|
}
|