github / catalyst

Catalyst is a set of patterns and techniques for developing components within a complex application.
https://github.github.io/catalyst/
MIT License
1.36k stars 50 forks source link

Update attrs.md (documentation for 2.0.0) #275

Closed drwsmth closed 2 years ago

drwsmth commented 2 years ago

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 https://github.com/microsoft/TypeScript/issues/2249#issuecomment-141710417

dgreif commented 2 years ago

I believe this change would detract from the goal of this example, which is to handle the getter/setter separately, while also handling it as an attr. @keithamus is @attr needed on the setter to make this work properly? If so, I'm curious how we should handle the typescript error