presta
Version:
Hyper minimal framework for the modern web.
16 lines (15 loc) • 789 B
TypeScript
import { Params, MultiValueParams, Event as LambdaEvent, Context as LambdaContext, Response as LambdaResponse } from 'lambda-types';
export declare type Headers = Params;
export declare type MultiValueHeaders = MultiValueParams;
export declare type QueryStringParameters = Params;
export declare type MultiValueQueryStringParameters = MultiValueParams;
export declare type PathParameters = Params;
export declare type Event = Omit<LambdaEvent, 'requestContext' | 'resource'>;
export declare type Context = LambdaContext;
export declare type Response = Omit<LambdaResponse, 'statusCode'> & {
statusCode?: number;
html?: string;
json?: object;
xml?: string;
};
export declare type Handler = (event: Event, context: Context) => Promise<Response | string> | Response | string;