8000 【use-url-state】【Typescript】use-url-state ts 类型问题🙋 · Issue #2730 · alibaba/hooks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

【use-url-state】【Typescript】use-url-state ts 类型问题🙋 #2730

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

Open
8000
LongHaoo opened this issue Feb 8, 2025 · 1 comment
Open

Comments

@LongHaoo
Copy link
Contributor
LongHaoo commented Feb 8, 2025

https://github.com/alibaba/hooks/blob/master/packages/use-url-state/src/index.ts#L33
从 url 取到的值应该都为 string 避免 any 情况的发生

  type State = Partial<{ [key in keyof S]: any }>;
  可以修改为
  type State = Partial<{ [key in keyof S]: string }>;
@LongHaoo
Copy link
Contributor Author

@crazylxr 有时间 review 一下吗

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

No branches or pull requests

1 participant
0