UNPKG

@imigueldiaz/mongodb-labeler

Version:

A MongoDB-based labeling system for content moderation with cryptographic signing

13 lines (12 loc) 414 B
/** * Type guard to check if an error is an instance of Error */ export declare function isError(error: unknown): error is Error; /** * Safe error handler for async operations */ export declare function safeAsyncOperation<T>(operation: () => Promise<T>, errorPrefix?: string): Promise<T>; /** * Get a safe error message from any error type */ export declare function getErrorMessage(error: unknown): string;