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

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

Open
DetachHead opened this issue Dec 16, 2024 · 0 comments · May be fixed by #236297
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities javascript JavaScript support issues
Milestone

Comments

@DetachHead
Copy link

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.

@jrieken jrieken assigned mjbvz and unassigned jrieken Dec 16, 2024
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities javascript JavaScript support issues good first issue Issues identified as good for first-time contributors labels Dec 16, 2024
@mjbvz mjbvz added this to the Backlog milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities javascript JavaScript support issues
Projects
None yet
3 participants