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

[TypeScript] inline method decorators should stay inlined #5443

Closed
ikatyang opened this issue Nov 12, 2018 · 3 comments
Closed

[TypeScript] inline method decorators should stay inlined #5443

ikatyang opened this issue Nov 12, 2018 · 3 comments
Labels
lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program
Milestone

Comments

@ikatyang
Copy link
Member

Originally reported by @svipben in #5360 (comment)

Prettier 1.15.2
Playground link

--parser typescript

Input:

class X {
  @deco x() {
    return this.count * 2;
  }
  @deco get x() {
    return this.count * 2;
  }
}

Output:

class X {
  @deco
  x() {
    return this.count * 2;
  }
  @deco
  get x() {
    return this.count * 2;
  }
}

Expected behavior:
Same as input.

@ikatyang ikatyang added type:bug Issues identifying ugly output, or a defect in the program lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) labels Nov 12, 2018
@ikatyang ikatyang added the status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! label Nov 12, 2018
@svipas
Copy link

svipas commented Nov 12, 2018

@ikatyang I created an issue #5445 so I'm closing it and I will add a reference to this issue.

@ikatyang
Copy link
Member Author

Ah, sorry! I thought you're away from the computer.

@svipas
Copy link

svipas commented Nov 12, 2018

@ikatyang No problem, your examples are way shorter and better. Also, you're very fast, you opened an issue and already fixed it 😄 Thank you very much, I'm very happy 😄

@ikatyang ikatyang added this to the 1.15.3 milestone Nov 23, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. status:has pr Issues with an accompanying pull request. These issues will probably be fixed soon! type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

No branches or pull requests

2 participants