Skip to content

Commit aad3d07

Browse files
committed
fix type import generation
1 parent 07ffa33 commit aad3d07

File tree

1 file changed

+2
-1
lines changed
  • packages/cli/src/scripts/codemod/transforms/export-maps

1 file changed

+2
-1
lines changed

packages/cli/src/scripts/codemod/transforms/export-maps/main.cts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,10 @@ export default function transform(file: FileInfo, api: API): string | undefined
209209
return;
210210
}
211211

212-
if ('importKind' in spec && spec.importKind === 'type') {
212+
if (('importKind' in spec && spec.importKind === 'type') || importPath.node.importKind === 'type') {
213213
newImport.importKind = 'type';
214214
}
215+
215216
j(importPath).insertBefore(newImport);
216217
isDirty = true;
217218
});

0 commit comments

Comments
 (0)