Commit 22abbd5 1 parent 0eca4fa commit 22abbd5 Copy full SHA for 22abbd5
File tree 3 files changed +8
-9
lines changed
3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,10 @@ export function resolveGlobalOptions(
156
156
parsedValue = option . defaultValue ;
157
157
}
158
158
159
- globalOptions [ name ] = parsedValue ;
159
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions
160
+ -- GlobalOptions is empty for user extension, so we need to cast it to
161
+ assign the value. */
162
+ ( globalOptions as Record < string , ParameterValue > ) [ name ] = parsedValue ;
160
163
}
161
164
162
165
return globalOptions ;
Original file line number Diff line number Diff line change 1
- import type {
2
- ParameterType ,
3
- ParameterTypeToValueType ,
4
- ParameterValue ,
5
- } from "./common.js" ;
1
+ import type { ParameterType , ParameterTypeToValueType } from "./common.js" ;
6
2
7
3
/**
8
4
* A global option with an associated value and a default if not provided by
@@ -29,7 +25,7 @@ export interface GlobalOption<T extends ParameterType = ParameterType> {
29
25
* Runtime Environment.
30
26
*/
31
27
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- To be used through module augmentation
32
- export interface GlobalOptions extends Record < string , ParameterValue > { }
28
+ export interface GlobalOptions { }
33
29
34
30
/**
35
31
* An entry in the global options map.
Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ function parseDoubleDashArgs(
378
378
cliArguments : string [ ] ,
379
379
usedCliArguments : boolean [ ] ,
380
380
optionsMap : Map < string , TaskOption | GlobalOption > ,
381
- argumentsMap : TaskArguments | Partial < GlobalOptions > ,
381
+ argumentsMap : TaskArguments ,
382
382
ignoreUnknownParameter = false ,
383
383
) {
384
384
for ( let i = 0 ; i < cliArguments . length ; i ++ ) {
@@ -525,7 +525,7 @@ function parsePositionalAndVariadicParameters(
525
525
526
526
function validateRequiredParameters (
527
527
parameters : TaskParameter [ ] ,
528
- taskArguments : TaskArguments | Partial < GlobalOptions > ,
528
+ taskArguments : TaskArguments ,
529
529
) {
530
530
const missingRequiredParam = parameters . find (
531
531
( param ) =>
You can’t perform that action at this time.
0 commit comments