typescript 使用as转换类型出现is missing the following properties from type错误问题
Conversion of type 'AxiosResponse<Response<void>, any>' to type 'Response<void>' may be a mistake because neither type sufficiently overl
aps with the other. If this was intentional, convert the expression to 'unknown' first.
Type 'AxiosResponse<Response<void>, any>' is missing the following properties from type 'Response<void>': code, msg
解决方式: xxx as unknow as string 双重类型断言(强制转换)解决这个问题。
GPT给出的合理的解决方案(经过人脑确认):


复制请注明出处,在世界中挣扎的灰太狼

浙公网安备 33010602011771号