(_options: ApplicationTrackingOptions)
| 93 | > | null = null; |
| 94 | |
| 95 | export function initApplication(_options: ApplicationTrackingOptions) { |
| 96 | options = _options; |
| 97 | |
| 98 | // Initialize batch manager |
| 99 | batchManager = new BatchManager({ |
| 100 | batchDelay: _options.batchDelay, |
| 101 | disableBatch: _options.disableBatch, |
| 102 | onBatchSend: async (items) => { |
| 103 | await sendBatchRequest(_options.serverUrl, items); |
| 104 | }, |
| 105 | onSingleSend: async (item) => { |
| 106 | await sendSingleRequest( |
| 107 | _options.serverUrl, |
| 108 | item.type as 'event' | 'identify', |
| 109 | item.payload |
| 110 | ); |
| 111 | }, |
| 112 | }); |
| 113 | } |
| 114 | |
| 115 | let currentScreenName: string | undefined = undefined; |
| 116 | let currentScreenParams: Record<string, any> | undefined = undefined; |
nothing calls this directly
no test coverage detected