vscode: ts errors in js files

  • VSCode Version: latest
  • OS Version: latest Sierra

This doesn’t happen when I disable the built-in TypeScript and JavaScript Language Features extension… but then I lose a bunch of functionality…

Steps to Reproduce:

  1. Create new file named test.js add the following to it:
const submitEl = document.getElementById('submit');

submitEl.onclick = (event) => {
  console.log('submit');

  function KeyPress(e) {
    console.log('keypress', e)
  }
  
  document.onkeydown = KeyPress;
}
  1. Why am I getting ts errors on js files?
Screen Shot 2020-07-12 at 6 31 41 PM

Does this issue occur when all extensions are disabled?: Yes/No

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 20 (7 by maintainers)

Most upvoted comments

Ok, glad you found the issue. Please make sure to also file an issue against the deno extension as well so they can address this

@elazutkin-dynata @mjbvz I can confirm that disabling the Deno extension resolves this issue.

Apologies for wasting your time!

@elazutkin-dynata I recently installed the Deno extension as well. I’m on mobile right now but I will check if disabling it fixes this for me.

Nice find!

I enabled all extensions and disabled Deno — the problem is gone. It looks like Deno’s extension is not ready.

Sorry for polluting the ticket with a different problem and thank you for helping to debug it!