refactor: mark immutable array parameters as readonly

This commit is contained in:
Simon Chan 2025-06-16 16:32:49 +08:00
parent 40a60ca112
commit 6873c03a9d
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
24 changed files with 89 additions and 60 deletions

View file

@ -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) {