refactor(契约): 判题状态码收进契约唯一一份,并收紧 18 处 as any

- 状态码常量与 judgeStatusSchema 移到 packages/contract/src/judge-status.ts,
  后端 judge/status.ts 只再导出;前端 SubmissionStatus 枚举加编译期断言对齐契约
  (实测改坏一个码会当场类型检查失败)
- 类型逃逸 22 处降到 4 处:collab/handler、pagination、configUpdate、
  ExerciseManager、ProblemSubmission、pk.vue tooltip;剩下的是词云插件无类型、
  生成的 .d.ts、skulpt 和 TextEditor

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 04:40:30 -06:00
parent f90d01338e
commit b5ba56ccd0
11 changed files with 77 additions and 51 deletions

View File

@@ -298,7 +298,7 @@ watch(query, listSubmissions)
<n-tag
v-for="item in statusDistribution"
:key="item.result"
:type="item.type as any"
:type="item.type"
size="small"
round
>