We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://microsoft.github.io/monaco-editor/playground.html?source=v0.47.0#XQAAAALkBAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw7VuRmAlP8UHl2wTDSACH-qdgDy04VOvD7Jmc6fs3N2mfiPPtNst-DOIbdc9WJIeJWkZ_8CKRyWOAPtv8hjI2Q2FNfCzKK6_qZOxN-SICsCgqt89H-1cX5-iQ-rI1OUyebpgJrcyYrLSaQuHGmc2O7p3waofGmpJ2_RqEA05xpQ9qNCFTGnCpb2RZbnIymB9i78qLLlfq3SAM8KuTfthQ5BEQ2gGRBT6kb_wsQAkaAWRWe_2LcbzC4D2kxo5IgQ0p3R_ERItVwZe1afxNhUNwfdJm9-GeX8T6PInV70kUsPIJJtAz9UeNspMaIRZre84RqmaXLa_fBdXnGMVmtihaWn1lFJfESDCQXkXU0wySzW8dFYOwnBwJN1xkBIS65yY6SbG9V5csxIvok2JwFuNDKkb9fBNJlRYt5CQFA7ni5DoqIJcZAlJyPVhXHdYkHg-VwcU5CdAsbIz0EcYBqc7CbPBfxKSJZTPPGVEJAPGTg_uo2rN0X1KFdxUK_-giUwnQsKWs-SYsETbkclSir1oiiAeuCO9SkbIyYt88NnIna47YYs01uSQSNZ9uZ8krC5Vt9fdwoMjcIT3IYk9oRLfj_FNIsatiMux24bZpRRkc322AO_0if3GxgkoE2qsoftcgLsHgzCGpnaJ0W81B82_QKQ00HiJegCUUhz3LBJh_uBcQZTI6lmk8M06gaSXPbvVgfukY4u9zac9fqf0wUyo
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);
Global.tryGetBean method called without type check.
no errors
Global.tryGetBean(test2); Global.tryGetBean(test3); report should error
noStrictGenericChecks: false, noImplicitAny: false,
The text was updated successfully, but these errors were encountered:
this isnt a monaco issue TS is structurally typed and only compares properties, but Test has none e.g. with class Test<T> { value: T; } it would error see https://www.totaltypescript.com/the-empty-object-type-in-typescript
Test
class Test<T> { value: T; }
Sorry, something went wrong.
No branches or pull requests
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.47.0#XQAAAALkBAAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw7VuRmAlP8UHl2wTDSACH-qdgDy04VOvD7Jmc6fs3N2mfiPPtNst-DOIbdc9WJIeJWkZ_8CKRyWOAPtv8hjI2Q2FNfCzKK6_qZOxN-SICsCgqt89H-1cX5-iQ-rI1OUyebpgJrcyYrLSaQuHGmc2O7p3waofGmpJ2_RqEA05xpQ9qNCFTGnCpb2RZbnIymB9i78qLLlfq3SAM8KuTfthQ5BEQ2gGRBT6kb_wsQAkaAWRWe_2LcbzC4D2kxo5IgQ0p3R_ERItVwZe1afxNhUNwfdJm9-GeX8T6PInV70kUsPIJJtAz9UeNspMaIRZre84RqmaXLa_fBdXnGMVmtihaWn1lFJfESDCQXkXU0wySzW8dFYOwnBwJN1xkBIS65yY6SbG9V5csxIvok2JwFuNDKkb9fBNJlRYt5CQFA7ni5DoqIJcZAlJyPVhXHdYkHg-VwcU5CdAsbIz0EcYBqc7CbPBfxKSJZTPPGVEJAPGTg_uo2rN0X1KFdxUK_-giUwnQsKWs-SYsETbkclSir1oiiAeuCO9SkbIyYt88NnIna47YYs01uSQSNZ9uZ8krC5Vt9fdwoMjcIT3IYk9oRLfj_FNIsatiMux24bZpRRkc322AO_0if3GxgkoE2qsoftcgLsHgzCGpnaJ0W81B82_QKQ00HiJegCUUhz3LBJh_uBcQZTI6lmk8M06gaSXPbvVgfukY4u9zac9fqf0wUyo
Monaco Editor Playground Code
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,
The text was updated successfully, but these errors were encountered: