Type Alias JSONResponseOptions

JSONResponseOptions: {
    data: unknown;
    metadata?: object;
    res: Response;
    status?: number | string;
}

The options to build a reponse for JSON.

Type declaration

  • data: unknown

    The actual data for the response. It will be added in a data property.

  • Optionalmetadata?: object

    Extra information to include inside the metadata object.

  • res: Response

    The response object generated by the application.

  • Optionalstatus?: number | string

    The status code for the response.

    200