import { captureException } from '@atlaskit/linking-common/sentry'; import { type DatasourceOperationFailedAttributesType } from '../analytics/generated/analytics.types'; type Tail = T extends [ infer _A, ...infer R ] ? R : never; /** * This function is just a wrapper around captureException that checks if the enable-sentry-client FF is enabled * and error is instanceof Error. We have to override the type of error from captureException to unknown so we use * a helper Tail type which removes the first element of the tuple */ export declare const logToSentry: (error: unknown, ...captureExceptionParams: Tail>) => void; interface UseErrorLoggerPropsDatasource { datasourceId: string; } interface UseErrorLoggerPropsActions { integrationKey: string; } export type UseErrorLoggerProps = UseErrorLoggerPropsDatasource | UseErrorLoggerPropsActions; declare const useErrorLogger: (loggerProps: UseErrorLoggerProps) => { captureError: (errorLocation: DatasourceOperationFailedAttributesType["errorLocation"], error: unknown) => void; }; export default useErrorLogger;