(variables: unknown)
| 225 | * @returns A normalized variables object |
| 226 | */ |
| 227 | export function normalizeVariables(variables: unknown): Record<string, Variable> { |
| 228 | if (!variables) return {} |
| 229 | if (Array.isArray(variables)) return {} |
| 230 | if (typeof variables !== 'object') return {} |
| 231 | return variables as Record<string, Variable> |
| 232 | } |
| 233 | |
| 234 | /** Input format item with optional UI-only fields */ |
| 235 | type InputFormatItem = Record<string, unknown> & { collapsed?: boolean } |
no outgoing calls
no test coverage detected