Page Contents

Home > @loopback/metadata > MetadataInspector > getDesignTypeForMethod

MetadataInspector.getDesignTypeForMethod() method

Get TypeScript design time type for a method.

Signature:

static getDesignTypeForMethod(target: Object, methodName: string): DesignTimeMethodMetadata | undefined;

Parameters

Parameter Type Description
target Object Class or prototype
methodName string Method name

Returns:

DesignTimeMethodMetadata | undefined

Design time metadata. The return value is undefined in projects that do not enable emitDecoratorMetadata in TypeScript compiler options or are written in vanilla JavaScript.