Skip to content

Commit

Permalink
fix: import type now include module suffix.
Browse files Browse the repository at this point in the history
This is necessary for interpreters like `ts-node` that compile
typescript just in time.
  • Loading branch information
scnale committed Dec 12, 2023
1 parent 4c97734 commit c79da19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typechain/src/codegen/createBarrelFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function createBarrelFiles(

if (typeOnly)
return [
`import type * as ${namespaceIdentifier} from './${p}';`,
`import type * as ${namespaceIdentifier} from './${p}/index${moduleSuffix}';`,
`export type { ${namespaceIdentifier} };`,
].join('\n')

Expand Down

0 comments on commit c79da19

Please sign in to comment.