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

Type Parameters

TFunction

TFunction extends (…args) => unknown

Parameters

fn

TFunction The method to decorate.

Returns

TFunction The decorator.

Remarks

The decorator is returned with the signature it was given, rather than widened to MethodDecorator, so a decorator built on top of this keeps whatever constraint it declares on its target.

Example