Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-extractor] Remove "const" keyword before enum to use with typescript isolatedModules #4541

Merged
merged 3 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api-extractor/src/api/ConsoleMessageId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @public
*/
export const enum ConsoleMessageId {
export enum ConsoleMessageId {
/**
* "Analysis will use the bundled TypeScript version ___"
*/
Expand Down
2 changes: 1 addition & 1 deletion apps/api-extractor/src/api/ExtractorLogLevel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @public
*/
export const enum ExtractorLogLevel {
export enum ExtractorLogLevel {
/**
* The message will be displayed as an error.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/api-extractor/src/api/ExtractorMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion apps/api-extractor/src/api/ExtractorMessageId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @public
*/
export const enum ExtractorMessageId {
export enum ExtractorMessageId {
/**
* "The doc comment should not contain more than one release tag."
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 4 additions & 4 deletions common/reviews/api/api-extractor.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -91,7 +91,7 @@ export class ExtractorConfig {
}

// @public
export const enum ExtractorLogLevel {
export enum ExtractorLogLevel {
Error = "error",
Info = "info",
None = "none",
Expand Down Expand Up @@ -122,15 +122,15 @@ export class ExtractorMessage {
}

// @public
export const enum ExtractorMessageCategory {
export enum ExtractorMessageCategory {
Compiler = "Compiler",
Console = "console",
Extractor = "Extractor",
TSDoc = "TSDoc"
}

// @public
export const enum ExtractorMessageId {
export enum ExtractorMessageId {
CyclicInheritDoc = "ae-cyclic-inherit-doc",
DifferentReleaseTags = "ae-different-release-tags",
ExtraReleaseTag = "ae-extra-release-tag",
Expand Down
Loading