From c2ef0b63a92dbbca3bedea5835c0bf1e0fa0240b Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Thu, 14 Mar 2024 12:03:28 +0200 Subject: [PATCH] Even less breaking changes (#104) --- packages/core/lib/queues/HandlerContainer.ts | 1 + packages/sns/lib/sns/AbstractSnsSqsConsumerMonoSchema.ts | 2 +- .../sns/lib/sns/AbstractSnsSqsConsumerMultiSchema.ts | 2 +- packages/sqs/lib/sqs/AbstractSqsConsumerMonoSchema.ts | 9 ++++----- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/lib/queues/HandlerContainer.ts b/packages/core/lib/queues/HandlerContainer.ts index 790afd2e..7da1dd22 100644 --- a/packages/core/lib/queues/HandlerContainer.ts +++ b/packages/core/lib/queues/HandlerContainer.ts @@ -225,6 +225,7 @@ export class HandlerContainer< >[], ): Record< string, + // eslint-disable-next-line @typescript-eslint/no-explicit-any MessageHandlerConfig > { return supportedHandlers.reduce( diff --git a/packages/sns/lib/sns/AbstractSnsSqsConsumerMonoSchema.ts b/packages/sns/lib/sns/AbstractSnsSqsConsumerMonoSchema.ts index 7fd02b17..867f5967 100644 --- a/packages/sns/lib/sns/AbstractSnsSqsConsumerMonoSchema.ts +++ b/packages/sns/lib/sns/AbstractSnsSqsConsumerMonoSchema.ts @@ -34,7 +34,7 @@ export type NewSnsSqsConsumerOptions = NewSQSConsumerOptions< export type NewSnsSqsConsumerOptionsMono< MessagePayloadType extends object, ExecutionContext, - PrehandlerOutput, + PrehandlerOutput = undefined, > = NewSnsSqsConsumerOptions & MonoSchemaQueueOptions & CommonSQSConsumerOptionsMono diff --git a/packages/sns/lib/sns/AbstractSnsSqsConsumerMultiSchema.ts b/packages/sns/lib/sns/AbstractSnsSqsConsumerMultiSchema.ts index bc9cd5b7..6aac4bcf 100644 --- a/packages/sns/lib/sns/AbstractSnsSqsConsumerMultiSchema.ts +++ b/packages/sns/lib/sns/AbstractSnsSqsConsumerMultiSchema.ts @@ -32,7 +32,7 @@ export type NewSnsSqsConsumerOptionsMulti< export abstract class AbstractSnsSqsConsumerMultiSchema< MessagePayloadSchemas extends object, ExecutionContext, - PrehandlerOutput, + PrehandlerOutput = undefined, > extends AbstractSqsConsumerMultiSchema< MessagePayloadSchemas, ExecutionContext, diff --git a/packages/sqs/lib/sqs/AbstractSqsConsumerMonoSchema.ts b/packages/sqs/lib/sqs/AbstractSqsConsumerMonoSchema.ts index cc0918eb..45dc58a9 100644 --- a/packages/sqs/lib/sqs/AbstractSqsConsumerMonoSchema.ts +++ b/packages/sqs/lib/sqs/AbstractSqsConsumerMonoSchema.ts @@ -7,7 +7,6 @@ import type { PrehandlingOutputs, } from '@message-queue-toolkit/core' import type { ZodSchema } from 'zod' -import { undefined } from 'zod' import type { ExistingSQSConsumerOptions, @@ -25,7 +24,7 @@ const DEFAULT_BARRIER_RESULT = { export type CommonSQSConsumerOptionsMono< MessagePayloadType extends object, ExecutionContext, - PrehandlerOutput, + PrehandlerOutput = undefined, > = { prehandlers?: Prehandler[] } @@ -33,8 +32,8 @@ export type CommonSQSConsumerOptionsMono< export type NewSQSConsumerOptionsMono< MessagePayloadType extends object, ExecutionContext, - PrehandlerOutput, - CreationConfigType extends SQSCreationConfig, + PrehandlerOutput = undefined, + CreationConfigType extends SQSCreationConfig = SQSCreationConfig, > = NewSQSConsumerOptions & MonoSchemaQueueOptions & CommonSQSConsumerOptionsMono @@ -42,7 +41,7 @@ export type NewSQSConsumerOptionsMono< export type ExistingSQSConsumerOptionsMono< MessagePayloadType extends object, ExecutionContext, - PrehandlerOutput, + PrehandlerOutput = undefined, QueueLocatorType extends SQSQueueLocatorType = SQSQueueLocatorType, > = ExistingSQSConsumerOptions & MonoSchemaQueueOptions &