Add an extended diagnostic when using @Input() decorator in an EventEmitter()

This issue has been tracked since 2022-09-13.

Which @angular/* package(s) are relevant/related to the feature request?

compiler-cli

Description

While developing web apps, most of the time we just copy and paste stuff, for example @inputs and when we need an EventEmitter we forget to convert it to a @output .

Proposed solution

Add an extended diagnostic that warns the user when uses @input with an EventEmitter().

Alternatives considered

None

eneajaho wrote this answer on 2022-09-13

This is something that happens all the time with devs:
https://twitter.com/prestonjlamb/status/1569693548865519616

jessicajaniuk wrote this answer on 2022-09-21

Extended diagnostics are currently specifically template diagnostics. This code is actually in the typescript class. So as it is right now, an extended diagnostic wouldn't work here. Perhaps a lint check would help here.

More Details About Repo
Owner Name angular
Repo Name angular
Full Name angular/angular
Language TypeScript
Created Date 2014-09-18
Updated Date 2022-09-30
Star Count 84091
Watcher Count 3064
Fork Count 22233
Issue Count 1203

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date