(record: Record<string, unknown>, key: string)
| 144 | } |
| 145 | |
| 146 | function stringParam(record: Record<string, unknown>, key: string): string { |
| 147 | const value = record[key] |
| 148 | if (typeof value !== "string" || value.length < 1) throw new Error(`${key} is invalid`) |
| 149 | return value |
| 150 | } |
| 151 | |
| 152 | function optionalStringParam(record: Record<string, unknown>, key: string): string | undefined { |
| 153 | const value = record[key] |
no outgoing calls
no test coverage detected