@twilio-labs/serverless-runtime-types
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "@twilio-labs/serverless-runtime-types", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "TypeScript definitions to define globals for the Twilio Serverless runtime", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import twilio from 'twilio'; | ||
import { ServiceContext } from 'twilio/lib/rest/sync/v1/service'; | ||
export type EnvironmentVariables = { | ||
[key: string]: string | undefined; | ||
}; | ||
export type ResourceMap = { | ||
@@ -20,1 +24,15 @@ [name: string]: { | ||
} & T; | ||
export type ServerlessCallback = ( | ||
error: null | Error, | ||
payload?: object | ||
) => void; | ||
export type ServerlessFunctionSignature< | ||
T extends EnvironmentVariables = {}, | ||
U extends {} = {} | ||
> = ( | ||
context: Context<T>, | ||
event: U, | ||
callback: ServerlessCallback | ||
) => void | Promise<void>; |
7369
44