Skip to content

Commit addc973

Browse files
committed
Rename aliasType... to type...
1 parent 914cc7e commit addc973

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

apps/api-documenter/src/yaml/IYamlApiFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface IYamlException {
2727
* Part of the IYamlApiFile structure. Represents the type of an IYamlItem.
2828
*/
2929
export type YamlTypeId = 'class' | 'constructor' | 'enum' | 'field' | 'function' | 'interface'
30-
| 'method' | 'package' | 'property' | 'event';
30+
| 'method' | 'package' | 'property' | 'event' | 'typealias' | 'variable';
3131

3232
/**
3333
* Part of the IYamlApiFile structure. Represents basic API elements such as

apps/api-documenter/src/yaml/typescript.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"$ref": "#/definitions/syntax"
130130
},
131131
"type": {
132-
"enum": [ "class", "constructor", "enum", "field", "function", "interface", "method", "package", "property", "event" ]
132+
"enum": [ "class", "constructor", "enum", "field", "function", "interface", "method", "package", "property", "event", "typealias", "variable" ]
133133
},
134134
"uid": {
135135
"type": "string",

apps/api-extractor-model/src/model/ApiTypeAlias.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export interface IApiTypeAliasOptions extends
1818
IApiReleaseTagMixinOptions,
1919
IApiDeclaredItemOptions,
2020
IApiTypeParameterListMixinOptions {
21-
aliasTypeTokenRange: IExcerptTokenRange;
21+
typeTokenRange: IExcerptTokenRange;
2222
}
2323

2424
export interface IApiTypeAliasJson extends
2525
IApiDeclaredItemJson,
2626
IApiTypeParameterListMixinJson {
27-
aliasTypeTokenRange: IExcerptTokenRange;
27+
typeTokenRange: IExcerptTokenRange;
2828
}
2929

3030
/**
@@ -65,15 +65,15 @@ export class ApiTypeAlias extends ApiTypeParameterListMixin(ApiNameMixin(ApiRele
6565
* export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;
6666
* ```
6767
*/
68-
public readonly aliasTypeExcerpt: Excerpt;
68+
public readonly typeExcerpt: Excerpt;
6969

7070
/** @override */
7171
public static onDeserializeInto(options: Partial<IApiTypeAliasOptions>, jsonObject: IApiTypeAliasJson): void {
7272
super.onDeserializeInto(options, jsonObject);
7373

7474
// NOTE: This did not exist in the initial release, so we apply a default
7575
// in the event it doesn't exist in 'jsonObject'.
76-
options.aliasTypeTokenRange = jsonObject.aliasTypeTokenRange || { startIndex: 0, endIndex: 0 };
76+
options.typeTokenRange = jsonObject.typeTokenRange || { startIndex: 0, endIndex: 0 };
7777
}
7878

7979
public static getCanonicalReference(name: string): string {
@@ -83,7 +83,7 @@ export class ApiTypeAlias extends ApiTypeParameterListMixin(ApiNameMixin(ApiRele
8383
public constructor(options: IApiTypeAliasOptions) {
8484
super(options);
8585

86-
this.aliasTypeExcerpt = this.buildExcerpt(options.aliasTypeTokenRange);
86+
this.typeExcerpt = this.buildExcerpt(options.typeTokenRange);
8787
}
8888

8989
/** @override */
@@ -100,6 +100,6 @@ export class ApiTypeAlias extends ApiTypeParameterListMixin(ApiNameMixin(ApiRele
100100
public serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void {
101101
super.serializeInto(jsonObject);
102102

103-
jsonObject.aliasTypeTokenRange = this.aliasTypeExcerpt.tokenRange;
103+
jsonObject.typeTokenRange = this.typeExcerpt.tokenRange;
104104
}
105105
}

apps/api-extractor/src/generators/ApiModelGenerator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ export class ApiModelGenerator {
687687
const typeParameters: IApiTypeParameterOptions[] = this._captureTypeParameters(nodesToCapture,
688688
typeAliasDeclaration.typeParameters);
689689

690-
const aliasTypeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();
691-
nodesToCapture.push({ node: typeAliasDeclaration.type, tokenRange: aliasTypeTokenRange });
690+
const typeTokenRange: IExcerptTokenRange = ExcerptBuilder.createEmptyTokenRange();
691+
nodesToCapture.push({ node: typeAliasDeclaration.type, tokenRange: typeTokenRange });
692692

693693
const excerptTokens: IExcerptToken[] = ExcerptBuilder.build({
694694
startingNode: astDeclaration.declaration,
@@ -698,7 +698,7 @@ export class ApiModelGenerator {
698698
const releaseTag: ReleaseTag = this._collector.fetchMetadata(astDeclaration.astSymbol).releaseTag;
699699

700700
apiTypeAlias = new ApiTypeAlias({ name, docComment, typeParameters, releaseTag, excerptTokens,
701-
aliasTypeTokenRange });
701+
typeTokenRange });
702702

703703
parentApiItem.addMember(apiTypeAlias);
704704
}

build-tests/api-documenter-test/etc/api-documenter-test.api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@
15681568
],
15691569
"releaseTag": "Public",
15701570
"name": "ExampleTypeAlias",
1571-
"aliasTypeTokenRange": {
1571+
"typeTokenRange": {
15721572
"startIndex": 3,
15731573
"endIndex": 5
15741574
}

common/reviews/api/api-extractor-model.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ export namespace ApiStaticMixin {
500500
// @public
501501
export class ApiTypeAlias extends ApiTypeAlias_base {
502502
constructor(options: IApiTypeAliasOptions);
503-
readonly aliasTypeExcerpt: Excerpt;
504503
// @override (undocumented)
505504
readonly canonicalReference: string;
506505
// (undocumented)
@@ -513,6 +512,7 @@ export class ApiTypeAlias extends ApiTypeAlias_base {
513512
static onDeserializeInto(options: Partial<IApiTypeAliasOptions>, jsonObject: IApiTypeAliasJson): void;
514513
// @override (undocumented)
515514
serializeInto(jsonObject: Partial<IApiTypeAliasJson>): void;
515+
readonly typeExcerpt: Excerpt;
516516
}
517517

518518
// @public
@@ -743,7 +743,7 @@ export interface IApiStaticMixinOptions extends IApiItemOptions {
743743
// @public
744744
export interface IApiTypeAliasOptions extends IApiNameMixinOptions, IApiReleaseTagMixinOptions, IApiDeclaredItemOptions, IApiTypeParameterListMixinOptions {
745745
// (undocumented)
746-
aliasTypeTokenRange: IExcerptTokenRange;
746+
typeTokenRange: IExcerptTokenRange;
747747
}
748748

749749
// @public

0 commit comments

Comments
 (0)