( replay: ReplayContainer, event: RecordingEvent, isCheckout?: boolean, )
| 37 | * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`. |
| 38 | */ |
| 39 | export function addEvent( |
| 40 | replay: ReplayContainer, |
| 41 | event: RecordingEvent, |
| 42 | isCheckout?: boolean, |
| 43 | ): Promise<AddEventResult | null> { |
| 44 | if (!shouldAddEvent(replay, event)) { |
| 45 | return Promise.resolve(null); |
| 46 | } |
| 47 | |
| 48 | return _addEvent(replay, event, isCheckout); |
| 49 | } |
| 50 | |
| 51 | async function _addEvent( |
| 52 | replay: ReplayContainer, |
no test coverage detected