-
Notifications
You must be signed in to change notification settings - Fork 412
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
[fix] pageview api struct refactor #2343
Conversation
getArticleCounter({ | ||
serverURL, | ||
lang, | ||
paths, | ||
type: ['time'], | ||
signal, | ||
}) | ||
// TODO: Improve this API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
由于 @waline/api 已经采用新的 API 结构了,所以旧版本的兼容可以移除掉。
Since @waline/api has adopted the new API structure, the compatibility of the old version can be removed.
export type GetArticleCounterResponseItem = Record<string, number> & | ||
CounterFields; | ||
|
||
export type GetArticleCounterResponse = GetArticleCounterResponseItem[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
优化 GetArticleCounterResponse 类型,移除掉非数组返回的兼容类型,统一返回类型的数据结构,增加已知类型的指定。
Optimize the GetArticleCounterResponse type, remove the compatible types returned by non-arrays, unify the data structure of the return type, and add the specification of known types.
close #2207 when pr merged