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

Nomenclature #67

Open
silkentrance opened this issue Mar 24, 2016 · 0 comments
Open

Nomenclature #67

silkentrance opened this issue Mar 24, 2016 · 0 comments

Comments

@silkentrance
Copy link

This is about distinguishing parameterizable decorators from standard decorators from factory functions/methods that will return either of the two, since there has been quite a misunderstanding about standard decorators vs. parameterizable decorators and along that line also about decorator factories.

decorator

function decorator(...args)
{
   // decorate
}

parameterizable decorator

Note: it is not a factory

function decorator(parameters)
{
  return function decoratorImpl(...args)
  {
     // decorate
  };
}

decorator factory

is not a decorator, will produce instances of decorators

function factory(factoryOptions)
{
     // e.g.
     return function parameterizableDecorator(parameters)
     {
        //...
     };
}
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