Module

ui-decorators/user-requests/decorators

No Angular or DOM imports — safe for pure-Node (backend) bundles. Registration is metadata-based: the decorator records the handler class under USER_REQUEST_KEY and the static UserRequestHandler methods resolve and dispatch it, so no process-wide registry is involved.

View Source user-requests/decorators.ts, line 2

Methods

# static userRequest(reference) → {ClassDecorator}

Registers a handler class for the given request id/type.

Registers a handler class for the given request id/type.

Mirrors core/src/migrations/decorators.ts: Decoration.for(KEY).define({ decorator, args }).apply() plus Metadata.set(USER_REQUEST_KEY, reference, original) so the class is retrievable by id via metadata — UserRequestHandler.getHandler(reference) reads it back and UserRequestHandler.handle(request, renderingEngine) dispatches it — and a class-level metadata(...) payload for introspection (UserRequestHandler.getMetadata(target)).

Parameters:
Name Type Description
reference string

The request id/type the handler is registered for.

View Source user-requests/decorators.ts, line 25

The class decorator to apply.

ClassDecorator