Stone.js API
    Preparing search index...
    • Build a method decorator that marks a method as the handler for a key, under a given metadata key.

      Consuming modules use it to create their own named decorators, e.g. export const OnJob = createKeyDecorator(QUEUE_KEY) -> @OnJob('send-email'). Each decorated method appends { key, action } to the class's metadata under metaKey; the module later reads them with collectKeyHandlers. Purely additive: it annotates, it does not wrap the method.

      Type Parameters

      • T extends Function = Function

      Parameters

      • metaKey: symbol

        The metadata key the module owns.

      Returns (key: string) => MethodDecorator

      A (key) => MethodDecorator factory.