From 4ed902d7891cf20d6fc3757090bb0d262488cdc5 Mon Sep 17 00:00:00 2001 From: IIIMADDINIII Date: Sat, 24 Feb 2024 21:23:05 +0100 Subject: [PATCH 1/3] remove const keyword before enums --- apps/api-extractor/src/api/ConsoleMessageId.ts | 2 +- apps/api-extractor/src/api/ExtractorLogLevel.ts | 2 +- apps/api-extractor/src/api/ExtractorMessage.ts | 2 +- apps/api-extractor/src/api/ExtractorMessageId.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/api-extractor/src/api/ConsoleMessageId.ts b/apps/api-extractor/src/api/ConsoleMessageId.ts index 8c02dabc0b9..27a9b9037cf 100644 --- a/apps/api-extractor/src/api/ConsoleMessageId.ts +++ b/apps/api-extractor/src/api/ConsoleMessageId.ts @@ -11,7 +11,7 @@ * * @public */ -export const enum ConsoleMessageId { +export enum ConsoleMessageId { /** * "Analysis will use the bundled TypeScript version ___" */ diff --git a/apps/api-extractor/src/api/ExtractorLogLevel.ts b/apps/api-extractor/src/api/ExtractorLogLevel.ts index 40a687aa3a0..9670889bf78 100644 --- a/apps/api-extractor/src/api/ExtractorLogLevel.ts +++ b/apps/api-extractor/src/api/ExtractorLogLevel.ts @@ -9,7 +9,7 @@ * * @public */ -export const enum ExtractorLogLevel { +export enum ExtractorLogLevel { /** * The message will be displayed as an error. * diff --git a/apps/api-extractor/src/api/ExtractorMessage.ts b/apps/api-extractor/src/api/ExtractorMessage.ts index f6bfe6904d0..4b27f876e3b 100644 --- a/apps/api-extractor/src/api/ExtractorMessage.ts +++ b/apps/api-extractor/src/api/ExtractorMessage.ts @@ -28,7 +28,7 @@ export interface IExtractorMessageProperties { * Specifies a category of messages for use with {@link ExtractorMessage}. * @public */ -export const enum ExtractorMessageCategory { +export enum ExtractorMessageCategory { /** * Messages originating from the TypeScript compiler. * diff --git a/apps/api-extractor/src/api/ExtractorMessageId.ts b/apps/api-extractor/src/api/ExtractorMessageId.ts index 445a57151a7..9e423d9a420 100644 --- a/apps/api-extractor/src/api/ExtractorMessageId.ts +++ b/apps/api-extractor/src/api/ExtractorMessageId.ts @@ -11,7 +11,7 @@ * * @public */ -export const enum ExtractorMessageId { +export enum ExtractorMessageId { /** * "The doc comment should not contain more than one release tag." */ From e0da07c941937225ab1cc0cabf92223230919815 Mon Sep 17 00:00:00 2001 From: IIIMADDINIII <20095647+IIIMADDINIII@users.noreply.github.com> Date: Sat, 24 Feb 2024 21:34:47 +0100 Subject: [PATCH 2/3] add reviews file --- common/reviews/api/api-extractor.api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/reviews/api/api-extractor.api.md b/common/reviews/api/api-extractor.api.md index f84d593961e..31bcedb6a82 100644 --- a/common/reviews/api/api-extractor.api.md +++ b/common/reviews/api/api-extractor.api.md @@ -21,7 +21,7 @@ export class CompilerState { } // @public -export const enum ConsoleMessageId { +export enum ConsoleMessageId { ApiReportCopied = "console-api-report-copied", ApiReportCreated = "console-api-report-created", ApiReportFolderMissing = "console-api-report-folder-missing", @@ -91,7 +91,7 @@ export class ExtractorConfig { } // @public -export const enum ExtractorLogLevel { +export enum ExtractorLogLevel { Error = "error", Info = "info", None = "none", @@ -122,7 +122,7 @@ export class ExtractorMessage { } // @public -export const enum ExtractorMessageCategory { +export enum ExtractorMessageCategory { Compiler = "Compiler", Console = "console", Extractor = "Extractor", @@ -130,7 +130,7 @@ export const enum ExtractorMessageCategory { } // @public -export const enum ExtractorMessageId { +export enum ExtractorMessageId { CyclicInheritDoc = "ae-cyclic-inherit-doc", DifferentReleaseTags = "ae-different-release-tags", ExtraReleaseTag = "ae-extra-release-tag", From d2e07c220e74221a74cad500a7b35cee7021269b Mon Sep 17 00:00:00 2001 From: IIIMADDINIII <20095647+IIIMADDINIII@users.noreply.github.com> Date: Sat, 24 Feb 2024 21:36:10 +0100 Subject: [PATCH 3/3] add changelog --- .../remove-const-enum_2024-02-24-20-35.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@microsoft/api-extractor/remove-const-enum_2024-02-24-20-35.json diff --git a/common/changes/@microsoft/api-extractor/remove-const-enum_2024-02-24-20-35.json b/common/changes/@microsoft/api-extractor/remove-const-enum_2024-02-24-20-35.json new file mode 100644 index 00000000000..79a566b2448 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/remove-const-enum_2024-02-24-20-35.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Replace const enums with conventional enums to allow for compatibility with JavaScript consumers.", + "type": "minor" + } + ], + "packageName": "@microsoft/api-extractor" +} \ No newline at end of file