UNPKG

serverless-offline-edge-lambda

Version:

A plugin for the Serverless Framework that simulates the behavior of AWS CloudFront Edge Lambdas while developing offline.

6 lines (5 loc) 418 B
/// <reference types="node" /> import { NextFunction } from 'connect'; import { IncomingMessage, ServerResponse } from 'http'; export type AsyncHandler<T extends IncomingMessage> = (req: T, res: ServerResponse, next: NextFunction) => Promise<any>; export declare function asyncMiddleware<T extends IncomingMessage>(fn: AsyncHandler<T>): (req: IncomingMessage, res: ServerResponse, next: NextFunction) => Promise<any>;