Skip to content

从2更新到3后,回调函数里,提示response 的类型为unkown,之前没有 #478

Closed Answered by JOU-amjs
manortec asked this question in Q&A
Discussion options

You must be logged in to vote

在ts中使用的话,alovaInstance.Post没有指定返回数据类型默认就是unknown,这其实也是在提示你可能忘记指定数据类型了,如果你不想指定则给它一个any即可,像这样alovaInstance.Post<any>(...)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by manortec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants