Skip to content

[BUG] An issue with Angular Language Service #8

@pshurygin

Description

@pshurygin

🐞 Bug report

Description

.stop and .prevent syntax is not correctly handled by angular language service. This leads to errors being displayed by IDE when such syntax is used:
Screenshot 2020-11-26 at 17 24 25
Compare it to the standard click event:
Screenshot 2020-11-26 at 17 24 46

Expected behavior

No error is displayed, type of $event is displayed on hover, description of event is displayed on hover.

Versions

  • OS: MacOS
  • Angular 11
  • JetBrains IDE (WebStorm/Rider/RubyMine etc) (not sure if the issue persists in VSCode, but i would think so)

Additional context

I'm not sure that this can be fixed on the plugin side, but still creating an issue, as this is very annoying to have these errors all around the IDE.

Added by @waterplea:
Also exact type of the $event variable is lost when using .stop and .prevent. This leads to compilation errors like this:

Argument of type 'Event' is not assignable to parameter of type 'MouseEvent'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions