Skip to main content
createClassDecorator<TFunction>(fn): TFunction
Defined in: packages/http-framework/src/lib/decorators/utils.ts:32 Utility to make a class decorator from a function.

Type Parameters

TFunction

TFunction extends (…args) => unknown

Parameters

fn

TFunction The class to decorate.

Returns

TFunction The decorator.

Remarks

The decorator is returned with the signature it was given, rather than widened to ClassDecorator, so a decorator built on top of this keeps whatever constraint it declares on its target. This is what lets RegisterCommand and its siblings reject a target that is not a Command.

See

ApplyOptions