-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype-extensions.ts
33 lines (28 loc) · 1.28 KB
/
type-extensions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// If your plugin extends types from another plugin, you should import the plugin here.
// To extend one of Hardhat's types, you need to import the module where it has been defined, and redeclare it.
import "hardhat/types/config";
import "hardhat/types/runtime";
import { CrabadaHardhatRuntimeEnvironment } from "./scripts/hre";
declare module "hardhat/types/config" {
// This is an example of an extension to one of the Hardhat config values.
// We extend the UserConfig type, which represents the config as written
// by the users. Things are normally optional here.
export interface HardhatUserConfig {
nodeId?: number;
}
// We also extend the Config type, which represents the configuration
// after it has been resolved. This is the type used during the execution
// of tasks, tests and scripts.
// Normally, you don't want things to be optional here. As you can apply
// default values using the extendConfig function.
export interface HardhatConfig {
nodeId: number;
}
}
declare module "hardhat/types/runtime" {
// This is an example of an extension to the Hardhat Runtime Environment.
// This new field will be available in tasks' actions, scripts, and tests.
export interface HardhatRuntimeEnvironment {
crabada: CrabadaHardhatRuntimeEnvironment;
}
}