fix: tighten ci typecheck coverage

This commit is contained in:
Cita
2026-03-23 16:02:13 +08:00
parent 40c8c1c7ad
commit 4b903fdd3b
69 changed files with 335 additions and 222 deletions
+1
View File
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react';
import type { BrandInfo } from '../../components/BrandIcon.js';
import type { RouteDecision, RouteDecisionCandidate, RouteMode } from '../../../shared/tokenRouteContract.js';
export type { RouteDecision, RouteDecisionCandidate, RouteMode } from '../../../shared/tokenRouteContract.js';
export type RouteSortBy = 'modelPattern' | 'channelCount';
export type RouteSortDir = 'asc' | 'desc';
@@ -25,8 +25,11 @@ export function useRouteChannels() {
}
}, []);
const invalidateChannels = useCallback((routeId: number) => {
const invalidateChannels = useCallback((routeId?: number) => {
setChannelsByRouteId((prev) => {
if (routeId === undefined) {
return {};
}
const next = { ...prev };
delete next[routeId];
return next;