Page Contents

Home > @loopback/metadata > DesignTimeMethodMetadata

DesignTimeMethodMetadata interface

Design time metadata for a method.

Signature:

export interface DesignTimeMethodMetadata 

Properties

Property Type Description
parameterTypes Function[] An array of parameter types
returnType Function Return type
type Function Type of the method itself. It is Function

Example

class MyController
{
  myMethod(x: string, y: number, z: MyClass): boolean {
    // ...
    return true;
  }
}

The myMethod above has design-time metadata as follows:

{
  type: Function,
  parameterTypes: [String, Number, MyClass],
  returnType: Boolean
}