rest string[] => string

This commit is contained in:
mierenmanz 2021-04-30 08:13:45 +02:00
parent a8bb3cc49b
commit 52ec39a24c

View file

@ -102,5 +102,6 @@ function parseRest(
argsNullable: Array<string | null> argsNullable: Array<string | null>
): void { ): void {
const restValues = argsNullable.filter((x) => typeof x === 'string') const restValues = argsNullable.filter((x) => typeof x === 'string')
args[entry.name] = restValues !== null ? restValues : entry.defaultValue args[entry.name] =
restValues !== null ? restValues?.join(' ') : entry.defaultValue
} }