Skip to content

Commit

Permalink
Merge pull request #1222 from naorpeled/revert/core/input-handler-pla…
Browse files Browse the repository at this point in the history
…in-lambda-handler-support

revert(core): rollback input handler plain lambda handler support
  • Loading branch information
willfarrell authored Jul 11, 2024
2 parents 35f5d06 + 837442b commit 330f363
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ export interface MiddyfiedHandler<
before: AttachMiddlewareFn<TEvent, TResult, TErr, TContext, TInternal>
after: AttachMiddlewareFn<TEvent, TResult, TErr, TContext, TInternal>
onError: AttachMiddlewareFn<TEvent, TResult, TErr, TContext, TInternal>
handler: <TInputHandlerEventProps, TInputHandlerResultProps>(
handler: <TInputHandlerEventProps = TEvent, TInputHandlerResultProps = TResult>(
handler: MiddlewareHandler<
LambdaHandler<TInputHandlerEventProps, TInputHandlerResultProps>,
TContext
>
| LambdaHandler<TInputHandlerEventProps, TInputHandlerResultProps>
) => MiddyfiedHandler<TInputHandlerEventProps, TInputHandlerResultProps, TErr, TContext, TInternal>
}

Expand Down
3 changes: 1 addition & 2 deletions packages/core/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
APIGatewayProxyResult,
Context,
Handler as AWSLambdaHandler,
S3Handler,
S3Event
} from 'aws-lambda'

Expand Down Expand Up @@ -404,7 +403,7 @@ const handler1176 = middy(baseHandler)
expectType<MiddyfiedHandler<any, any, Error, Context, {}>>(handler1176)

// Issue #1182
const s3Handler: S3Handler = async (event) => {
const s3Handler = async (event: S3Event): Promise<void> => {
await Promise.all(event.Records.map(async () => await Promise.resolve()))
}

Expand Down

0 comments on commit 330f363

Please sign in to comment.