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

feat: make class prop decorators inline #387

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stagas
Copy link
Contributor

@stagas stagas commented Jun 25, 2022

Changes this:

@$.element()
class Foo extends HTMLElement {
  @$.attr()
  color = 'blue'
  @$.attr()
  another = 123
  @$.attr()
  withCapital = true

  button?: HTMLButtonElement
  result?: number = 123

to this:

@$.element()
class Foo extends HTMLElement {
  @$.attr() color = 'blue'
  @$.attr() another = 123
  @$.attr() withCapital = true

  button?: HTMLButtonElement
  result?: number = 123

The tests pass however I'm not 100% confident that it won't produce invalid code in some combination of modifiers or other occassions. We need probably more tests? Should I try and add them?

@dsherret dsherret marked this pull request as draft June 26, 2022 16:20
@stagas
Copy link
Contributor Author

stagas commented Jun 26, 2022

Yes that would be ideal. Any ideas how to go about it?

@alphatwit
Copy link

Can this be enabled optionally via config in the meantime? This feature is essential for following Angular style guidelines

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

Successfully merging this pull request may close these issues.

3 participants