Skip to content

Commit

Permalink
Remove type assertion for ImportSpecifierType (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Aug 8, 2024
1 parent 49ff721 commit e9efdd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-books-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"aws-sdk-js-codemod": patch
---

Remove type assertion for ImportSpecifierType
3 changes: 1 addition & 2 deletions src/transforms/v2-to-v3/ts-type/getClientTypeNames.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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)];
Expand Down

0 comments on commit e9efdd5

Please sign in to comment.