Skip to content

Commit 0cb719e

Browse files
authored
Merge pull request #3074 from samisayegh/master
[api-extractor-model] Remove "const" keyword before enum to use with typescript isolatedModules
2 parents 259d644 + 6d64344 commit 0cb719e

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

apps/api-extractor-model/src/items/ApiItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin';
1515
*
1616
* @public
1717
*/
18-
export const enum ApiItemKind {
18+
export enum ApiItemKind {
1919
CallSignature = 'CallSignature',
2020
Class = 'Class',
2121
Constructor = 'Constructor',

apps/api-extractor-model/src/mixins/Excerpt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DeclarationReference } from '@microsoft/tsdoc/lib-commonjs/beta/Declara
55
import { Text } from '@rushstack/node-core-library';
66

77
/** @public */
8-
export const enum ExcerptTokenKind {
8+
export enum ExcerptTokenKind {
99
/**
1010
* Generic text without any special properties
1111
*/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/api-extractor-model",
5+
"comment": "Replace const enums with conventional enums to allow for compatibility with JavaScript consumers.",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@microsoft/api-extractor-model"
10+
}

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class AedocDefinitions {
2323
static readonly preapprovedTag: TSDocTagDefinition;
2424
// (undocumented)
2525
static get tsdocConfiguration(): TSDocConfiguration;
26-
}
26+
}
2727

2828
// Warning: (ae-forgotten-export) The symbol "ApiCallSignature_base" needs to be exported by the entry point index.d.ts
2929
//
@@ -122,7 +122,7 @@ export class ApiDocumentedItem extends ApiItem {
122122
serializeInto(jsonObject: Partial<IApiDocumentedItemJson>): void;
123123
// (undocumented)
124124
get tsdocComment(): tsdoc.DocComment | undefined;
125-
}
125+
}
126126

127127
// Warning: (ae-forgotten-export) The symbol "ApiEntryPoint_base" needs to be exported by the entry point index.d.ts
128128
//
@@ -284,7 +284,7 @@ export namespace ApiItemContainerMixin {
284284
}
285285

286286
// @public
287-
export const enum ApiItemKind {
287+
export enum ApiItemKind {
288288
// (undocumented)
289289
CallSignature = "CallSignature",
290290
// (undocumented)
@@ -446,7 +446,7 @@ export class ApiPackage extends ApiPackage_base {
446446
// (undocumented)
447447
saveToJsonFile(apiJsonFilename: string, options?: IApiPackageSaveOptions): void;
448448
get tsdocConfiguration(): TSDocConfiguration;
449-
}
449+
}
450450

451451
// @public
452452
export function ApiParameterListMixin<TBaseClass extends IApiItemConstructor>(baseClass: TBaseClass): TBaseClass & (new (...args: any[]) => ApiParameterListMixin);
@@ -632,10 +632,10 @@ export class ExcerptToken {
632632
get canonicalReference(): DeclarationReference | undefined;
633633
get kind(): ExcerptTokenKind;
634634
get text(): string;
635-
}
635+
}
636636

637637
// @public (undocumented)
638-
export const enum ExcerptTokenKind {
638+
export enum ExcerptTokenKind {
639639
Content = "Content",
640640
Reference = "Reference"
641641
}
@@ -914,5 +914,4 @@ export class TypeParameter {
914914
get tsdocTypeParamBlock(): tsdoc.DocParamBlock | undefined;
915915
}
916916

917-
918917
```

0 commit comments

Comments
 (0)