Function method

  • Shortcut function to create a new RsterApiMethod object.

    Type Parameters

    • NAME extends string

    • DECLARATION extends ParameterDeclaration<AllowAnyTypeInformation, {
          [key: string]: {
              required: boolean;
              type: AllowAnyTypeInformation;
          };
      }, {
          [key: string]: {
              required: boolean;
              type: AllowAnyTypeInformation;
          };
      }, {
          [key: string]: {
              required: boolean;
              type: AllowAnyTypeInformation;
          };
      }, DECLARATION>

    Parameters

    • name: NAME

      The name of the method.

    • description: string[]

      The description of the method.

    • declaration: DECLARATION

      The declaration of the method.

    • Optional httpPath: string

      The http path of the method. Does not include the parent module's path, only the path for the method's condition. If not provided, it will be generated from the name and declaration.

    • Optional httpMethod: Method

      The http method of the method. If not provided, it will be defaulted to ALL.

    • Optional action: ActionFunction<DECLARATION>

      The action of the method. If not provided, it will be defaulted to a method that throws an error.

    Returns RsterApiMethod<NAME, DECLARATION>

    The new RsterApiMethod object.

Generated using TypeDoc