Skip to content

Commit

Permalink
revert(core): rollback input handler plain lambda handler support
Browse files Browse the repository at this point in the history
  • Loading branch information
naorpeled committed Jul 1, 2024
1 parent 799b200 commit 837442b
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 837442b

Please sign in to comment.