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

[Bug] Cannot redeclare block-scoped variable 'Map'. #4507

Open
1 of 2 tasks
BayMax619 opened this issue May 14, 2024 · 0 comments
Open
1 of 2 tasks

[Bug] Cannot redeclare block-scoped variable 'Map'. #4507

BayMax619 opened this issue May 14, 2024 · 0 comments

Comments

@BayMax619
Copy link

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.48.0#XQAAAAIeAwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw27OaSAEiAKctgAboa7AaZZDHLgrLqPRv_fRv2RyIokydlTdTYccsu6v6jDrc8jQ8uomCtyomqm1LqDD_pl47XPueI4_xE1hM8C4okGKxS6m9zh5nNGhOylcnaTpmBCR8sQwOcZtcGoTeIPuqVabkHs8y-ooacdR_6YPNTeJwf0aa6YPfFclxPj9FYskflgdAetNI6oRuDo72fbJ7FvkFfx75MZ8VQ0xxQ3ypU19hXmZjJCpCR94FdDhfIpt9rpCAIQ2pGL9nd9z042ZtgS1GWVVwVlypkDr3T3gMf-eU_63vDjh7lZHRYFRjyQQctPnI9fd-n8kAswG57SPodOmzt8_6UiM4_GM-lN7Q-JoTpeNqGP_ynvFy3NZXScb-PaGCNQ6WpXu6kZeSyfeAJvvIwtU63B1A1o6JjUIBZdek0wFOniKdcfcLRV9_nS-dVUoWjwHx3de_Hg14KumvWmq3rVT-FYin60W0Gzl427mm0khENcHP9QRNpDm2n6r0OAtTs5mpdxhFF_GW7vxxP2H_NwspAA

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `let Map = new Set();`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "typescript",
	automaticLayout: true,
});
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
    target: monaco.languages.typescript.ScriptTarget.ES2019,
    module: monaco.languages.typescript.ModuleKind.ESNext,
    moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
    strict: false,
    strictFunctionTypes: false,
    strictBindCallApply: false,
    noStrictGenericChecks: false,
    noImplicitAny: false,
    importHelpers: true,
    allowNonTsExtensions: true,
  });

Reproduction Steps

No response

Actual (Problematic) Behavior

Cannot redeclare block-scoped variable 'Map'.

Expected Behavior

No error

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant