Setu-TS
    Preparing search index...

    Function createDecorator

    • Creates a custom class or method decorator that stores metadata readable by the DecoratorPlugin and custom decorator handlers.

      At registration, for each registered DecoratorHandler whose name matches, the handler is invoked with (metadata, target, propertyKey?).

      Parameters

      • name: string

        Unique decorator name (convention: plugin-name:decorator)

      • metadata: Readonly<Record<string, unknown>>

        Arbitrary metadata payload

      Returns SetuClassOrMethodDecorator

      A class or method decorator

      export const Cacheable = (ttl: number) => createDecorator('cache:cacheable', { ttl });
      

      0.1.0