Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow access to both getter and setter of a property when either is annotated according to InstanceInvokeMetaCapability #52

Closed
lassedamgaard opened this issue Dec 5, 2015 · 1 comment

Comments

@lassedamgaard
Copy link

It would be very nice if you could use InstanceInvokeMetaCapability to reflect on properties without requiring that both getter and setter be annotated with the specified type, either as the default behavior of through additional config. It's less ideal that users of my library have to annotate both getter and setter of every property that they want to have processed when the thing it does always involves both reading and modifying the property value. Currently I have to resort to InstanceInvokeCapability without a name pattern.

On a more general note, as a user of Reflectable it would just feel more natural if properties were given at least partially first-class treatment instead of them just being linked by name.

@sigurdm
Copy link
Collaborator

sigurdm commented Dec 7, 2015

Hi Lasse. Thanks for the suggestion. I believe what you are looking for already exists:

/// Quantifying capability instance specifying that the reflection support
/// for any given explicitly declared getter must also be given to its
/// corresponding explicitly declared setter, if any.
const correspondingSetterQuantifyCapability = [...]

About the general note - can you give an example of how the code you imagine would look like? I'm not sure I follow exactly what you mean by "first-class treatment". Preferably in a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants