Skip to content
New issue

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

声明initialData,data的值应当不再有undefined #237

Open
4 tasks done
Preyou opened this issue Jan 15, 2025 · 1 comment
Open
4 tasks done

声明initialData,data的值应当不再有undefined #237

Preyou opened this issue Jan 15, 2025 · 1 comment
Labels
enhancement: pending triage issue pending triage

Comments

@Preyou
Copy link

Preyou commented Jan 15, 2025

Description

目前useRequestResultdata的类型始终为Readonly<Ref<TData | undefined>>,当提供了initialData后,data的类型签名应该改为Readonly<Ref<TData | typeof initialData>>

Suggested solution

useRequestResult['data']的签名由Readonly<Ref<TData | undefined>>,改为Readonly<Ref<TData | typeof initialData>>

Alternative

No response

Additional context

No response

Validations

@Preyou Preyou added the enhancement: pending triage issue pending triage label Jan 15, 2025
@XiaoDaiGua-Ray
Copy link
Contributor

XiaoDaiGua-Ray commented Jan 15, 2025

是个不错的建议。会在后续版本优化对于 data 的签名。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement: pending triage issue pending triage
Projects
None yet
Development

No branches or pull requests

2 participants