diff --git a/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts new file mode 100644 index 000000000..5bbe11018 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts @@ -0,0 +1,8 @@ +import AWS from "aws-sdk"; + +export const isAwsError = (error: unknown): error is AWS.AWSError => { + if (error === undefined) { + return false + } + return error instanceof Error; +} \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts new file mode 100644 index 000000000..2837beec3 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts @@ -0,0 +1,8 @@ +import { ServiceException } from "@smithy/smithy-client"; + +export const isAwsError = (error: unknown): error is ServiceException => { + if (error === undefined) { + return false + } + return error instanceof Error; +} \ No newline at end of file