阶段七:完成 React Feature 化与前置重构收口

This commit is contained in:
Christ committed 2026-08-17 20:29:34 +08:00
1 parent 375e84d663
commit 1a228dc35c
305 files changed
+14179 -5431

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
// commitIfLatest 仅在请求仍为最新时提交结果。
export const commitIfLatest = <T>(
requestID: number,
currentRequestID: number,
requestKey: string,
currentKey: string,
value: T,
commit: (value: T) => void,
): boolean => {
if (requestID !== currentRequestID || requestKey !== currentKey) return false;
commit(value);
return true;
};