// 自定义错误类 export class BridgeError extends Error { constructor(message: string, public code?: string) { super(message); this.name = "BridgeError"; } }