Open littledan opened 6 years ago
I'd would prefer to leave it for a follow on.
Maybe this can be closed unless there's a clear benefit. We can avoid designing class decorators in such a way as the linked issue.
For example, instead of something like this (coughAngularcough):
@component({
props: {
foo: Number,
},
template: html`
<div>100 lines of HTML. {{foo}}</div>
`
})
class MyComponent extends Component {} // why does this empty class even exist?
design it in a more semantic way:
class MyComponent extends Component {
@numberAttribute accessor foo = 123
template = () => html`
<div>100 lines of HTML. ${this.foo}</div>
`
}
Here's a real-world example:
Previous discussion: https://github.com/tc39/proposal-decorators-previous/issues/22
OK to leave for v2?