How about we declear types like below so that we can make code easy to read and simple and avoid code duplication?
typeJsonRequestParams={method: 'POST'|'PUT';data: Dict<Serializable>;};typeTextRequestParams={method: 'POST';data: string;contentType: string;};typeGetRequestParams={method: 'GET';data?: UrlParams;};typeDeleteRequestParams={method: 'DELETE';};
params?: JsonRequestParams|TextRequestParams|GetRequestParams|DeleteRequestParamsOriginally posted by @ioanmo226 in #5372 (comment)
Originally posted by @ioanmo226 in #5372 (comment)