@@ -11,7 +11,7 @@ export function getDirectory(): string {
11
11
return process . cwd ( ) ;
12
12
}
13
13
14
- export async function resolveOptions ( args : ReadonlyArray < string > , directory : string , config ?: et . ElementTree ) : Promise < Options > {
14
+ export async function resolveOptions ( args : readonly string [ ] , directory : string , config ?: et . ElementTree ) : Promise < Options > {
15
15
const doc = config ? config . getroot ( ) : undefined ;
16
16
const platformList = filterSupportedPlatforms ( doc ? getPlatforms ( doc ) : [ ] ) ;
17
17
const parsedOptions = parseOptions ( args ) ;
@@ -23,7 +23,7 @@ export async function resolveOptions(args: ReadonlyArray<string>, directory: str
23
23
} ;
24
24
}
25
25
26
- export function parseOptions ( args : ReadonlyArray < string > ) : Options {
26
+ export function parseOptions ( args : readonly string [ ] ) : Options {
27
27
const json = args . includes ( '--json' ) ;
28
28
const resourcesDirectory = getOptionValue ( args , '--resources' , DEFAULT_RESOURCES_DIRECTORY ) ;
29
29
const platformArg = args [ 0 ] ? args [ 0 ] : undefined ;
@@ -37,14 +37,14 @@ export function parseOptions(args: ReadonlyArray<string>): Options {
37
37
} ;
38
38
}
39
39
40
- export function generatePlatformOptions ( platforms : ReadonlyArray < Platform > , resourcesDirectory : string , args : ReadonlyArray < string > ) : PlatformOptions {
40
+ export function generatePlatformOptions ( platforms : readonly Platform [ ] , resourcesDirectory : string , args : readonly string [ ] ) : PlatformOptions {
41
41
return platforms . reduce ( ( acc , platform ) => {
42
42
acc [ platform ] = generateRunOptions ( platform , resourcesDirectory , args ) ;
43
43
return acc ;
44
44
} , { } as PlatformOptions ) ;
45
45
}
46
46
47
- export function generateRunOptions ( platform : Platform , resourcesDirectory : string , args : ReadonlyArray < string > ) : RunPlatformOptions {
47
+ export function generateRunOptions ( platform : Platform , resourcesDirectory : string , args : readonly string [ ] ) : RunPlatformOptions {
48
48
const typeOption = getOptionValue ( args , '--type' ) ;
49
49
const types = validateResourceTypes ( typeOption ? [ typeOption ] : RESOURCE_TYPES ) ;
50
50
@@ -55,7 +55,7 @@ export function generateRunOptions(platform: Platform, resourcesDirectory: strin
55
55
} ;
56
56
}
57
57
58
- export function parseAdaptiveIconResourceOptions ( platform : Platform , resourcesDirectory : string , args : ReadonlyArray < string > ) : AdaptiveIconResourceOptions | undefined {
58
+ export function parseAdaptiveIconResourceOptions ( platform : Platform , resourcesDirectory : string , args : readonly string [ ] ) : AdaptiveIconResourceOptions | undefined {
59
59
if ( platform !== Platform . ANDROID ) {
60
60
return ;
61
61
}
@@ -67,7 +67,7 @@ export function parseAdaptiveIconResourceOptions(platform: Platform, resourcesDi
67
67
} ;
68
68
}
69
69
70
- export function parseAdaptiveIconForegroundOptions ( resourcesDirectory : string , args : ReadonlyArray < string > ) : AdaptiveIconResourceOptions [ 'foreground' ] {
70
+ export function parseAdaptiveIconForegroundOptions ( resourcesDirectory : string , args : readonly string [ ] ) : AdaptiveIconResourceOptions [ 'foreground' ] {
71
71
const source = parseAdaptiveIconSourceFromArgs ( ResourceKey . FOREGROUND , args ) ;
72
72
73
73
if ( source && source . type !== SourceType . RASTER ) {
@@ -81,7 +81,7 @@ export function parseAdaptiveIconForegroundOptions(resourcesDirectory: string, a
81
81
} ;
82
82
}
83
83
84
- export function parseAdaptiveIconBackgroundOptions ( resourcesDirectory : string , args : ReadonlyArray < string > ) : AdaptiveIconResourceOptions [ 'background' ] {
84
+ export function parseAdaptiveIconBackgroundOptions ( resourcesDirectory : string , args : readonly string [ ] ) : AdaptiveIconResourceOptions [ 'background' ] {
85
85
const source = parseAdaptiveIconSourceFromArgs ( ResourceKey . BACKGROUND , args ) ;
86
86
87
87
return {
@@ -91,12 +91,12 @@ export function parseAdaptiveIconBackgroundOptions(resourcesDirectory: string, a
91
91
} ;
92
92
}
93
93
94
- export function parseSimpleResourceOptions ( platform : Platform , type : ResourceType . ICON | ResourceType . SPLASH , resourcesDirectory : string , args : ReadonlyArray < string > ) : SimpleResourceOptions {
94
+ export function parseSimpleResourceOptions ( platform : Platform , type : ResourceType . ICON | ResourceType . SPLASH , resourcesDirectory : string , args : readonly string [ ] ) : SimpleResourceOptions {
95
95
const source = parseSourceFromArgs ( type , args ) ;
96
96
return { sources : source ? [ source ] : getDefaultSources ( platform , type , resourcesDirectory ) } ;
97
97
}
98
98
99
- export function parseAdaptiveIconSourceFromArgs ( type : ResourceKey . FOREGROUND | ResourceKey . BACKGROUND , args : ReadonlyArray < string > ) : Source | undefined {
99
+ export function parseAdaptiveIconSourceFromArgs ( type : ResourceKey . FOREGROUND | ResourceKey . BACKGROUND , args : readonly string [ ] ) : Source | undefined {
100
100
const sourceOption = getOptionValue ( args , `--icon-${ type } -source` ) ;
101
101
102
102
if ( ! sourceOption ) {
@@ -106,7 +106,7 @@ export function parseAdaptiveIconSourceFromArgs(type: ResourceKey.FOREGROUND | R
106
106
return parseSource ( sourceOption ) ;
107
107
}
108
108
109
- export function parseSourceFromArgs ( type : ResourceType . ICON | ResourceType . SPLASH , args : ReadonlyArray < string > ) : string | undefined {
109
+ export function parseSourceFromArgs ( type : ResourceType . ICON | ResourceType . SPLASH , args : readonly string [ ] ) : string | undefined {
110
110
const sourceOption = getOptionValue ( args , `--${ type } -source` ) ;
111
111
112
112
if ( sourceOption ) {
0 commit comments