@wonderwhy-er/desktop-commander
Version:
MCP server for terminal operations and file editing
18 lines (17 loc) • 787 B
TypeScript
/**
* Send an event to Google Analytics
* @param event Event name
* @param properties Optional event properties
*/
export declare const capture: (event: string, properties?: any) => void;
/**
* Executes a promise with a timeout. If the promise doesn't resolve or reject within
* the specified timeout, returns the provided default value.
*
* @param operation The promise to execute
* @param timeoutMs Timeout in milliseconds
* @param operationName Name of the operation (for logs)
* @param defaultValue Value to return if the operation times out
* @returns Promise that resolves with the operation result or the default value on timeout
*/
export declare function withTimeout<T>(operation: Promise<T>, timeoutMs: number, operationName: string, defaultValue: T): Promise<T>;