From c79da19985f3e77be31bd46143aff976d2353e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Claudio=20Nale?= Date: Tue, 12 Dec 2023 17:21:03 -0300 Subject: [PATCH] fix: `import type` now include module suffix. This is necessary for interpreters like `ts-node` that compile typescript just in time. --- packages/typechain/src/codegen/createBarrelFiles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typechain/src/codegen/createBarrelFiles.ts b/packages/typechain/src/codegen/createBarrelFiles.ts index f1e764db..e2dd7131 100644 --- a/packages/typechain/src/codegen/createBarrelFiles.ts +++ b/packages/typechain/src/codegen/createBarrelFiles.ts @@ -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')