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

allow for ES6 Object property shorthand #473

Open
GGAlanSmithee opened this issue Sep 21, 2023 · 0 comments
Open

allow for ES6 Object property shorthand #473

GGAlanSmithee opened this issue Sep 21, 2023 · 0 comments

Comments

@GGAlanSmithee
Copy link

In the below example, when POSTing data:

on end(item, oldIndex, newIndex) fetch /sort { method: 'post', body: { id: item@hx-id, oldIndex: oldIndex, newIndex: newIndex } as JSON }

it would be nice to be able to use ES6 object property shorthand notation:

on end(item, oldIndex, newIndex) fetch /sort { method: 'post', body: { id: item@hx-id, oldIndex, newIndex } as JSON }

(the difference being that { oldIndex: oldIndex, newIndex: newIndex } becomes { oldIndex, newIndex })

I have no insight into how doable this it, but the rule is quite constrained, since it's only valid in a { ... } block

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

1 participant