Skip to content

Commit 49fb575

Browse files
committed
barrel file moduleSuffix for type exports
1 parent c8ac1aa commit 49fb575

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/typechain/src/codegen/createBarrelFiles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ export function createBarrelFiles(
5353
.map((p) => {
5454
const namespaceIdentifier = camelCase(p)
5555

56+
if (typeOnly && moduleSuffix)
57+
return [
58+
`import type * as ${namespaceIdentifier} from './${p}/index${moduleSuffix}';`,
59+
`export type { ${namespaceIdentifier} };`,
60+
].join('\n')
61+
5662
if (typeOnly)
5763
return [
5864
`import type * as ${namespaceIdentifier} from './${p}';`,

0 commit comments

Comments
 (0)