(methodName: string, ...args: unknown[])
| 151 | }; |
| 152 | |
| 153 | const invokeSyncMethod = async <T>(methodName: string, ...args: unknown[]) => { |
| 154 | try { |
| 155 | return (await invokeWithNormalizedError('sync.invoke', methodName, ...args)) as T; |
| 156 | } catch (error) { |
| 157 | if (isUserAbortResolveMergeConflictError(error)) { |
| 158 | throw new UserAbortResolveMergeConflictError( |
| 159 | 'message' in error && typeof error.message === 'string' ? error.message : undefined, |
| 160 | ); |
| 161 | } |
| 162 | |
| 163 | throw error; |
| 164 | } |
| 165 | }; |
| 166 | |
| 167 | const sync: SyncBridgeAPI = { |
| 168 | archiveProject: () => invokeSyncMethod('archiveProject'), |
no test coverage detected