ts-lambda-api - v2.5.5
    Preparing search index...

    Type Alias Callback<TResult>

    Callback: (error?: Error | string | null, result?: TResult) => void

    NodeJS-style callback parameter for the Handler type. Can be used instead of returning a promise, see the AWS documentation for the handler programming model.

    Type Parameters

    • TResult = any

    Type Declaration

      • (error?: Error | string | null, result?: TResult): void
      • Parameters

        • Optionalerror: Error | string | null

          Parameter to use to provide the error payload for a failed lambda execution. See AWS documentation for error handling. If an Error instance is passed, the error payload uses the name property as the errorType, the message property as the errorMessage, and parses the stack property string into the trace array. For other values, the errorType is typeof value, the errorMessage is String(value), and trace is an empty array.

        • Optionalresult: TResult

          Parameter to use to provide the result payload for a successful lambda execution. Pass null or undefined for the error parameter to use this parameter.

        Returns void