microsoft / microsoft/monaco-editor
[Bug] The editor doesn‘t show suggestion in typescript union type?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- 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
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `type CarBrand = "Toyota" | "BMW" | "Mercedes" | "Audi";
const car: CarBrand = ""`;
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "typescript",
automaticLayout: true,
});
Reproduction Steps
Open playground url, and input const car: CarBrand = ""
Actual (Problematic) Behavior
After input double quotes, the editor doesn't show suggestion like vscode.dev
Expected Behavior
I want that the editor can show suggestion like vscode.dev after input double quotes.
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Monaco Editor Playground and its TypeScript example, then compare completion behavior there with vscode.dev after entering the union-typed string. The issue names no repository file or test entry point, so trace the playground's suggestion path and identify how the expected suggestions are produced. Done means suggestions appear after entering the opening double quote for the shown CarBrand union.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- developer-experience, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100