From cecc3ad9817604afd706dc3de8033878b9fbdca2 Mon Sep 17 00:00:00 2001 From: Brando Meniconi Date: Tue, 3 Dec 2024 15:16:53 +0100 Subject: [PATCH] chore: mode DeepPartial implementation to a types forlder --- packages/sqs-lambda/src/eventbridge.ts | 5 +---- packages/sqs-lambda/src/types/index.ts | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 packages/sqs-lambda/src/types/index.ts diff --git a/packages/sqs-lambda/src/eventbridge.ts b/packages/sqs-lambda/src/eventbridge.ts index 66bfc50..3dd61e0 100644 --- a/packages/sqs-lambda/src/eventbridge.ts +++ b/packages/sqs-lambda/src/eventbridge.ts @@ -13,10 +13,7 @@ import { SqsEventSourceProps, } from "aws-cdk-lib/aws-lambda-event-sources"; import { Duration } from "aws-cdk-lib"; - -type DeepPartial = { - [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; -}; +import { DeepPartial } from "./types"; export type EventBridgeSqsLambdaRuleProps = Required< Pick diff --git a/packages/sqs-lambda/src/types/index.ts b/packages/sqs-lambda/src/types/index.ts new file mode 100644 index 0000000..e422dd5 --- /dev/null +++ b/packages/sqs-lambda/src/types/index.ts @@ -0,0 +1,3 @@ +export type DeepPartial = { + [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; +};