One method I use to verify if the body property has been passed to the function.
Is there a more straightforward approach in TypeScript?
httpAPI<T>(httpMethod: HttpMethod, url: string, optional?: { params?: HttpParams, body?: any, isUseCache?:boolean }): Observable<T>
{
const body: any = optional === undefined || optional.body === undefined ? undefined : optional.body;
}