mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Fixup aws lambda callback definitions. (#20381)
This commit is contained in:
committed by
Wesley Wigham
parent
f72b298cc5
commit
e119988a71
15
types/aws-lambda/index.d.ts
vendored
15
types/aws-lambda/index.d.ts
vendored
@@ -1,6 +1,13 @@
|
||||
// Type definitions for AWS Lambda
|
||||
// Project: http://docs.aws.amazon.com/lambda
|
||||
// Definitions by: James Darbyshire <https://github.com/darbio/aws-lambda-typescript>, Michael Skarum <https://github.com/skarum>, Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>, Toby Hede <https://github.com/tobyhede>, Rich Buggy <https://github.com/buggy>, Yoriki Yamaguchi <https://github.com/y13i>, wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Definitions by: James Darbyshire <https://github.com/darbio/aws-lambda-typescript>
|
||||
// Michael Skarum <https://github.com/skarum>
|
||||
// Stef Heyenrath <https://github.com/StefH/DefinitelyTyped>
|
||||
// Toby Hede <https://github.com/tobyhede>
|
||||
// Rich Buggy <https://github.com/buggy>
|
||||
// Yoriki Yamaguchi <https://github.com/y13i>
|
||||
// wwwy3y3 <https://github.com/wwwy3y3>
|
||||
// Ishaan Malhi <https://github.com/OrthoDex>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// API Gateway "event"
|
||||
@@ -347,8 +354,8 @@ export type CustomAuthorizerHandler = (event: CustomAuthorizerEvent, context: Co
|
||||
* @param error – an optional parameter that you can use to provide results of the failed Lambda function execution.
|
||||
* @param result – an optional parameter that you can use to provide the result of a successful function execution. The result provided must be JSON.stringify compatible.
|
||||
*/
|
||||
export type Callback = (error?: Error, result?: any) => void;
|
||||
export type ProxyCallback = (error?: Error, result?: ProxyResult) => void;
|
||||
export type CustomAuthorizerCallback = (error?: Error, result?: AuthResponse) => void;
|
||||
export type Callback = (error?: Error | null, result?: object) => void;
|
||||
export type ProxyCallback = (error?: Error | null, result?: ProxyResult) => void;
|
||||
export type CustomAuthorizerCallback = (error?: Error | null, result?: AuthResponse) => void;
|
||||
|
||||
export as namespace AWSLambda;
|
||||
|
||||
Reference in New Issue
Block a user