fix: 修复 tsc 类型错误,通过 CI typecheck 阶段

- bridgeClient.ts: 添加缺失的 pairingInProgress 属性声明
- ink.tsx: 移除 5 处不再需要的 @ts-expect-error,保留 1 处 MACRO 比较
- client.ts: 添加缺失的 pendingSessionTarget 属性声明

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-05-01 22:00:29 +08:00
parent 9ea9859dce
commit 491c16da25
3 changed files with 3 additions and 6 deletions

View File

@@ -71,6 +71,8 @@ export class BridgeClient implements SocketClient {
private peerConnectedWaiters: Array<(arrived: boolean) => void> = []
/** The request_id of the current pending pairing broadcast. */
private pendingPairingRequestId: string | undefined
/** Whether a pairing broadcast is in progress (multiple extensions, no persisted selection). */
private pairingInProgress = false
/** The deviceId from a previous persisted pairing. */
private persistedDeviceId: string | undefined
/** Resolve callback for a blocking switchBrowser() call. */

View File

@@ -329,7 +329,6 @@ export default class Ink {
}
};
// @ts-expect-error createContainer arg count varies across react-reconciler versions
this.container = reconciler.createContainer(
this.rootNode,
ConcurrentRoot,
@@ -881,7 +880,6 @@ export default class Ink {
pause(): void {
// Flush pending React updates and render before pausing.
// @ts-expect-error flushSyncFromReconciler exists in react-reconciler but not in @types
reconciler.flushSyncFromReconciler();
this.onRender();
@@ -1580,9 +1578,7 @@ export default class Ink {
</App>
);
// @ts-expect-error updateContainerSync exists in react-reconciler but not in @types
reconciler.updateContainerSync(tree, this.container, null, noop);
// @ts-expect-error flushSyncWork exists in react-reconciler but not in @types
reconciler.flushSyncWork();
}
@@ -1651,9 +1647,7 @@ export default class Ink {
this.drainTimer = null;
}
// @ts-expect-error updateContainerSync exists in react-reconciler but not in @types
reconciler.updateContainerSync(null, this.container, null, noop);
// @ts-expect-error flushSyncWork exists in react-reconciler but not in @types
reconciler.flushSyncWork();
instances.delete(this.options.stdout);

View File

@@ -118,6 +118,7 @@ export class ACPClient {
reject: (err: Error) => void
timer: ReturnType<typeof setTimeout>
} | null = null
private pendingSessionTarget: string | null = null
private connectResolve: ((value: undefined) => void) | null = null
private connectReject: ((error: Error) => void) | null = null