Type Narrowing Vapi.Call vs CallBatchResponse
When I invoke
Since there are no shared props, Typescript can't narrow it automatically. So I have to do something like:
I’d rather avoid writing this manually. Am I missing a better way to handle this?
vapi.calls.create it returns the following type:Since there are no shared props, Typescript can't narrow it automatically. So I have to do something like:
I’d rather avoid writing this manually. Am I missing a better way to handle this?