dethcrypto / TypeChain

🔌 TypeScript bindings for Ethereum smart contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ContractRunner should be imported using `import type`

tiakun opened this issue · comments

commented

The issue is that my Svelte is not compiling due to ContractRunner in the factory does not get imported using import type. I think this is related to #636, but the fix did not include ethers-v6 target. Here is the code sample generated for ethers-v6 target:

https://github.com/dethcrypto/TypeChain/blob/2b29791881cfb87bfff62b31f375943c782a9905/packages/target-ethers-v6-test/types/factories/v0.8.9/ISimpleToken__factory.ts

The generated code should add type to ContractRunner

-import { Contract, Interface, ContractRunner } from "ethers";
+import { Contract, Interface, type ContractRunner } from "ethers";