We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前useRequest方法调用时,即使传入了initialData,data的返回值中还是会| undefined,导致实际使用接口数据的时候,需要加入非空校验;
useRequest
initialData
| undefined
declare type State<R, P> = { loading: Ref<boolean>; data: Ref<R | undefined>; error: Ref<Error | undefined>; params: Ref<P>; };
期望在传入initialData时 data的类型去掉undefined,或者使用initalData的类型替代undefined
data
undefined
initalData
#165
The text was updated successfully, but these errors were encountered:
Duplicate of #165
Sorry, something went wrong.
No branches or pull requests
需求描述 Feature Description
目前
useRequest
方法调用时,即使传入了initialData
,data的返回值中还是会| undefined
,导致实际使用接口数据的时候,需要加入非空校验;建议的解决方案 Proposed Solution
期望在传入
initialData
时data
的类型去掉undefined
,或者使用initalData
的类型替代undefined
其他信息 Other information
#165
The text was updated successfully, but these errors were encountered: