frangio / hardhat-exposed

Automatically expose internal Solidity functions for smart contract testing.
82 stars 13 forks source link

Type Extensions are not exposed/available automatically #26

Open matei-radu opened 1 year ago

matei-radu commented 1 year ago

I'm using Hardhat with TypeScript and of course I'm using HardhatUserConfig to type my configuration. I expected the type-extensions.ts file to be picked up automatically by the TypeScript system and effectively patch that type, but that is not the case, saying that the exposed property is not defined.

To make this work, I have to import the type-extensions.ts file explicitly:

import 'hardhat-exposed/dist/type-extensions'
import { HardhatUserConfig } from 'hardhat/config'

const config: HardhatUserConfig = {
    exposed: {
      // My config
    }
}

This is not a problem and it works, however, is this the intended way to use the types?