@microsoft/applicationinsights-web-basic 2.8.0-beta.2203-10 → 2.8.0-beta.2203-13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,6 @@
9
9
  // @public (undocumented)
10
10
  export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
11
11
  constructor();
12
- // Warning: (ae-forgotten-export) The symbol "IPlugin" needs to be exported by the entry point index.d.ts
13
12
  // Warning: (ae-forgotten-export) The symbol "IDiagnosticLogger" needs to be exported by the entry point index.d.ts
14
13
  // Warning: (ae-forgotten-export) The symbol "INotificationManager" needs to be exported by the entry point index.d.ts
15
14
  //
@@ -22,44 +21,221 @@ export class AppInsightsCore extends BaseCore implements IAppInsightsCore {
22
21
  // @public
23
22
  export class ApplicationInsights {
24
23
  constructor(config: IConfiguration & IConfig);
24
+ addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
25
+ // Warning: (ae-forgotten-export) The symbol "UnloadHandler" needs to be exported by the entry point index.d.ts
26
+ addUnloadCb(handler: UnloadHandler): void;
25
27
  // Warning: (ae-forgotten-export) The symbol "IConfig" needs to be exported by the entry point index.d.ts
26
28
  //
27
29
  // (undocumented)
28
30
  config: IConfiguration & IConfig;
31
+ evtNamespace(): string;
29
32
  flush(async?: boolean): void;
33
+ getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
34
+ // (undocumented)
35
+ getSKUDefaults(): void;
30
36
  initialize(): void;
31
37
  // (undocumented)
38
+ pollInternalLogs(): void;
39
+ // (undocumented)
32
40
  stopPollingInternalLogs(): void;
33
41
  track(item: ITelemetryItem): void;
42
+ unload(isAsync?: boolean, unloadComplete?: () => void): void;
34
43
  }
35
44
 
45
+ // @public
46
+ export function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
47
+
36
48
  // Warning: (ae-forgotten-export) The symbol "ICoreUtils" needs to be exported by the entry point index.d.ts
37
49
  //
38
50
  // @public @deprecated
39
51
  export const CoreUtils: ICoreUtils;
40
52
 
53
+ // @public (undocumented)
54
+ export const enum _eInternalMessageId {
55
+ // (undocumented)
56
+ BrowserCannotReadLocalStorage = 1,
57
+ // (undocumented)
58
+ BrowserCannotReadSessionStorage = 2,
59
+ // (undocumented)
60
+ BrowserCannotWriteLocalStorage = 3,
61
+ // (undocumented)
62
+ BrowserCannotWriteSessionStorage = 4,
63
+ // (undocumented)
64
+ BrowserDoesNotSupportLocalStorage = 0,
65
+ // (undocumented)
66
+ BrowserFailedRemovalFromLocalStorage = 5,
67
+ // (undocumented)
68
+ BrowserFailedRemovalFromSessionStorage = 6,
69
+ // (undocumented)
70
+ CannotAccessCookie = 68,
71
+ // (undocumented)
72
+ CannotParseAiBlobValue = 101,
73
+ // (undocumented)
74
+ CannotSendEmptyTelemetry = 7,
75
+ // (undocumented)
76
+ CannotSerializeObject = 48,
77
+ // (undocumented)
78
+ CannotSerializeObjectNonSerializable = 49,
79
+ // (undocumented)
80
+ CircularReferenceDetected = 50,
81
+ // (undocumented)
82
+ ClearAuthContextFailed = 51,
83
+ // (undocumented)
84
+ ClientPerformanceMathError = 8,
85
+ // (undocumented)
86
+ CreateEnvelopeError = 47,
87
+ // (undocumented)
88
+ ErrorParsingAISessionCookie = 9,
89
+ // (undocumented)
90
+ ErrorPVCalc = 10,
91
+ // (undocumented)
92
+ ExceptionTruncated = 52,
93
+ // (undocumented)
94
+ ExceptionWhileLoggingError = 11,
95
+ // (undocumented)
96
+ FailedAddingCustomDefinedRequestContext = 104,
97
+ // (undocumented)
98
+ FailedAddingTelemetryToBuffer = 12,
99
+ // (undocumented)
100
+ FailedMonitorAjaxAbort = 13,
101
+ // (undocumented)
102
+ FailedMonitorAjaxDur = 14,
103
+ // (undocumented)
104
+ FailedMonitorAjaxGetCorrelationHeader = 18,
105
+ // (undocumented)
106
+ FailedMonitorAjaxOpen = 15,
107
+ // (undocumented)
108
+ FailedMonitorAjaxRSC = 16,
109
+ // (undocumented)
110
+ FailedMonitorAjaxSend = 17,
111
+ // (undocumented)
112
+ FailedMonitorAjaxSetRequestHeader = 71,
113
+ // (undocumented)
114
+ FailedToAddHandlerForOnBeforeUnload = 19,
115
+ // (undocumented)
116
+ FailedToFixDepricatedValues = 44,
117
+ // (undocumented)
118
+ FailedToReportDataLoss = 21,
119
+ // (undocumented)
120
+ FailedToRestoreStorageBuffer = 42,
121
+ // (undocumented)
122
+ FailedToSendQueuedTelemetry = 20,
123
+ // (undocumented)
124
+ FailedToSetStorageBuffer = 41,
125
+ // (undocumented)
126
+ FlushFailed = 22,
127
+ // (undocumented)
128
+ IdTooLong = 69,
129
+ // (undocumented)
130
+ IllegalCharsInName = 53,
131
+ // (undocumented)
132
+ InMemoryStorageBufferFull = 105,
133
+ // (undocumented)
134
+ InvalidBackendResponse = 43,
135
+ // (undocumented)
136
+ InvalidContentBlob = 102,
137
+ // (undocumented)
138
+ InvalidDurationValue = 45,
139
+ // (undocumented)
140
+ InvalidEvent = 70,
141
+ // (undocumented)
142
+ InvalidInstrumentationKey = 100,
143
+ // (undocumented)
144
+ ItemNotInArray = 54,
145
+ // (undocumented)
146
+ MaxAjaxPerPVExceeded = 55,
147
+ // (undocumented)
148
+ MessageLimitPerPVExceeded = 23,
149
+ // (undocumented)
150
+ MessageTruncated = 56,
151
+ // (undocumented)
152
+ MissingRequiredFieldSpecification = 24,
153
+ // (undocumented)
154
+ NameTooLong = 57,
155
+ // (undocumented)
156
+ NavigationTimingNotSupported = 25,
157
+ // (undocumented)
158
+ NotificationException = 74,
159
+ // (undocumented)
160
+ OnError = 26,
161
+ // (undocumented)
162
+ PluginException = 73,
163
+ // (undocumented)
164
+ SampleRateOutOfRange = 58,
165
+ // (undocumented)
166
+ SendBrowserInfoOnUserInit = 72,
167
+ // (undocumented)
168
+ SenderNotInitialized = 28,
169
+ // (undocumented)
170
+ SessionRenewalDateIsZero = 27,
171
+ // (undocumented)
172
+ SessionStorageBufferFull = 67,
173
+ // (undocumented)
174
+ SetAuthContextFailed = 59,
175
+ // (undocumented)
176
+ SetAuthContextFailedAccountName = 60,
177
+ // (undocumented)
178
+ SnippetScriptLoadFailure = 99,
179
+ // (undocumented)
180
+ StartCalledMoreThanOnce = 62,
181
+ // (undocumented)
182
+ StartTrackEventFailed = 29,
183
+ // (undocumented)
184
+ StartTrackFailed = 31,
185
+ // (undocumented)
186
+ StopCalledWithoutStart = 63,
187
+ // (undocumented)
188
+ StopTrackEventFailed = 30,
189
+ // (undocumented)
190
+ StopTrackFailed = 32,
191
+ // (undocumented)
192
+ StringValueTooLong = 61,
193
+ // (undocumented)
194
+ TelemetryEnvelopeInvalid = 46,
195
+ // (undocumented)
196
+ TelemetryInitializerFailed = 64,
197
+ // (undocumented)
198
+ TelemetrySampledAndNotSent = 33,
199
+ // (undocumented)
200
+ TrackArgumentsNotSpecified = 65,
201
+ // (undocumented)
202
+ TrackEventFailed = 34,
203
+ // (undocumented)
204
+ TrackExceptionFailed = 35,
205
+ // (undocumented)
206
+ TrackMetricFailed = 36,
207
+ // (undocumented)
208
+ TrackPageActionEventFailed = 103,
209
+ // (undocumented)
210
+ TrackPVFailed = 37,
211
+ // (undocumented)
212
+ TrackPVFailedCalc = 38,
213
+ // (undocumented)
214
+ TrackTraceFailed = 39,
215
+ // (undocumented)
216
+ TransmissionFailed = 40,
217
+ // (undocumented)
218
+ UrlTooLong = 66
219
+ }
220
+
41
221
  // Warning: (ae-forgotten-export) The symbol "IPerfManagerProvider" needs to be exported by the entry point index.d.ts
42
222
  //
43
223
  // @public (undocumented)
44
224
  export interface IAppInsightsCore extends IPerfManagerProvider {
45
225
  // Warning: (ae-forgotten-export) The symbol "INotificationListener" needs to be exported by the entry point index.d.ts
46
226
  addNotificationListener?(listener: INotificationListener): void;
47
- // Warning: (ae-forgotten-export) The symbol "ITelemetryPlugin" needs to be exported by the entry point index.d.ts
48
227
  addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting?: boolean, doAsync?: boolean, addCb?: (added?: boolean) => void): void;
49
228
  // Warning: (ae-forgotten-export) The symbol "TelemetryInitializerFunction" needs to be exported by the entry point index.d.ts
50
229
  // Warning: (ae-forgotten-export) The symbol "ITelemetryInitializerHandler" needs to be exported by the entry point index.d.ts
51
230
  addTelemetryInitializer(telemetryInitializer: TelemetryInitializerFunction): ITelemetryInitializerHandler | void;
52
- // Warning: (ae-forgotten-export) The symbol "UnloadHandler" needs to be exported by the entry point index.d.ts
53
231
  addUnloadCb(handler: UnloadHandler): void;
54
232
  // (undocumented)
55
233
  config: IConfiguration;
56
234
  evtNamespace(): string;
57
- // Warning: (ae-forgotten-export) The symbol "SendRequestReason" needs to be exported by the entry point index.d.ts
58
235
  flush(isAsync?: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason, cbTimeout?: number): boolean | void;
59
236
  // Warning: (ae-forgotten-export) The symbol "ICookieMgr" needs to be exported by the entry point index.d.ts
60
237
  getCookieMgr(): ICookieMgr;
61
238
  getNotifyMgr(): INotificationManager;
62
- // Warning: (ae-forgotten-export) The symbol "ILoadedPlugin" needs to be exported by the entry point index.d.ts
63
239
  getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
64
240
  // Warning: (ae-forgotten-export) The symbol "IProcessTelemetryContext" needs to be exported by the entry point index.d.ts
65
241
  getProcessTelContext(): IProcessTelemetryContext;
@@ -163,6 +339,16 @@ export interface IEventTelemetry extends IPartC {
163
339
  name: string;
164
340
  }
165
341
 
342
+ // @public (undocumented)
343
+ export interface ILoadedPlugin<T extends IPlugin> {
344
+ isEnabled: () => boolean;
345
+ // (undocumented)
346
+ plugin: T;
347
+ // (undocumented)
348
+ remove: (isAsync?: boolean, removeCb?: (removed?: boolean) => void) => void;
349
+ setEnabled: (isEnabled: boolean) => void;
350
+ }
351
+
166
352
  // @public (undocumented)
167
353
  export interface IMetricTelemetry extends IPartC {
168
354
  average: number;
@@ -174,6 +360,95 @@ export interface IMetricTelemetry extends IPartC {
174
360
  stdDev?: number;
175
361
  }
176
362
 
363
+ // @public
364
+ export const _InternalMessageId: {
365
+ BrowserDoesNotSupportLocalStorage: number;
366
+ BrowserCannotReadLocalStorage: number;
367
+ BrowserCannotReadSessionStorage: number;
368
+ BrowserCannotWriteLocalStorage: number;
369
+ BrowserCannotWriteSessionStorage: number;
370
+ BrowserFailedRemovalFromLocalStorage: number;
371
+ BrowserFailedRemovalFromSessionStorage: number;
372
+ CannotSendEmptyTelemetry: number;
373
+ ClientPerformanceMathError: number;
374
+ ErrorParsingAISessionCookie: number;
375
+ ErrorPVCalc: number;
376
+ ExceptionWhileLoggingError: number;
377
+ FailedAddingTelemetryToBuffer: number;
378
+ FailedMonitorAjaxAbort: number;
379
+ FailedMonitorAjaxDur: number;
380
+ FailedMonitorAjaxOpen: number;
381
+ FailedMonitorAjaxRSC: number;
382
+ FailedMonitorAjaxSend: number;
383
+ FailedMonitorAjaxGetCorrelationHeader: number;
384
+ FailedToAddHandlerForOnBeforeUnload: number;
385
+ FailedToSendQueuedTelemetry: number;
386
+ FailedToReportDataLoss: number;
387
+ FlushFailed: number;
388
+ MessageLimitPerPVExceeded: number;
389
+ MissingRequiredFieldSpecification: number;
390
+ NavigationTimingNotSupported: number;
391
+ OnError: number;
392
+ SessionRenewalDateIsZero: number;
393
+ SenderNotInitialized: number;
394
+ StartTrackEventFailed: number;
395
+ StopTrackEventFailed: number;
396
+ StartTrackFailed: number;
397
+ StopTrackFailed: number;
398
+ TelemetrySampledAndNotSent: number;
399
+ TrackEventFailed: number;
400
+ TrackExceptionFailed: number;
401
+ TrackMetricFailed: number;
402
+ TrackPVFailed: number;
403
+ TrackPVFailedCalc: number;
404
+ TrackTraceFailed: number;
405
+ TransmissionFailed: number;
406
+ FailedToSetStorageBuffer: number;
407
+ FailedToRestoreStorageBuffer: number;
408
+ InvalidBackendResponse: number;
409
+ FailedToFixDepricatedValues: number;
410
+ InvalidDurationValue: number;
411
+ TelemetryEnvelopeInvalid: number;
412
+ CreateEnvelopeError: number;
413
+ CannotSerializeObject: number;
414
+ CannotSerializeObjectNonSerializable: number;
415
+ CircularReferenceDetected: number;
416
+ ClearAuthContextFailed: number;
417
+ ExceptionTruncated: number;
418
+ IllegalCharsInName: number;
419
+ ItemNotInArray: number;
420
+ MaxAjaxPerPVExceeded: number;
421
+ MessageTruncated: number;
422
+ NameTooLong: number;
423
+ SampleRateOutOfRange: number;
424
+ SetAuthContextFailed: number;
425
+ SetAuthContextFailedAccountName: number;
426
+ StringValueTooLong: number;
427
+ StartCalledMoreThanOnce: number;
428
+ StopCalledWithoutStart: number;
429
+ TelemetryInitializerFailed: number;
430
+ TrackArgumentsNotSpecified: number;
431
+ UrlTooLong: number;
432
+ SessionStorageBufferFull: number;
433
+ CannotAccessCookie: number;
434
+ IdTooLong: number;
435
+ InvalidEvent: number;
436
+ FailedMonitorAjaxSetRequestHeader: number;
437
+ SendBrowserInfoOnUserInit: number;
438
+ PluginException: number;
439
+ NotificationException: number;
440
+ SnippetScriptLoadFailure: number;
441
+ InvalidInstrumentationKey: number;
442
+ CannotParseAiBlobValue: number;
443
+ InvalidContentBlob: number;
444
+ TrackPageActionEventFailed: number;
445
+ FailedAddingCustomDefinedRequestContext: number;
446
+ InMemoryStorageBufferFull: number;
447
+ };
448
+
449
+ // @public (undocumented)
450
+ export type _InternalMessageId = number | _eInternalMessageId;
451
+
177
452
  // @public (undocumented)
178
453
  export interface IPageViewPerformanceTelemetry extends IPartC {
179
454
  domProcessing?: string;
@@ -200,6 +475,20 @@ export interface IPageViewTelemetry extends IPartC {
200
475
  uri?: string;
201
476
  }
202
477
 
478
+ // @public (undocumented)
479
+ export interface IPlugin {
480
+ readonly identifier: string;
481
+ // Warning: (ae-forgotten-export) The symbol "ITelemetryPluginChain" needs to be exported by the entry point index.d.ts
482
+ initialize: (config: IConfiguration, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain) => void;
483
+ isInitialized?: () => boolean;
484
+ // Warning: (ae-forgotten-export) The symbol "IProcessTelemetryUnloadContext" needs to be exported by the entry point index.d.ts
485
+ teardown?: (unloadCtx: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
486
+ readonly version?: string;
487
+ }
488
+
489
+ // @public (undocumented)
490
+ export function isNullOrUndefined(value: any): value is null | undefined;
491
+
203
492
  // @public
204
493
  export interface ITelemetryItem {
205
494
  baseData?: {
@@ -219,6 +508,14 @@ export interface ITelemetryItem {
219
508
  ver?: string;
220
509
  }
221
510
 
511
+ // Warning: (ae-forgotten-export) The symbol "ITelemetryProcessor" needs to be exported by the entry point index.d.ts
512
+ //
513
+ // @public
514
+ export interface ITelemetryPlugin extends ITelemetryProcessor, IPlugin {
515
+ readonly priority: number;
516
+ setNextPlugin?: (next: ITelemetryPlugin | ITelemetryPluginChain) => void;
517
+ }
518
+
222
519
  // @public (undocumented)
223
520
  export interface ITraceTelemetry extends IPartC {
224
521
  iKey?: string;
@@ -226,6 +523,9 @@ export interface ITraceTelemetry extends IPartC {
226
523
  severityLevel?: SeverityLevel;
227
524
  }
228
525
 
526
+ // @public
527
+ export function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
528
+
229
529
  // Warning: (ae-forgotten-export) The symbol "BaseTelemetryPlugin" needs to be exported by the entry point index.d.ts
230
530
  // Warning: (ae-forgotten-export) The symbol "IChannelControlsAI" needs to be exported by the entry point index.d.ts
231
531
  //
@@ -243,8 +543,6 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
243
543
  flush(): void;
244
544
  // (undocumented)
245
545
  readonly identifier: string;
246
- // Warning: (ae-forgotten-export) The symbol "ITelemetryPluginChain" needs to be exported by the entry point index.d.ts
247
- //
248
546
  // (undocumented)
249
547
  initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
250
548
  _onError(payload: string[], message: string, event?: ErrorEvent): void;
@@ -266,14 +564,26 @@ export class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
266
564
  _sender: SenderFunction;
267
565
  // Warning: (ae-forgotten-export) The symbol "ISenderConfig" needs to be exported by the entry point index.d.ts
268
566
  readonly _senderConfig: ISenderConfig;
269
- // (undocumented)
270
- teardown(): void;
271
567
  triggerSend(async?: boolean, forcedSender?: SenderFunction, sendReason?: SendRequestReason): void;
272
568
  // Warning: (ae-forgotten-export) The symbol "XDomainRequest" needs to be exported by the entry point index.d.ts
273
569
  _xdrOnLoad(xdr: XDomainRequest, payload: string[]): void;
274
570
  _xhrReadyStateChange(xhr: XMLHttpRequest, payload: string[], countOfItemsInPayload: number): void;
275
571
  }
276
572
 
573
+ // @public
574
+ export const enum SendRequestReason {
575
+ ManualFlush = 1,
576
+ MaxBatchSize = 10,
577
+ MaxQueuedEvents = 20,
578
+ NormalSchedule = 1,
579
+ Resumed = 4,
580
+ Retry = 5,
581
+ SdkUnload = 6,
582
+ SyncEvent = 3,
583
+ Undefined = 0,
584
+ Unload = 2
585
+ }
586
+
277
587
  // @public
278
588
  export enum SeverityLevel {
279
589
  // (undocumented)
@@ -288,6 +598,9 @@ export enum SeverityLevel {
288
598
  Warning = 2
289
599
  }
290
600
 
601
+ // @public (undocumented)
602
+ export function throwError(message: string): never;
603
+
291
604
  // (No @packageDocumentation comment for this package)
292
605
 
293
606
  ```
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 2.8.0-beta.2203-10
2
+ * Microsoft.ApplicationInsights, 2.8.0-beta.2203-13
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -19,7 +19,6 @@ declare namespace ApplicationInsights {
19
19
  */
20
20
  class ApplicationInsights {
21
21
  config: IConfiguration & IConfig;
22
- private core;
23
22
  /**
24
23
  * Creates an instance of ApplicationInsights.
25
24
  * @param {IConfiguration & IConfig} config
@@ -45,11 +44,51 @@ declare namespace ApplicationInsights {
45
44
  * @memberof ApplicationInsights
46
45
  */
47
46
  flush(async?: boolean): void;
48
- private pollInternalLogs;
47
+ pollInternalLogs(): void;
49
48
  stopPollingInternalLogs(): void;
50
- private getSKUDefaults;
49
+ getSKUDefaults(): void;
50
+ /**
51
+ * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
52
+ * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
53
+ * unload call return `true` stating that all plugins reported that they also unloaded, the recommended
54
+ * approach is to create a new instance and initialize that instance.
55
+ * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
56
+ * to successfully remove any global references or they may just be completing the unload process asynchronously.
57
+ */
58
+ unload(isAsync?: boolean, unloadComplete?: () => void): void;
59
+ /**
60
+ * Find and return the (first) plugin with the specified identifier if present
61
+ * @param pluginIdentifier
62
+ */
63
+ getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
64
+ /**
65
+ * Add a new plugin to the installation
66
+ * @param plugin - The new plugin to add
67
+ * @param replaceExisting - should any existing plugin be replaced
68
+ * @param doAsync - Should the add be performed asynchronously
69
+ */
70
+ addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
71
+ /**
72
+ * Returns the unique event namespace that should be used
73
+ */
74
+ evtNamespace(): string;
75
+ /**
76
+ * Add an unload handler that will be called when the SDK is being unloaded
77
+ * @param handler - the handler
78
+ */
79
+ addUnloadCb(handler: UnloadHandler): void;
51
80
  }
52
81
 
82
+ /**
83
+ * Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
84
+ * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
85
+ * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
86
+ * cause a testing requirement to test with and without the implementations
87
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
88
+ * @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
89
+ */
90
+ function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
91
+
53
92
  class BaseCore implements IAppInsightsCore {
54
93
  static defaultConfig: IConfiguration;
55
94
  config: IConfiguration;
@@ -599,7 +638,7 @@ declare namespace ApplicationInsights {
599
638
  * @param that - The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context
600
639
  * @param args - Any additional arguments to pass to the onComplete function
601
640
  */
602
- onComplete: (onComplete: Function, that?: any, ...args: any[]) => void;
641
+ onComplete: (onComplete: () => void, that?: any, ...args: any[]) => void;
603
642
  /**
604
643
  * Create a new context using the core and config from the current instance, returns a new instance of the same type
605
644
  * @param plugins - The execution order to process the plugins, if null or not supplied
@@ -2213,6 +2252,8 @@ declare namespace ApplicationInsights {
2213
2252
  aiDataContract: any;
2214
2253
  }
2215
2254
 
2255
+ function isNullOrUndefined(value: any): value is null | undefined;
2256
+
2216
2257
  interface IStackDetails {
2217
2258
  src: string;
2218
2259
  obj: string[];
@@ -2380,6 +2421,15 @@ declare namespace ApplicationInsights {
2380
2421
 
2381
2422
  type LoggingSeverity = number | eLoggingSeverity;
2382
2423
 
2424
+ /**
2425
+ * Creates proxy functions on the target which internally will call the source version with all arguments passed to the target method.
2426
+ *
2427
+ * @param target - The target object to be assigned with the source properties and functions
2428
+ * @param source - The source object which will be assigned / called by setting / calling the targets proxies
2429
+ * @param functionsToProxy - An array of function names that will be proxied on the target
2430
+ */
2431
+ function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget?: boolean): T;
2432
+
2383
2433
  class Sender extends BaseTelemetryPlugin implements IChannelControlsAI {
2384
2434
  static constructEnvelope(orig: ITelemetryItem, iKey: string, logger: IDiagnosticLogger, convertUndefined?: any): IEnvelope;
2385
2435
  readonly priority: number;
@@ -2424,7 +2474,6 @@ declare namespace ApplicationInsights {
2424
2474
  * Will not flush if the Send has been paused.
2425
2475
  */
2426
2476
  onunloadFlush(): void;
2427
- teardown(): void;
2428
2477
  initialize(config: IConfiguration & IConfig, core: IAppInsightsCore, extensions: IPlugin[], pluginChain?: ITelemetryPluginChain): void;
2429
2478
  processTelemetry(telemetryItem: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
2430
2479
  /**
@@ -2569,6 +2618,8 @@ declare namespace ApplicationInsights {
2569
2618
  PluginRemoved = 32
2570
2619
  }
2571
2620
 
2621
+ function throwError(message: string): never;
2622
+
2572
2623
  type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
2573
2624
 
2574
2625
  interface XDomainRequest extends XMLHttpRequestEventTarget {