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

Warn on duplicate getters/setters/props/methods #5029

Open
nolanlawson opened this issue Dec 10, 2024 · 1 comment
Open

Warn on duplicate getters/setters/props/methods #5029

nolanlawson opened this issue Dec 10, 2024 · 1 comment

Comments

@nolanlawson
Copy link
Collaborator

Step 1 of #4450 is to have compile-time warnings for duplicate getters/setters/props/methods:

class Component extends LightningElement {
  get book1 () {}
  set book2(v) {}
  book
  book() {}
}

You can have 1) a method, you can have 2) a prop, you can have 3) a getter/setter (either/both), but you can't have two from the three different categories. We should warn on this.

We could presumably do this for all objects, but to avoid boiling the ocean, let's just focus on LightningElements (or assumed LightningElements). This is important for us because of how registerDecorators works in particular.

Copy link

git2gus bot commented Dec 10, 2024

This issue has been linked to a new work item: W-17406487

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

No branches or pull requests

1 participant