mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 18:29:23 +02:00
refactor: mark immutable array parameters as readonly
This commit is contained in:
parent
40a60ca112
commit
6873c03a9d
24 changed files with 89 additions and 60 deletions
|
@ -1,9 +1,9 @@
|
|||
export function buildArguments<T>(
|
||||
commands: string[],
|
||||
commands: readonly string[],
|
||||
options: Partial<T> | undefined,
|
||||
map: Partial<Record<keyof T, string>>,
|
||||
): string[] {
|
||||
const args = commands;
|
||||
const args = commands.slice();
|
||||
if (options) {
|
||||
for (const [key, value] of Object.entries(options)) {
|
||||
if (value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue