language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Multiple event listeners of same type throws error

Open jeremyjacob opened this issue 3 years ago • 0 comments

Describe the bug

Adding multiple event listeners for the same event causes a duplicate property warning in the editor, but no errors at runtime as I believe this is supported behavior in Svelte.

Reproduction

  <svelte:window
    on:keydown|capture={windowKeydownCapture}
    on:keydown|stopPropagation={windowKeydown} // An object literal cannot have multiple properties with the same name. ts(1117)
  />

Expected behaviour

This code should not error, it should be valid Svelte.

System Info

  • OS: macOS
  • IDE: VSCode

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

This might be a TS-related bug. If so, please let me know the best place to post such an issue.

jeremyjacob avatar Sep 21 '22 20:09 jeremyjacob