1
- import type { GlobalParameterMap } from "../../types/global-parameters.js" ;
1
+ import type { GlobalParametersMap } from "../../types/global-parameters.js" ;
2
2
import type { HardhatRuntimeEnvironment } from "../../types/hre.js" ;
3
3
import type {
4
4
Task ,
@@ -24,7 +24,7 @@ export class TaskManagerImplementation implements TaskManager {
24
24
25
25
constructor (
26
26
hre : HardhatRuntimeEnvironment ,
27
- globalParameterIndex : GlobalParameterMap ,
27
+ globalParametersMap : GlobalParametersMap ,
28
28
) {
29
29
this . #hre = hre ;
30
30
@@ -36,7 +36,7 @@ export class TaskManagerImplementation implements TaskManager {
36
36
37
37
for ( const taskDefinition of plugin . tasks ) {
38
38
this . #reduceTaskDefinition(
39
- globalParameterIndex ,
39
+ globalParametersMap ,
40
40
taskDefinition ,
41
41
plugin . id ,
42
42
) ;
@@ -45,7 +45,7 @@ export class TaskManagerImplementation implements TaskManager {
45
45
46
46
// reduce global user defined tasks
47
47
for ( const taskDefinition of this . #hre. config . tasks ) {
48
- this . #reduceTaskDefinition( globalParameterIndex , taskDefinition ) ;
48
+ this . #reduceTaskDefinition( globalParametersMap , taskDefinition ) ;
49
49
}
50
50
}
51
51
@@ -136,7 +136,7 @@ export class TaskManagerImplementation implements TaskManager {
136
136
}
137
137
138
138
#reduceTaskDefinition(
139
- globalParameterIndex : GlobalParameterMap ,
139
+ globalParametersMap : GlobalParametersMap ,
140
140
taskDefinition : TaskDefinition ,
141
141
pluginId ?: string ,
142
142
) {
@@ -154,7 +154,7 @@ export class TaskManagerImplementation implements TaskManager {
154
154
}
155
155
case TaskDefinitionType . NEW_TASK : {
156
156
this . #validateClashesWithGlobalParams(
157
- globalParameterIndex ,
157
+ globalParametersMap ,
158
158
taskDefinition ,
159
159
pluginId ,
160
160
) ;
@@ -174,7 +174,7 @@ export class TaskManagerImplementation implements TaskManager {
174
174
}
175
175
case TaskDefinitionType . TASK_OVERRIDE : {
176
176
this . #validateClashesWithGlobalParams(
177
- globalParameterIndex ,
177
+ globalParametersMap ,
178
178
taskDefinition ,
179
179
pluginId ,
180
180
) ;
@@ -186,7 +186,7 @@ export class TaskManagerImplementation implements TaskManager {
186
186
}
187
187
188
188
#validateClashesWithGlobalParams(
189
- globalParameterIndex : GlobalParameterMap ,
189
+ globalParametersMap : GlobalParametersMap ,
190
190
taskDefinition : NewTaskDefinition | TaskOverrideDefinition ,
191
191
pluginId ?: string ,
192
192
) {
@@ -197,7 +197,7 @@ export class TaskManagerImplementation implements TaskManager {
197
197
: [ ] ;
198
198
199
199
[ ...namedParamNames , ...positionalParamNames ] . forEach ( ( paramName ) => {
200
- const globalParamEntry = globalParameterIndex . get ( paramName ) ;
200
+ const globalParamEntry = globalParametersMap . get ( paramName ) ;
201
201
if ( globalParamEntry !== undefined ) {
202
202
throw new HardhatError (
203
203
HardhatError . ERRORS . TASK_DEFINITIONS . TASK_PARAMETER_ALREADY_DEFINED ,
0 commit comments