Skip to content

javascript.inlayHints.enumMemberValues.enabled should be removed because javascript does not have enums #236222

@DetachHead

Description

@DetachHead

there seems to be two different versions of the enumMemberValues setting:

  • javascript.inlayHints.enumMemberValues.enabled
  • typescript.inlayHints.enumMemberValues.enabled

the javascript setting should be removed because javascript does not have enums:

enum Foo {
    A
}

runtime error:

enum Foo {
^^^^

SyntaxError: Unexpected reserved word
    at wrapSafe (node:internal/modules/cjs/loader:1515:18)
    at Module._compile (node:internal/modules/cjs/loader:1537:20)
    at Object..js (node:internal/modules/cjs/loader:1708:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49

typescript error:

'enum' declarations can only be used in TypeScript files.

this setting causes confusion because it shows up first when searching for it. i enabled it and was wondering why it wasn't working in my typescript files only to eventually realize that i enabled the javascript version instead.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buggood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code InsidersjavascriptJavaScript support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions