Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Warn user when Input/output does not exist in component and type checking #476

Closed
Tukks opened this issue Dec 28, 2017 · 4 comments

Comments

@Tukks
Copy link

Tukks commented Dec 28, 2017

Hi!

I have this component :

 @Component({
  selector: 'example-component',
  templateUrl: 'example-component.component.html',
  styleUrls: ['example-component.component.scss']
})
export class ExampleComponent {

  @Input() label: string;
 @Output() event: string;
}

If I wrote this in another template like this :

<example-component (label)="1" (noExistingInput)="'label'" [event]="exampleMethod()">
<example-component>

I have no warning on the noExistingInput, and no warning on label input waiting for a string and receiving a number.
Can you provide this?

@mgechev
Copy link
Owner

mgechev commented Dec 29, 2017

Hey @Tukks this is a compile-time error which makes the feature outside the scope of codelyzer. To get this behavior use the Angular language service.

@mgechev mgechev closed this as completed Dec 29, 2017
@Tukks
Copy link
Author

Tukks commented Dec 30, 2017

Ok, sorry I opened a issue at angular/angular#21204

@intellix
Copy link

hey @mgechev it seems that the Inputs are AOT compilation errors but Outputs are not: angular/angular#17483 (comment)

Shall I open another issue perhaps?

@mgechev
Copy link
Owner

mgechev commented Jan 18, 2018

This will require "deep analysis", or type checking, so we will hit these issues #191. Let's leave this to the compiler, whenever it gets ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants