Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • export=

Index

Constructors

constructor

  • new export=(context: any, callback: Function): export=
  • Parameters

    • context: any
    • callback: Function

    Returns export=

Properties

Private _body

_body: any[] | Record<string, null | string | number | object>

Private _callback

_callback: Function

Private _code

_code: number = 200

Private _context

_context: any

Private _headers

_headers: Record<string, string | number>

Private _status

_status: string = 'OK'

Private _type

_type: string = ''

Methods

allow

  • allow(origin: string): void
  • Parameters

    • origin: string

    Returns void

body

  • body(data: any[] | Record<string, null | string | number | object>): void
  • Parameters

    • data: any[] | Record<string, null | string | number | object>

    Returns void

code

  • code(code: number): void
  • Parameters

    • code: number

    Returns void

error

  • error(error: ErrorInterface): any
  • Parameters

    • error: ErrorInterface

    Returns any

header

  • header(key: string, value: string): void
  • Parameters

    • key: string
    • value: string

    Returns void

headers

  • headers(headers?: Record<string, string | number>): Record<string, string | number>
  • Parameters

    • Optional headers: Record<string, string | number>

    Returns Record<string, string | number>

send

  • send(): any
  • Returns any

status

  • status(status: string): void
  • Parameters

    • status: string

    Returns void

toJSON

  • toJSON(): any[] | Record<string, null | string | number | object>
  • Returns any[] | Record<string, null | string | number | object>

Generated using TypeDoc