(value: unknown)
| 175 | } |
| 176 | |
| 177 | export function normalizeRuntimeHints(value: unknown): SessionRuntimeHints | undefined { |
| 178 | if (!isRecord(value)) return undefined; |
| 179 | const platform = value.platform; |
| 180 | const metroHost = readOptionalString(value, 'metroHost'); |
| 181 | const metroPort = typeof value.metroPort === 'number' ? value.metroPort : undefined; |
| 182 | const bundleUrl = readOptionalString(value, 'bundleUrl'); |
| 183 | const launchUrl = readOptionalString(value, 'launchUrl'); |
| 184 | return { |
| 185 | platform: platform === 'ios' || platform === 'android' ? platform : undefined, |
| 186 | metroHost, |
| 187 | metroPort, |
| 188 | bundleUrl, |
| 189 | launchUrl, |
| 190 | }; |
| 191 | } |
| 192 | |
| 193 | export function normalizeOpenDevice( |
| 194 | value: Record<string, unknown>, |
no test coverage detected