[Bug] Repeated Quick Fixes
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAAIWAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0fINSAEiAKctgAboa7AaZZDHLgrLqPRv_fRv2RyIokydlTdTYccsu6v6jDrc8jQ8ulrCVzjWBVWZVl-YrARXWjHEENNCrQ2qKhRtPpGiVCLaF6X2KlhMzX85uAfntats9JnRhU1YrXtzHc0TsF8K9lOFiGXCcg8ECAIWYz4JECTeKHJFAUolkK_9nTl9EDKklIypZPHFbxiXSPY5AKW5Q_7js42fH5HC1v7w82HAB4rgeC_7qn0mJuce9AfcucC_sBZpbdaMQ4fwveYX8uzVB-PewBNcspiR1a8cW1ktAvXYT5HFsxM8r-aY2qAbhMNWCj2t0dQZKzy0yVLQw30IUcAt5892hkXjyRsDUaNW6DeBa243ts9KgM2ulIGqWx4OvWKcfd8kMdhxFd8aIBc_gojzVW76frfnS1TRUGhmRtsQevdV_y1bWQA
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hello() {
// let x = null;// uncomment this line === problem goes away
return;
x;
}`;
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
allowJs: true,
allowNonTsExtensions: true,
allowUnreachableCode: false,
checkJs: true,
})
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "typescript",
});
Reproduction Steps
- Hover over quick highlighted error on line 4
- Select "Quick Fix..."
- Observe repeated fixes:
Actual (Problematic) Behavior
The "Ignore this error message" and "Disable checking for this file" quick fixes are repeated.
Expected Behavior
The "Ignore this error message" and "Disable checking for this file" quick fixes are not repeated.
Additional Context
The unreachable code must contain an undefined reference -- if the ref after the return is defined, the problem goes away.