Commit cdf9948
committed
fix(ts): 修复 typecheck 两处报错
1. leaderboard as Row[] → leaderboard as unknown as Row[]
JSON 字面量的 dailyCounts 各自是不同 literal 类型,和 Row 的 Record<string, number>
索引签名不兼容,CI tsc --noEmit 报 TS2352。先经 unknown 绕开。
2. ProfileCard title prop 必填 string,但 UserPaperItem 引入 itemKey 后 title 变可选。
兜底为 p.title || p.itemKey || "(untitled paper)"。1 parent 17ee41d commit cdf9948
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
318 | | - | |
| 320 | + | |
| 321 | + | |
319 | 322 | | |
320 | 323 | | |
321 | 324 | | |
| |||
0 commit comments