mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-03 17:59:50 +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
|
@ -53,8 +53,9 @@ export class CmdNoneProtocolService extends AdbNoneProtocolSpawner {
|
|||
throw new Error("Unsupported");
|
||||
}
|
||||
|
||||
command[0] = fallback;
|
||||
return adb.subprocess.noneProtocol.spawn(command);
|
||||
const fallbackCommand = command.slice();
|
||||
fallbackCommand[0] = fallback;
|
||||
return adb.subprocess.noneProtocol.spawn(fallbackCommand);
|
||||
});
|
||||
|
||||
this.#supportsCmd = adb.canUseFeature(AdbFeature.Cmd);
|
||||
|
@ -116,8 +117,9 @@ export class CmdShellProtocolService extends AdbShellProtocolSpawner {
|
|||
throw new Error("Unsupported");
|
||||
}
|
||||
|
||||
command[0] = fallback;
|
||||
return adb.subprocess.shellProtocol.spawn(command);
|
||||
const fallbackCommand = command.slice();
|
||||
fallbackCommand[0] = fallback;
|
||||
return adb.subprocess.shellProtocol.spawn(fallbackCommand);
|
||||
});
|
||||
|
||||
this.#adb = adb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue