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

Arguments for "after" #17

Open
jeron-diovis opened this issue May 22, 2014 · 0 comments
Open

Arguments for "after" #17

jeron-diovis opened this issue May 22, 2014 · 0 comments

Comments

@jeron-diovis
Copy link

It is not enough to pass to after decorator only value, returned by decorated function. There can bee some logic, based on arguments of decorated function.

Of course, around can be used for this, but why should we care about manually calling origin fn?

Should be something like this:

this.after =
  (decoration) ->
    (base) ->
      (argv...) ->
        decoration.apply(this, [__value__ = base.apply(this, arguments)].concat(argv))
        __value__
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

1 participant