(value: unknown)
| 34 | * discriminated union on `type` — validating the discriminant is |
| 35 | * sufficient for the predicate; callers narrow further via the union. */ |
| 36 | export function isSDKMessage(value: unknown): value is SDKMessage { |
| 37 | return ( |
| 38 | value !== null && |
| 39 | typeof value === 'object' && |
| 40 | 'type' in value && |
| 41 | typeof value.type === 'string' |
| 42 | ) |
| 43 | } |
| 44 | |
| 45 | /** Type predicate for control_response messages from the server. */ |
| 46 | export function isSDKControlResponse( |
no outgoing calls
no test coverage detected