(value: ComputedConfigValue | undefined)
| 99 | } |
| 100 | |
| 101 | function toStringValue(value: ComputedConfigValue | undefined): string | undefined { |
| 102 | if (typeof value === "string") { |
| 103 | return value; |
| 104 | } |
| 105 | |
| 106 | if (Array.isArray(value)) { |
| 107 | const first = value[0]; |
| 108 | if (typeof first === "string") { |
| 109 | return first; |
| 110 | } |
| 111 | if (isParsedValueToken(first)) { |
| 112 | return tokensToString(value as ParsedValueToken[]); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | return undefined; |
| 117 | } |
| 118 | |
| 119 | type MatchCriteriaValue = string | Array<{ val: string; separator: string; quoted?: boolean }>; |
| 120 |
no test coverage detected