@@ -2,7 +2,6 @@ import type {
2
2
OptionDefinition ,
3
3
ArgumentType ,
4
4
ArgumentTypeToValueType ,
5
- ArgumentValue ,
6
5
PositionalArgumentDefinition ,
7
6
} from "./arguments.js" ;
8
7
import type { HardhatRuntimeEnvironment } from "./hre.js" ;
@@ -33,7 +32,7 @@ declare module "./config.js" {
33
32
* A type representing the concrete arguments of a task. That is,
34
33
* the actual values passed to it.
35
34
*/
36
- export type TaskArguments = Record < string , ArgumentValue | ArgumentValue [ ] > ;
35
+ export type TaskArguments = Record < string , any > ;
37
36
38
37
/**
39
38
* The type of a new task's action function.
@@ -46,7 +45,7 @@ export type TaskArguments = Record<string, ArgumentValue | ArgumentValue[]>;
46
45
* it allows inferring the types of the action function's arguments.
47
46
*/
48
47
export type NewTaskActionFunction <
49
- TaskArgumentsT extends Record < string , any > = Record < string , any > ,
48
+ TaskArgumentsT extends TaskArguments = TaskArguments ,
50
49
> = ( taskArguments : TaskArgumentsT , hre : HardhatRuntimeEnvironment ) => any ;
51
50
52
51
/**
@@ -60,11 +59,11 @@ export type NewTaskActionFunction<
60
59
* it allows inferring the types of the action function's arguments.
61
60
*/
62
61
export type TaskOverrideActionFunction <
63
- TaskArgumentsT extends Record < string , any > = Record < string , any > ,
62
+ TaskArgumentsT extends TaskArguments = TaskArguments ,
64
63
> = (
65
- taskArguments : TaskArgumentsT & Record < string , any > ,
64
+ taskArguments : TaskArgumentsT & TaskArguments ,
66
65
hre : HardhatRuntimeEnvironment ,
67
- runSuper : ( taskArguments : Record < string , any > ) => Promise < any > ,
66
+ runSuper : ( taskArguments : TaskArguments ) => Promise < any > ,
68
67
) => any ;
69
68
70
69
/**
@@ -135,7 +134,7 @@ export type TaskDefinition =
135
134
export type ExtendTaskArguments <
136
135
NameT extends string ,
137
136
TypeT extends ArgumentType ,
138
- TaskArgumentsT extends Record < string , any > ,
137
+ TaskArgumentsT extends TaskArguments ,
139
138
> = Record < NameT , ArgumentTypeToValueType < TypeT > > & TaskArgumentsT ;
140
139
141
140
/**
@@ -157,7 +156,7 @@ export interface EmptyTaskDefinitionBuilder {
157
156
* A builder for creating NewTaskDefinitions.
158
157
*/
159
158
export interface NewTaskDefinitionBuilder <
160
- TaskArgumentsT extends Record < string , any > = Record < string , any > ,
159
+ TaskArgumentsT extends TaskArguments = TaskArguments ,
161
160
> {
162
161
/**
163
162
* Sets the description of the task.
@@ -274,7 +273,7 @@ export interface NewTaskDefinitionBuilder<
274
273
* A builder for overriding existing tasks.
275
274
*/
276
275
export interface TaskOverrideDefinitionBuilder <
277
- TaskArgumentsT extends Record < string , any > = Record < string , any > ,
276
+ TaskArgumentsT extends TaskArguments = TaskArguments ,
278
277
> {
279
278
/**
280
279
* Sets a new description for the task.
0 commit comments