fix(backend): drop dead, mistyped itemRouter export#36
Closed
eouzoe wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改了什麼
apps/backend/src/contract.ts移除未被使用的itemRouter匯出;apps/backend/src/handler.ts同步移除對itemRouter的 import。為什麼要修改
itemRouter是一段死代碼:從未被任何路由或入口掛載,且 export 的 router 與實際 RPC handler(itemHandler)路徑不一致(mistyped)。留著只會造成混淆與維護負擔。功能
涉及檔案
apps/backend/src/contract.ts(-7 行,itemRouter整段)apps/backend/src/handler.ts(import 行移除itemRouter)影響
handler.ts中的itemHandler,不受影響。dist/構建產物)已確認無itemRouter引用。參考文件 / 依據
apps/backend/src/index.ts掛載的是itemHandler(RPCHandler(itemHandler)),而非itemRouter。測試
apps/backend執行tsc --noEmit -p .通過(移除後類型檢查仍 OK)。itemRouter確認 src 零引用。