@@ -60,8 +60,8 @@ export interface ConfigHooks {
60
60
* Provide a handler for this hook to extend the user's config, before any
61
61
* validation or resolution is done.
62
62
*
63
- * @param config - The user's config.
64
- * @param next - A function to call the next handler for this hook.
63
+ * @param config The user's config.
64
+ * @param next A function to call the next handler for this hook.
65
65
* @returns The extended config.
66
66
*/
67
67
extendUserConfig : (
@@ -72,7 +72,7 @@ export interface ConfigHooks {
72
72
/**
73
73
* Provide a handler for this hook to validate the user's config.
74
74
*
75
- * @param config - The user's config.
75
+ * @param config The user's config.
76
76
* @returns An array of validation errors.
77
77
*/
78
78
validateUserConfig : (
@@ -88,8 +88,8 @@ export interface ConfigHooks {
88
88
* result is typed as `HardhatConfig`, it may actually be incomplete, as other
89
89
* plugins may not have resolved their parts of the config yet.
90
90
*
91
- * @param userConfig - The user's config.
92
- * @param next - A function to call the next handler for this hook.
91
+ * @param userConfig The user's config.
92
+ * @param next A function to call the next handler for this hook.
93
93
* @returns The resolved config.
94
94
*/
95
95
resolveUserConfig : (
@@ -133,9 +133,9 @@ export interface ConfigurationVariableHooks {
133
133
* Provide a handler for this hook to customize how to fetch the value
134
134
* that a configuration variable represents.
135
135
*
136
- * @param context - The hook context.
137
- * @param variable - The configuration variable or string to resolve.
138
- * @param next - A function to call if the handler decides to not handle the
136
+ * @param context The hook context.
137
+ * @param variable The configuration variable or string to resolve.
138
+ * @param next A function to call if the handler decides to not handle the
139
139
* resolution of this variable.
140
140
*/
141
141
fetchValue : (
@@ -159,11 +159,11 @@ export interface UserInterruptionHooks {
159
159
* @see UserInterruptionManager#displayMessage to understand when the returned
160
160
* promise should be resolved.
161
161
*
162
- * @param context - The hook context.
163
- * @param interruptor - A name or description of the module trying to display
162
+ * @param context The hook context.
163
+ * @param interruptor A name or description of the module trying to display
164
164
* the message.
165
- * @param message - The message to display.
166
- * @param next - A function to call if the handler decides to not handle the
165
+ * @param message The message to display.
166
+ * @param next A function to call if the handler decides to not handle the
167
167
* message.
168
168
*/
169
169
displayMessage : (
@@ -181,12 +181,12 @@ export interface UserInterruptionHooks {
181
181
* Provide a handler for this hook to customize how the
182
182
* `UserInterruptionManager` requests input from the user.
183
183
*
184
- * @param context - The hook context.
185
- * @param interruptor - A name or description of the module trying to request
184
+ * @param context The hook context.
185
+ * @param interruptor A name or description of the module trying to request
186
186
* input form the user.
187
- * @param inputDescription - A description of the input that is being
187
+ * @param inputDescription A description of the input that is being
188
188
* requested.
189
- * @param next - A function to call if the handler decides to not handle the
189
+ * @param next A function to call if the handler decides to not handle the
190
190
* input request.
191
191
*/
192
192
requestInput : (
@@ -207,12 +207,12 @@ export interface UserInterruptionHooks {
207
207
* Note that handlers for this hook should take care of to not display the
208
208
* user's input in the terminal, and not leak it in any way.
209
209
*
210
- * @param context - The hook context.
211
- * @param interruptor - A name or description of the module trying to request
210
+ * @param context The hook context.
211
+ * @param interruptor A name or description of the module trying to request
212
212
* input form the user.
213
- * @param inputDescription - A description of the input that is being
213
+ * @param inputDescription A description of the input that is being
214
214
* requested.
215
- * @param next - A function to call if the handler decides to not
215
+ * @param next A function to call if the handler decides to not
216
216
* handle the input request.
217
217
*/
218
218
requestSecretInput : (
@@ -240,7 +240,7 @@ export interface HardhatRuntimeEnvironmentHooks {
240
240
/**
241
241
* An interface with utilities to interact with hooks and their handlers.
242
242
*
243
- * This interface provides methods fetch and run hook handlers, as well as
243
+ * This interface provides methods to fetch and run hook handlers, as well as
244
244
* registering and unregistering dynamic ones.
245
245
*
246
246
* Using this `HookManager` you can run a hook's handlers in a few different
@@ -249,6 +249,7 @@ export interface HardhatRuntimeEnvironmentHooks {
249
249
* next one.
250
250
* - In order, where all handlers are called in the order that `getHooks`
251
251
* returns them.
252
+ * - In parallel, where all handlers are called at the same time.
252
253
*/
253
254
export interface HookManager {
254
255
/**
@@ -257,7 +258,7 @@ export interface HookManager {
257
258
* The priority is defined like this:
258
259
* - Dynamically registered handlers come first, in the reverse order they
259
260
* were registered.
260
- * - Plugin handlers come last, in the same reverse of the resolved plugins
261
+ * - Plugin handlers come last, in the same reverse of the resolved plugins
261
262
* list, as seen in `HardhatConfig#plugins`.
262
263
*/
263
264
getHandlers <
@@ -295,15 +296,15 @@ export interface HookManager {
295
296
*
296
297
* For a hook to work with this method, it should look like this:
297
298
*
298
- * `(arg1: Type1, ..., argN: TypeN, n ext : (a1: Type1, ..., aN: TypeN) => Promise<ReturnType>) => Promise<ReturnType>`
299
+ * `(arg1: Type1, ..., argN: TypeN, next : (a1: Type1, ..., aN: TypeN) => Promise<ReturnType>) => Promise<ReturnType>`
299
300
*
300
301
* Note that `next` MUST NOT be called more than once in any handler.
301
302
*
302
- * @param hookCategoryName - The name of the category of the hook whose
303
+ * @param hookCategoryName The name of the category of the hook whose
303
304
* handlers should be run.
304
- * @param hookName - The name of the hook whose handlers should be run.
305
- * @param initialParams - The params to pass to the first handler that is run.
306
- * @param defaultHandler - The last handler in the chain. This can be thought
305
+ * @param hookName The name of the hook whose handlers should be run.
306
+ * @param initialParams The params to pass to the first handler that is run.
307
+ * @param defaultImplementation The last handler in the chain. This can be thought
307
308
* as the behavior that this execution should have in the absense of any
308
309
* handler.
309
310
* @returns The result of executing the chained handlers.
@@ -316,17 +317,17 @@ export interface HookManager {
316
317
hookCategoryName : HookCategoryNameT ,
317
318
hookName : HookNameT ,
318
319
initialParams : InitialChainedHookParams < HookCategoryNameT , HookT > ,
319
- defaultHandler : LastParameter < HookT > ,
320
+ defaultImplementation : LastParameter < HookT > ,
320
321
) : Promise < Awaited < Return < HookT > > > ;
321
322
322
323
/**
323
324
* Runs all the handlers for a hook in the same order that `getHandlers`
324
325
* returns them.
325
326
*
326
- * @param hookCategoryName - The name of the category of the hook whose
327
+ * @param hookCategoryName The name of the category of the hook whose
327
328
* handlers should be run.
328
- * @param hookName - The name of the hook to run.
329
- * @param params - The params to pass to the hooks.
329
+ * @param hookName The name of the hook to run.
330
+ * @param params The params to pass to the hooks.
330
331
*/
331
332
runSequentialHandlers <
332
333
HookCategoryNameT extends keyof HardhatHooks ,
@@ -341,10 +342,10 @@ export interface HookManager {
341
342
/**
342
343
* Runs all the handlers for a hook in parallel.
343
344
*
344
- * @param hookCategoryName - The name of the category of the hook whose
345
+ * @param hookCategoryName The name of the category of the hook whose
345
346
* handlers should be run.
346
- * @param hookName - The name of the hook to run.
347
- * @param params - The params to pass to the hooks.
347
+ * @param hookName The name of the hook to run.
348
+ * @param params The params to pass to the hooks.
348
349
*/
349
350
runParallelHandlers <
350
351
HookCategoryNameT extends keyof HardhatHooks ,
@@ -389,7 +390,7 @@ export type InitialChainedHookParams<
389
390
: ParametersExceptFirstAndLast < HookT > ;
390
391
391
392
/**
392
- * The intial parameters to run a chain of hooks .
393
+ * The initial parameters to run hooks either sequentially or in parallel .
393
394
*/
394
395
export type InitialHookParams <
395
396
HookCategoryNameT extends keyof HardhatHooks ,
0 commit comments