diff --git a/.changeset/soft-books-wink.md b/.changeset/soft-books-wink.md new file mode 100644 index 000000000..7add58dc2 --- /dev/null +++ b/.changeset/soft-books-wink.md @@ -0,0 +1,5 @@ +--- +"aws-sdk-js-codemod": patch +--- + +Remove type assertion for ImportSpecifierType diff --git a/src/transforms/v2-to-v3/ts-type/getClientTypeNames.ts b/src/transforms/v2-to-v3/ts-type/getClientTypeNames.ts index 21e1bbcda..2dd0c08cb 100644 --- a/src/transforms/v2-to-v3/ts-type/getClientTypeNames.ts +++ b/src/transforms/v2-to-v3/ts-type/getClientTypeNames.ts @@ -1,6 +1,5 @@ import type { Collection, JSCodeshift, TSQualifiedName, TSTypeReference } from "jscodeshift"; -import type { ImportSpecifierType } from "../modules"; import { getImportSpecifiers } from "../modules/importModule"; import { getClientDeepImportPath } from "../utils"; import { @@ -52,7 +51,7 @@ export const getClientTypeNames = ( clientTypeNames.push( ...getImportSpecifiers(j, source, getClientDeepImportPath(v2ClientName)) .filter((importSpecifier) => importSpecifier.importedName) - .map((importSpecifier) => (importSpecifier as ImportSpecifierType).localName) + .map((importSpecifier) => importSpecifier.localName) ); return [...new Set(clientTypeNames)];