( path: StartBlockPath, legacyStarterMode: 'manual' | 'api' | 'chat' | null )
| 214 | } |
| 215 | |
| 216 | function pathConsumesInputFormat( |
| 217 | path: StartBlockPath, |
| 218 | legacyStarterMode: 'manual' | 'api' | 'chat' | null |
| 219 | ): boolean { |
| 220 | switch (path) { |
| 221 | case StartBlockPath.SPLIT_CHAT: |
| 222 | return false |
| 223 | case StartBlockPath.LEGACY_STARTER: |
| 224 | return legacyStarterMode !== 'chat' |
| 225 | default: |
| 226 | return true |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | export function coerceValue(type: string | null | undefined, value: unknown): unknown { |
| 231 | if (value === undefined || value === null) { |
no outgoing calls
no test coverage detected