Skip to content

Commit 27f00ed

Browse files
committed
extract callback type to top
1 parent 5030d40 commit 27f00ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/replay/src/coreHandlers/handleAfterSendEvent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { UNABLE_TO_SEND_REPLAY } from '../constants';
55
import type { ReplayContainer } from '../types';
66
import { isErrorEvent, isTransactionEvent } from '../util/eventUtils';
77

8+
type AfterSendEventCallback = (event: Event, sendResponse: TransportMakeRequestResponse | void) => void;
9+
810
/**
911
* Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.
1012
*/
11-
export function handleAfterSendEvent(
12-
replay: ReplayContainer,
13-
): (event: Event, sendResponse: TransportMakeRequestResponse | void) => void {
13+
export function handleAfterSendEvent(replay: ReplayContainer): AfterSendEventCallback {
1414
// Custom transports may still be returning `Promise<void>`, which means we cannot expect the status code to be available there
1515
const enforceStatusCode = isBaseTransportSend();
1616

0 commit comments

Comments
 (0)