pinia-class-component icon indicating copy to clipboard operation
pinia-class-component copied to clipboard

[Feature] Parametrized getters

Open mullerch opened this issue 2 years ago • 0 comments

Actually, it looks like only computed properties are handled as getters. Regarding the Pinia documentation, parametrized getters are also allowed.

By changing the detection mecanism, this library could allow some methods to be recognized as parametrized getters. As those are likely to be less frequent than actions and to conserve compatibility, I would suggest adding a @Getter metadata to the corresponding methods to mark them as a getter. Current computed properties should be kept as is.

mullerch avatar Jun 20 '22 16:06 mullerch