Skip to content

Commit 1409b84

Browse files
drwsmthkeithamus
authored andcommitted
Update attrs.md
The current example throws error TS1207: Decorators cannot be applied to multiple get/set accessors of the same name. I suggest updating documentation inline with advice from TS dev @mhegazy; see microsoft/TypeScript#2249 (comment)
1 parent dfbedf6 commit 1409b84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/_guide/attrs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class HelloWorldElement extends HTMLElement {
258258
return 'World' // Used to get the intial value
259259
}
260260
// Called whenever `name` changes
261-
@attr set dataName(newValue: string) {
261+
set dataName(newValue: string) {
262262
this.textContent = `Hello ${newValue}`
263263
}
264264
}

0 commit comments

Comments
 (0)