Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect LambdaHandler type #837

Closed
AndKiel opened this issue Mar 12, 2020 · 0 comments · Fixed by #849
Closed

Incorrect LambdaHandler type #837

AndKiel opened this issue Mar 12, 2020 · 0 comments · Fixed by #849
Assignees

Comments

@AndKiel
Copy link

AndKiel commented Mar 12, 2020

Exported LambdaHandler type allows only sync functions even though AWS also supports async lambdas:

export type LambdaHandler<E = object> = (event: E, context: object, callback: Callback) => void;

Rollbar's internal logic also seems to support both sync and async:

Rollbar.prototype.lambdaHandler = function(handler, timeoutHandler) {

but due to the incorrect type declaration linting and/or building of a project can fail.

Possibly Rollbar could use https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/handler.d.ts types for consistency with aws-lambda package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants