There is a method in my code:
public cancelOperation(OperationId: string): Promise<void>
{
// some calls
}
I retrieve OperationId from another function:
let operationId = GetOperationId() {}
which returns a nullable OperationId,
operationId?: string;
When trying to use the OperationId received from GetOperationId() in the cancelOperation() method, I encounter an error due to its nullable nature.
Is there an equivalent of
operationId .Value
or
operationId .HasValue
function in Typescript that I can utilize?
Even though I could handle it by checking the value of operationId like this:
cancelOperation(playAudioResult.operationId ? playAudioResult.operationId : "")
I'm looking for a solution that would allow me to do something similar to:
cancelOperation(operationId.?????)