You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
have "js/ts.implicitProjectConfig.checkJs": true, in the settings.json
have the following block in a .js file:
constb="something"classA{constructor(){this.b="something"}toString(){returnthis.b}}leta=newA()if(a==b){// it undelines this with error: This comparison appears to be unintentional because the types 'A' and 'string' have no overlap.console.log("it is true")}else{console.log("it is false")}
when I run it I get it is true in the console
It seems like it does not check if there is a toString function in that class. In boolean comparisons NodeJS autocalls that function before comparing.
The text was updated successfully, but these errors were encountered:
Does this issue occur when all extensions are disabled?: Yes
Commit: 5235c6b
Date: 2022-12-05T16:38:16.075Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No
Steps to Reproduce:
"js/ts.implicitProjectConfig.checkJs": true,
in the settings.jsonwhen I run it I get
it is true
in the consoleIt seems like it does not check if there is a
toString
function in that class. In boolean comparisons NodeJS autocalls that function before comparing.The text was updated successfully, but these errors were encountered: