Open FFdhorkin opened 1 year ago
had same problem
i set
alwaysGenerateOverloads: true,
in hardhat.config.js
module.exports = {
solidity: "0.8.24",
defaultNetwork: 'localhost',
typechain: {
// outDir: "./artifacts/types", // Directory where TypeChain generates types
target: "ethers-v6", // Specify ethers.js version
alwaysGenerateOverloads: true,
dontOverrideCompile: false,
}
};
and works
I have a package.json with
"type": "module"
and am attempting to get Hardhat to play nice with TypeScript and ESM.I've noticed that if I have a config file
hardhat.config.cjs
, then it doesn't generate any types. However, if I rename that same file tohardhat.config.cts
(with a test patch forhardhat
so that it supports this config file), suddenly it generates types. Here's a log to demo this: