From c1057b00b06cc4485d0c3e9d5d74a1d55fe09a7d Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:07:49 -0700 Subject: [PATCH] test: add ddb-doc-client-redundant-type/global-import --- .../global-import.input.ts | 14 ++++++++++++++ .../global-import.output.ts | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.input.ts create mode 100644 src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.output.ts diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.input.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.input.ts new file mode 100644 index 000000000..d9dee85d6 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.input.ts @@ -0,0 +1,14 @@ +import AWS from "aws-sdk"; + +// Native types +const stringType: AWS.DynamoDB.DocumentClient.String = "string"; +const booleanType: AWS.DynamoDB.DocumentClient.BooleanObject = true; +const numberType: AWS.DynamoDB.DocumentClient.Integer = 123; + +// Date +const dateType: AWS.DynamoDB.DocumentClient.TableCreationDateTime = new Date(); + +// Arrays +const stringArray: AWS.DynamoDB.DocumentClient.AttributeNameList = ["string1", "string2"]; +const numberArray: AWS.DynamoDB.DocumentClient.ItemCollectionSizeEstimateRange = [123, 456]; +const structureArray: AWS.DynamoDB.DocumentClient.Endpoints = [{ Address: "string", CachePeriodInMinutes: 5 }]; \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.output.ts b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.output.ts new file mode 100644 index 000000000..caff167d6 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/ddb-doc-client-redundant-type/global-import.output.ts @@ -0,0 +1,14 @@ +import AWS_DynamoDBDocumentClient from "@aws-sdk/lib-dynamodb"; + +// Native types +const stringType: string = "string"; +const booleanType: boolean = true; +const numberType: number = 123; + +// Date +const dateType: Date = new Date(); + +// Arrays +const stringArray: Array = ["string1", "string2"]; +const numberArray: Array = [123, 456]; +const structureArray: Array = [{ Address: "string", CachePeriodInMinutes: 5 }]; \ No newline at end of file