microsoft / microsoft/monaco-editor
[Bug] Typescript language behavior is different between bundled and unbundled languages
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
monaco.editor.create(document.getElementById('container'), {
value: `const test: Foo = {}`,
language: 'typescript'
});
monaco.languages.typescript.typescriptDefaults.addExtraLib(
`interface Foo { bar: string }`,
);
Reproduction Steps
Compare the problem detection when using "Load Latest Languages" and "Load Latest Languages From Source" in the settings menu.
Actual (Problematic) Behavior
When "Load Latest Languages" is selected, there is an error in the declaration of test. When the languages are loaded from source, there is no error shown.
https://github.com/microsoft/monaco-editor/assets/4761903/9658571b-dba0-45fc-813a-bb8b1ec6c941
Expected Behavior
I would expect a behavior to be the same between builds
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
Open the linked Monaco Editor playground and reproduce the TypeScript declaration with both “Load Latest Languages” and “Load Latest Languages From Source” settings. Trace the language-loading paths used by those two options and compare their problem detection; done means both builds report the same result for the provided Foo declaration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100