type-extensions.ts 639 Bytes
Newer Older
1 2 3
import 'hardhat/types/runtime'
import 'hardhat/types/config'

4
import { DeployConfigSpec } from './types'
5 6 7

declare module 'hardhat/types/config' {
  interface HardhatUserConfig {
8
    deployConfigSpec?: DeployConfigSpec<any>
9 10 11
  }

  interface HardhatConfig {
12
    deployConfigSpec?: DeployConfigSpec<any>
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
  }

  interface ProjectPathsUserConfig {
    deployConfig?: string
  }

  interface ProjectPathsConfig {
    deployConfig?: string
  }
}

declare module 'hardhat/types/runtime' {
  interface HardhatRuntimeEnvironment {
    deployConfig: {
      [key: string]: any
    }
29
    getDeployConfig(network: string): { [key: string]: any }
30 31
  }
}