UNPKG

@yandex-cloud/function-types

Version:

TypeScript typings for Serverless Functions in Yandex.Cloud

6 lines (5 loc) 379 B
import Context from "./context"; declare type FunctionSyncHandler<Event, Result> = (event: Event, context: Context) => Result; declare type FunctionAsyncHandler<Event, Result> = (event: Event, context: Context) => Promise<Result>; export declare type FunctionHandler<Event, Result = unknown> = FunctionSyncHandler<Event, Result> | FunctionAsyncHandler<Event, Result>; export {};