microsoft / microsoft/monaco-editor
[Bug] typescript type check
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
class Test<T> {
}
class Test1 {
}
class Test2 {
}
declare class Global {
static tryGetBean(bean: string):string;
static tryGetBean(bean: number):number;
static tryGetBean(bean: Test<string>):number;
}
Global.tryGetBean('123');
Global.tryGetBean(123);
let test1: Test<string> = new Test<string>();
let test2: Test<number> = new Test<number>();
let test3 = new Test1();
Global.tryGetBean(test1);
// why no errors
Global.tryGetBean(test2);
Global.tryGetBean(test3);
Reproduction Steps
Global.tryGetBean method called without type check.
Actual (Problematic) Behavior
no errors
Expected Behavior
Global.tryGetBean(test2);
Global.tryGetBean(test3);
report should error
Additional Context
noStrictGenericChecks: false,
noImplicitAny: false,
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 reproduction and run the provided TypeScript code to confirm the missing diagnostics for test2 and test3. Trace how the playground configures TypeScript checking, including noStrictGenericChecks and noImplicitAny, and compare the reported errors with the expected behavior. Done means both invalid calls produce type errors without regressing the valid overload calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100