Skip to content

Commit a501418

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 ef859c8 commit a501418

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
@@ -256,7 +256,7 @@ class HelloWorldElement extends HTMLElement {
256256
return 'World' // Used to get the intial value
257257
}
258258
// Called whenever `name` changes
259-
@attr set dataName(newValue: string) {
259+
set dataName(newValue: string) {
260260
this.textContent = `Hello ${newValue}`
261261
}
262262
}

0 commit comments

Comments
 (0)