serverless-aws-lambda
Version:
AWS Application Load Balancer and API Gateway - Lambda dev tool for Serverless. Allows Express synthax in handlers. Supports packaging, local invoking and offline ALB, APG, S3, SNS, SQS, DynamoDB Stream server mocking.
20 lines (19 loc) • 589 B
TypeScript
import type { ServerResponse } from "http";
interface ErrorMessage {
errorType: string;
errorMessage: string;
trace: string[];
}
export declare class StreamEncoder {
#private;
res: ServerResponse;
static complete: Buffer;
constructor(res: ServerResponse);
write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): void;
end(chunk?: Uint8Array): void;
setHeader(key: string, value: string): void;
destroy(): void;
endWithError(payload: ErrorMessage): void;
endWithJson(payload: any): void;
}
export {};