Skip to content

Commit

Permalink
Refactor the type-extension so it closely follows the implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Dec 29, 2020
1 parent e8b432c commit ec3ef0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/hardhat-ethers/src/internal/type-extensions.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import * as ethers from "ethers";
import type { ethers } from "ethers";
import "hardhat/types/runtime";

import type {
FactoryOptions as FactoryOptionsT,
getContractFactory as getContractFactoryT,
HardhatEthers,
HardhatEthersHelpers,
Libraries as LibrariesT,
} from "../types";

declare module "hardhat/types/runtime" {
interface HardhatRuntimeEnvironment {
// We omit the ethers field because it is redundant.
ethers: Omit<typeof ethers, "ethers"> & HardhatEthers;
ethers: typeof ethers & HardhatEthersHelpers;
}

// Beware, adding new types to any hardhat type submodule is not a good practice in a Hardhat plugin.
Expand Down

0 comments on commit ec3ef0c

Please sign in to comment.