We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Prettier 1.19.1 Playground link
--parser babel
Input:
class GameObject { constructor({ position, velocity, Physics, Graphics, Input, }: { position: Vector2; velocity: Vector2; Physics: { new (): PhysicsComponent; }; Graphics: { new (): GraphicsComponent; }; Input: { new (): InputComponent; }; }) { this.position = position, this.velocity = velocity, this.input = new Input(); this.physics = new Physics(); this.graphics = new Graphics(); } }
Output:
class GameObject { constructor({ position, velocity, Physics, Graphics, Input }: { position: Vector2, velocity: Vector2, Physics: { new(): PhysicsComponent }, Graphics: { new(): GraphicsComponent }, Input: { new(): InputComponent } }) { (this.position = position), (this.velocity = velocity), (this.input = new Input()); this.physics = new Physics(); this.graphics = new Graphics(); } }
Expected behavior:
this.position = position, this.velocity = velocity, this.input = new Input(); this.physics = new Physics(); this.graphics = new Graphics();
The text was updated successfully, but these errors were encountered:
Works as intended. That's how Prettier formats the comma operator. I think you used this operator instead of semicolons by mistake.
Sorry, something went wrong.
@thorn0 You are right! Thanks :)
No branches or pull requests
Prettier 1.19.1
Playground link
Input:
Output:
Expected behavior:
The text was updated successfully, but these errors were encountered: