MCPcopy
hub / github.com/Kong/insomnia / invokeSyncMethod

Function invokeSyncMethod

packages/insomnia/src/entry.preload.ts:153–165  ·  view source on GitHub ↗
(methodName: string, ...args: unknown[])

Source from the content-addressed store, hash-verified

151};
152
153const 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
167const sync: SyncBridgeAPI = {
168 archiveProject: () => invokeSyncMethod('archiveProject'),

Callers 1

entry.preload.tsFile · 0.85

Tested by

no test coverage detected