(input: unknown, tag: string)
| 9 | } |
| 10 | |
| 11 | function configData(input: unknown, tag: string): Record<string, unknown> | undefined { |
| 12 | if (!isRecord(input)) return undefined |
| 13 | if (input.name === tag && isRecord(input.data)) return input.data |
| 14 | if (input._tag === tag) return input |
| 15 | return undefined |
| 16 | } |
| 17 | |
| 18 | function stringField(input: Record<string, unknown>, key: string): string | undefined { |
| 19 | return typeof input[key] === "string" ? input[key] : undefined |
no test coverage detected