Skip to content

diferenciate get and set and decorator #256

Closed
@pabloalmunia

Description

@pabloalmunia

We are founding a very special and curious case with getter/setter decorators. Let's suppose we have a general decorator for methods (ie a @trace). We want to be able to apply this decorator only over the getter or the setter. Nevertheless, we don't kwon if the user programmer put our decorator over the setter or getter.

class T {
  get x() {}

  @trace
  set x() {}
}

We have not any manner to find out where is placed the decorator, over the set or over the get, and as a result there is not mean to apply rightly the decorator.

Is it possible to get a indicator or another flag to kwon where the decorator is placed, whether over the getter or over the setter? The feature would be very useful in some cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions