Skip to content

Nomenclature #67

Description

@silkentrance

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)
     {
        //...
     };
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions