/**
 * Type guard for error objects
 */
export function isError(value) {
    return value instanceof Error;
}
/**
 * Extract error message from unknown error
 */
export function getErrorMessage(error) {
    if (isError(error)) {
        return error.message;
    }
    if (typeof error === 'string') {
        return error;
    }
    return String(error);
}
/**
 * Extract error code from unknown error (for filesystem errors like ENOENT)
 */
export function getErrorCode(error) {
    if (error && typeof error === 'object' && 'code' in error) {
        return error.code;
    }
    return undefined;
}
// Cache types
export * from './cache-types.js';
//# sourceMappingURL=index.js.map