mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-22 16:25:51 +00:00
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:
@@ -71,6 +71,8 @@ export class BridgeClient implements SocketClient {
|
|||||||
private peerConnectedWaiters: Array<(arrived: boolean) => void> = []
|
private peerConnectedWaiters: Array<(arrived: boolean) => void> = []
|
||||||
/** The request_id of the current pending pairing broadcast. */
|
/** The request_id of the current pending pairing broadcast. */
|
||||||
private pendingPairingRequestId: string | undefined
|
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. */
|
/** The deviceId from a previous persisted pairing. */
|
||||||
private persistedDeviceId: string | undefined
|
private persistedDeviceId: string | undefined
|
||||||
/** Resolve callback for a blocking switchBrowser() call. */
|
/** Resolve callback for a blocking switchBrowser() call. */
|
||||||
|
|||||||
@@ -329,7 +329,6 @@ export default class Ink {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-expect-error createContainer arg count varies across react-reconciler versions
|
|
||||||
this.container = reconciler.createContainer(
|
this.container = reconciler.createContainer(
|
||||||
this.rootNode,
|
this.rootNode,
|
||||||
ConcurrentRoot,
|
ConcurrentRoot,
|
||||||
@@ -881,7 +880,6 @@ export default class Ink {
|
|||||||
|
|
||||||
pause(): void {
|
pause(): void {
|
||||||
// Flush pending React updates and render before pausing.
|
// Flush pending React updates and render before pausing.
|
||||||
// @ts-expect-error flushSyncFromReconciler exists in react-reconciler but not in @types
|
|
||||||
reconciler.flushSyncFromReconciler();
|
reconciler.flushSyncFromReconciler();
|
||||||
this.onRender();
|
this.onRender();
|
||||||
|
|
||||||
@@ -1580,9 +1578,7 @@ export default class Ink {
|
|||||||
</App>
|
</App>
|
||||||
);
|
);
|
||||||
|
|
||||||
// @ts-expect-error updateContainerSync exists in react-reconciler but not in @types
|
|
||||||
reconciler.updateContainerSync(tree, this.container, null, noop);
|
reconciler.updateContainerSync(tree, this.container, null, noop);
|
||||||
// @ts-expect-error flushSyncWork exists in react-reconciler but not in @types
|
|
||||||
reconciler.flushSyncWork();
|
reconciler.flushSyncWork();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1651,9 +1647,7 @@ export default class Ink {
|
|||||||
this.drainTimer = null;
|
this.drainTimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error updateContainerSync exists in react-reconciler but not in @types
|
|
||||||
reconciler.updateContainerSync(null, this.container, null, noop);
|
reconciler.updateContainerSync(null, this.container, null, noop);
|
||||||
// @ts-expect-error flushSyncWork exists in react-reconciler but not in @types
|
|
||||||
reconciler.flushSyncWork();
|
reconciler.flushSyncWork();
|
||||||
instances.delete(this.options.stdout);
|
instances.delete(this.options.stdout);
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ export class ACPClient {
|
|||||||
reject: (err: Error) => void
|
reject: (err: Error) => void
|
||||||
timer: ReturnType<typeof setTimeout>
|
timer: ReturnType<typeof setTimeout>
|
||||||
} | null = null
|
} | null = null
|
||||||
|
private pendingSessionTarget: string | null = null
|
||||||
|
|
||||||
private connectResolve: ((value: undefined) => void) | null = null
|
private connectResolve: ((value: undefined) => void) | null = null
|
||||||
private connectReject: ((error: Error) => void) | null = null
|
private connectReject: ((error: Error) => void) | null = null
|
||||||
|
|||||||
Reference in New Issue
Block a user