Skip to content

qqnt: fix the baseline typecheck errors on main (no behavior change) - #13

Merged
std-microblock merged 1 commit into
std-microblock:mainfrom
std-external:fix/platform-crossgram-typecheck
Oct 18, 2026
Merged

std-microblock merged 1 commit into
std-microblock:mainfrom
std-external:fix/platform-crossgram-typecheck

Conversation

@std-external

@std-external std-external commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

这个 PR 是什么

纯基线修复,不含本次回显重复(#12)的任何改动,也没有运行时行为变化。

main(7a1ecfc)的 Unit tests and typecheck 本来就是红的:yarn typecheck(tsc -p tsconfig.test.json)报 4 个类型错,全部在 platform-crossgram,由加群邀请按钮那次提交(22f7608)带进来的类型漂移导致。main 的 CI run 39050915894 可以直接看到。

因为 #12 需要跑同一个 typecheck job,这个基线红会让任何 PR 的 unit/typecheck 都红,所以单独修在一个 PR 里,和 #12 的功能改动互不掺杂。

4 个错误与修法

位置 问题 修法
packages/platform-crossgram/src/index.ts:1035 clickInlineButton 实际返回 refresh: true,声明的返回类型没有该字段(IMPlatform.clickInlineButton 在 packages/bridge/src/platform.ts:804 要求 refresh?: true) 返回类型补 refresh?: true,与 bridge 侧接口一致
packages/platform-crossgram/src/invite-accept.e2e.test.ts:109 事件回调返回 { updates: [] },不符合 PlatformEventPublishResult 回调改为不返回值(该用例只收集 edits)
packages/platform-crossgram/src/invite-accept.e2e.test.ts:117 messages.getHistory 请求缺 hash 补 hash: Long.ZERO
packages/platform-crossgram/src/platform.test.ts:255 getHistory mock 的返回字面量被拓宽,card.kind 不再匹配 WireCard 联合类型 mock 标注返回类型 Promise<{ messages: WireMessage[] }>,补 WireMessage 类型导入

验证

  • yarn typecheck(tsc -p tsconfig.test.json)→ 0 错误(改动前 4 个错误)。
  • vitest run packages/platform-crossgram/src/platform.test.ts packages/platform-crossgram/src/client.test.ts → 198 passed。
  • 本 PR CI:unit/typecheck 双平台、WebUI e2e、Compose e2e、Publish 全部 pass。

与 #12 的关系

@std-external std-external changed the title qqnt: keep the inline-button refresh flag in the return type qqnt: fix the baseline typecheck errors on main (no behavior change) Oct 18, 2026
@std-microblock
std-microblock merged commit 132c32e into std-microblock:main Oct 18, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants