@microsoft/applicationinsights-core-js 3.0.0-beta.2208-03 → 3.0.0-beta.2208-16

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.
Files changed (121) hide show
  1. package/README.md +7 -0
  2. package/browser/applicationinsights-core-js.integrity.json +9 -9
  3. package/browser/applicationinsights-core-js.js +2040 -2155
  4. package/browser/applicationinsights-core-js.js.map +1 -1
  5. package/browser/applicationinsights-core-js.min.js +2 -2
  6. package/browser/applicationinsights-core-js.min.js.map +1 -1
  7. package/dist/applicationinsights-core-js.api.json +6998 -10817
  8. package/dist/applicationinsights-core-js.api.md +88 -177
  9. package/dist/applicationinsights-core-js.d.ts +94 -494
  10. package/dist/applicationinsights-core-js.js +2040 -2155
  11. package/dist/applicationinsights-core-js.js.map +1 -1
  12. package/dist/applicationinsights-core-js.min.js +2 -2
  13. package/dist/applicationinsights-core-js.min.js.map +1 -1
  14. package/dist/applicationinsights-core-js.rollup.d.ts +94 -494
  15. package/dist-esm/JavaScriptSDK/AppInsightsCore.js +2 -2
  16. package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
  17. package/dist-esm/JavaScriptSDK/BaseCore.js +11 -12
  18. package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
  19. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +3 -2
  20. package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
  21. package/dist-esm/JavaScriptSDK/ChannelController.js +2 -2
  22. package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
  23. package/dist-esm/JavaScriptSDK/CookieMgr.js +27 -26
  24. package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
  25. package/dist-esm/JavaScriptSDK/CoreUtils.js +8 -140
  26. package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
  27. package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
  28. package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
  29. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +3 -3
  30. package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
  31. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +4 -3
  32. package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
  33. package/dist-esm/JavaScriptSDK/EnvUtils.js +132 -136
  34. package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
  35. package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -3
  36. package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
  37. package/dist-esm/JavaScriptSDK/HelperFuncs.js +23 -470
  38. package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
  39. package/dist-esm/JavaScriptSDK/InstrumentHooks.js +5 -5
  40. package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
  41. package/dist-esm/JavaScriptSDK/InternalConstants.js +4 -4
  42. package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
  43. package/dist-esm/JavaScriptSDK/NotificationManager.js +2 -2
  44. package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
  45. package/dist-esm/JavaScriptSDK/PerfManager.js +4 -8
  46. package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
  47. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +3 -3
  48. package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
  49. package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
  50. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +2 -2
  51. package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
  52. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -3
  53. package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
  54. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +2 -3
  55. package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
  56. package/dist-esm/JavaScriptSDK/W3cTraceParent.js +2 -2
  57. package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
  58. package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +5 -31
  59. package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +1 -1
  60. package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
  61. package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
  62. package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
  63. package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
  64. package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
  65. package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
  66. package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
  67. package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
  68. package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
  69. package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
  70. package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
  71. package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
  72. package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
  73. package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
  74. package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
  75. package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
  76. package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
  77. package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
  78. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
  79. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
  80. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
  81. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
  82. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
  83. package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
  84. package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
  85. package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
  86. package/dist-esm/__DynamicConstants.js +11 -13
  87. package/dist-esm/__DynamicConstants.js.map +1 -1
  88. package/dist-esm/applicationinsights-core-js.js +6 -5
  89. package/dist-esm/applicationinsights-core-js.js.map +1 -1
  90. package/package.json +4 -3
  91. package/src/JavaScriptSDK/AppInsightsCore.ts +1 -1
  92. package/src/JavaScriptSDK/BaseCore.ts +2 -4
  93. package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +2 -1
  94. package/src/JavaScriptSDK/ChannelController.ts +1 -1
  95. package/src/JavaScriptSDK/CookieMgr.ts +6 -5
  96. package/src/JavaScriptSDK/CoreUtils.ts +7 -423
  97. package/src/JavaScriptSDK/DbgExtensionUtils.ts +2 -2
  98. package/src/JavaScriptSDK/DiagnosticLogger.ts +3 -2
  99. package/src/JavaScriptSDK/EnvUtils.ts +145 -148
  100. package/src/JavaScriptSDK/EventHelpers.ts +1 -2
  101. package/src/JavaScriptSDK/HelperFuncs.ts +22 -536
  102. package/src/JavaScriptSDK/InstrumentHooks.ts +4 -4
  103. package/src/JavaScriptSDK/InternalConstants.ts +3 -3
  104. package/src/JavaScriptSDK/NotificationManager.ts +1 -1
  105. package/src/JavaScriptSDK/PerfManager.ts +3 -7
  106. package/src/JavaScriptSDK/ProcessTelemetryContext.ts +4 -4
  107. package/src/JavaScriptSDK/TelemetryHelpers.ts +1 -1
  108. package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
  109. package/src/JavaScriptSDK/UnloadHandlerContainer.ts +1 -2
  110. package/src/JavaScriptSDK/W3cTraceParent.ts +1 -1
  111. package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +5 -36
  112. package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +7 -0
  113. package/tsconfig.json +1 -1
  114. package/types/JavaScriptSDK/CoreUtils.d.ts +0 -270
  115. package/types/JavaScriptSDK/EnvUtils.d.ts +0 -65
  116. package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -154
  117. package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +6 -18
  118. package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +6 -0
  119. package/types/__DynamicConstants.d.ts +2 -4
  120. package/types/applicationinsights-core-js.d.ts +5 -4
  121. package/types/tsdoc-metadata.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2208-03
2
+ * Microsoft Application Insights Core Javascript SDK, 3.0.0-beta.2208-16
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -7,12 +7,53 @@
7
7
  */
8
8
 
9
9
  declare namespace ApplicationInsights {
10
+ import { arrForEach } from '@nevware21/ts-utils';
11
+ import { arrIndexOf } from '@nevware21/ts-utils';
12
+ import { arrMap } from '@nevware21/ts-utils';
13
+ import { arrReduce } from '@nevware21/ts-utils';
14
+ import { objDeepFreeze as deepFreeze } from '@nevware21/ts-utils';
15
+ import { dumpObj } from '@nevware21/ts-utils';
16
+ import { EnumCls } from '@nevware21/ts-utils';
17
+ import { getDocument } from '@nevware21/ts-utils';
10
18
  import { getGlobal } from '@microsoft/applicationinsights-shims';
19
+ import { getInst as getGlobalInst } from '@nevware21/ts-utils';
20
+ import { getHistory } from '@nevware21/ts-utils';
21
+ import { getNavigator } from '@nevware21/ts-utils';
22
+ import { getWindow } from '@nevware21/ts-utils';
23
+ import { hasDocument } from '@nevware21/ts-utils';
24
+ import { hasHistory } from '@nevware21/ts-utils';
25
+ import { hasNavigator } from '@nevware21/ts-utils';
26
+ import { objHasOwnProperty as hasOwnProperty } from '@nevware21/ts-utils';
27
+ import { hasWindow } from '@nevware21/ts-utils';
28
+ import { isArray } from '@nevware21/ts-utils';
29
+ import { isBoolean } from '@nevware21/ts-utils';
30
+ import { isDate } from '@nevware21/ts-utils';
31
+ import { isError } from '@nevware21/ts-utils';
32
+ import { isFunction } from '@nevware21/ts-utils';
33
+ import { isNotTruthy } from '@nevware21/ts-utils';
34
+ import { isNullOrUndefined } from '@nevware21/ts-utils';
35
+ import { isNumber } from '@nevware21/ts-utils';
36
+ import { isObject } from '@nevware21/ts-utils';
37
+ import { isString } from '@nevware21/ts-utils';
38
+ import { isSymbol } from '@nevware21/ts-utils';
39
+ import { isTruthy } from '@nevware21/ts-utils';
40
+ import { isTypeof } from '@nevware21/ts-utils';
41
+ import { isUndefined } from '@nevware21/ts-utils';
11
42
  import { objCreateFn as objCreate } from '@microsoft/applicationinsights-shims';
43
+ import { objDefineAccessors } from '@nevware21/ts-utils';
44
+ import { objForEachKey } from '@nevware21/ts-utils';
45
+ import { objFreeze } from '@nevware21/ts-utils';
46
+ import { objKeys } from '@nevware21/ts-utils';
47
+ import { objSeal } from '@nevware21/ts-utils';
48
+ import { objToString } from '@nevware21/ts-utils';
49
+ import { strEndsWith } from '@nevware21/ts-utils';
12
50
  import { strShimFunction as strFunction } from '@microsoft/applicationinsights-shims';
13
51
  import { strShimObject as strObject } from '@microsoft/applicationinsights-shims';
14
52
  import { strShimPrototype as strPrototype } from '@microsoft/applicationinsights-shims';
53
+ import { strStartsWith } from '@nevware21/ts-utils';
54
+ import { strTrim } from '@nevware21/ts-utils';
15
55
  import { strShimUndefined as strUndefined } from '@microsoft/applicationinsights-shims';
56
+ import { throwError } from '@nevware21/ts-utils';
16
57
 
17
58
  /**
18
59
  * Get all of the registered events on the target object, this is primarily used for testing cleanup but may also be used by
@@ -91,45 +132,13 @@ declare namespace ApplicationInsights {
91
132
 
92
133
  function areCookiesSupported(logger?: IDiagnosticLogger): any;
93
134
 
94
- /**
95
- * Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
96
- * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
97
- * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
98
- * cause a testing requirement to test with and without the implementations
99
- * @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
100
- * @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.
101
- */
102
- function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
135
+ export { arrForEach }
103
136
 
104
- /**
105
- * Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
106
- * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
107
- * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
108
- * cause a testing requirement to test with and without the implementations
109
- * @param searchElement The value to locate in the array.
110
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
111
- */
112
- function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number;
137
+ export { arrIndexOf }
113
138
 
114
- /**
115
- * Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
116
- * to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
117
- * checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
118
- * implementation if it exists as this would cause a testing requirement to test with and without the implementations
119
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
120
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
121
- */
122
- function arrMap<T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any): R[];
139
+ export { arrMap }
123
140
 
124
- /**
125
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
126
- * provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
127
- * Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
128
- * this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
129
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
130
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
131
- */
132
- function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R): R;
141
+ export { arrReduce }
133
142
 
134
143
  /**
135
144
  * Binds the specified function to an event, so that the function gets called whenever the event fires on the object
@@ -342,20 +351,6 @@ declare namespace ApplicationInsights {
342
351
  protected _addHook(hooks: IInstrumentHook | IInstrumentHook[]): void;
343
352
  }
344
353
 
345
- /**
346
- * @deprecated - Use the core.getCookieMgr().isEnabled()
347
- * Helper method to tell if document.cookie object is available and whether it can be used.
348
- */
349
- function canUseCookies(logger: IDiagnosticLogger): any;
350
-
351
- /**
352
- * Provides a collection of utility functions, included for backward compatibility with previous releases.
353
- * @deprecated Marking this instance as deprecated in favor of direct usage of the helper functions
354
- * as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
355
- * in your resulting code.
356
- */
357
- const CoreUtils: ICoreUtils;
358
-
359
354
  /**
360
355
  * Simpler helper to create a dynamic class that implements the interface and populates the values with the defaults.
361
356
  * Only instance properties (hasOwnProperty) values are copied from the defaults to the new instance
@@ -365,23 +360,14 @@ declare namespace ApplicationInsights {
365
360
 
366
361
  function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
367
362
 
368
- /**
369
- * Create a 2 index map that maps an enum's key as both the key and value, X["key"] => "key" and X[0] => "keyof 0".
370
- * @param values - The values to populate on the new object
371
- * @returns
372
- */
373
- function createEnumMap<E, I = keyof E>(values: {
374
- [key in keyof E]: E[keyof E];
375
- }): EnumMap<E, I>;
376
-
377
363
  /**
378
364
  * Create an enum style object which has both the key => value and value => key mappings
379
365
  * @param values - The values to populate on the new object
380
366
  * @returns
381
367
  */
382
- function createEnumStyle<E>(values: {
368
+ const createEnumStyle: <E>(values: {
383
369
  [key in keyof E]: E[keyof E];
384
- }): EnumValue<E>;
370
+ }) => EnumValue<E>;
385
371
 
386
372
  /**
387
373
  * Creates a new Telemetry Item context with the current config, core and plugin execution chain
@@ -418,9 +404,9 @@ declare namespace ApplicationInsights {
418
404
  * @param values - The values to populate on the new object
419
405
  * @returns
420
406
  */
421
- function createValueMap<E, V = E>(values: {
407
+ const createValueMap: <E, V = E>(values: {
422
408
  [key in keyof E]: [E[keyof E], V[keyof V]];
423
- }): V;
409
+ }) => V;
424
410
 
425
411
  /**
426
412
  * Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
@@ -428,14 +414,7 @@ declare namespace ApplicationInsights {
428
414
  */
429
415
  function dateNow(): number;
430
416
 
431
- function deepFreeze<T>(obj: T): T;
432
-
433
- /**
434
- * @deprecated - Use the core.getCookieMgr().del()
435
- * Deletes a cookie by setting it's expiration time in the past.
436
- * @param name - The name of the cookie to delete.
437
- */
438
- function deleteCookie(logger: IDiagnosticLogger, name: string): boolean;
417
+ export { deepFreeze }
439
418
 
440
419
  /**
441
420
  * Removes an event handler for the specified event
@@ -504,12 +483,6 @@ declare namespace ApplicationInsights {
504
483
  logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
505
484
  }
506
485
 
507
- /**
508
- * @deprecated - Use the core.getCookieMgr().disable()
509
- * Force the SDK not to store and read any data from cookies.
510
- */
511
- function disableCookies(): void;
512
-
513
486
  /**
514
487
  * Helper function to wrap a function with a perf event
515
488
  * @param mgrSource - The Performance Manager or a Performance provider source (may be null)
@@ -520,10 +493,7 @@ declare namespace ApplicationInsights {
520
493
  */
521
494
  function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSource: () => string, func: (perfEvt?: IPerfEvent) => T, details?: () => any, isAsync?: boolean): T;
522
495
 
523
- /**
524
- * Returns string representation of an object suitable for diagnostics logging.
525
- */
526
- function dumpObj(object: any): string;
496
+ export { dumpObj }
527
497
 
528
498
  /**
529
499
  * The eEventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.
@@ -652,15 +622,7 @@ declare namespace ApplicationInsights {
652
622
  WARNING = 2
653
623
  }
654
624
 
655
- type EnumMap<E = any, I = E> = {
656
- readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
657
- } & I;
658
-
659
- type EnumValue<E = any> = {
660
- readonly [key in keyof E]: E[key];
661
- };
662
-
663
- const EventHelper: IEventHelper;
625
+ type EnumValue<E = any> = EnumCls<E>;
664
626
 
665
627
  /**
666
628
  * Removes an event handler for the specified event
@@ -734,12 +696,6 @@ declare namespace ApplicationInsights {
734
696
  */
735
697
  function getConsole(): Console | null;
736
698
 
737
- /**
738
- * @deprecated - Use the core.getCookieMgr().get()
739
- * helper method to access userId and sessionId cookie
740
- */
741
- function getCookie(logger: IDiagnosticLogger, name: string): string;
742
-
743
699
  /**
744
700
  * Returns the crypto object if it is present otherwise null.
745
701
  * This helper is used to access the crypto object from the current
@@ -751,12 +707,7 @@ declare namespace ApplicationInsights {
751
707
 
752
708
  function getDebugListener(config: IConfiguration): INotificationListener;
753
709
 
754
- /**
755
- * Returns the global document object if it is present otherwise null.
756
- * This helper is used to access the document object without causing an exception
757
- * "Uncaught ReferenceError: document is not defined"
758
- */
759
- function getDocument(): Document | null;
710
+ export { getDocument }
760
711
 
761
712
  /**
762
713
  * Returns the name of object if it's an Error. Otherwise, returns empty string.
@@ -777,18 +728,9 @@ declare namespace ApplicationInsights {
777
728
 
778
729
  export { getGlobal }
779
730
 
780
- /**
781
- * Return the named global object if available, will return null if the object is not available.
782
- * @param name The globally named object
783
- */
784
- function getGlobalInst<T>(name: string): T;
731
+ export { getGlobalInst }
785
732
 
786
- /**
787
- * Returns the global history object if it is present otherwise null.
788
- * This helper is used to access the history object without causing an exception
789
- * "Uncaught ReferenceError: history is not defined"
790
- */
791
- function getHistory(): History | null;
733
+ export { getHistory }
792
734
 
793
735
  /**
794
736
  * Gets IE version returning the document emulation mode if we are running on IE, or null otherwise
@@ -816,12 +758,7 @@ declare namespace ApplicationInsights {
816
758
  */
817
759
  function getMsCrypto(): Crypto | null;
818
760
 
819
- /**
820
- * Returns the global navigator object if it is present otherwise null.
821
- * This helper is used to access the navigator object without causing an exception
822
- * "Uncaught ReferenceError: navigator is not defined"
823
- */
824
- function getNavigator(): Navigator | null;
761
+ export { getNavigator }
825
762
 
826
763
  /**
827
764
  * Returns the performance object if it is present otherwise null.
@@ -838,30 +775,11 @@ declare namespace ApplicationInsights {
838
775
  */
839
776
  function getSetValue<T, K extends keyof T>(target: T, field: K, defValue?: T[K]): T[K];
840
777
 
841
- /**
842
- * Returns the global window object if it is present otherwise null.
843
- * This helper is used to access the window object without causing an exception
844
- * "Uncaught ReferenceError: window is not defined"
845
- */
846
- function getWindow(): Window | null;
778
+ export { getWindow }
847
779
 
848
- /**
849
- * Checks if document object is available, this is required as we support the API running without a
850
- * window /document (eg. Node server, electron webworkers) and if we attempt to assign a document
851
- * object to a local variable or pass as an argument an "Uncaught ReferenceError: document is not defined"
852
- * exception will be thrown.
853
- * Defined as a function to support lazy / late binding environments.
854
- */
855
- function hasDocument(): boolean;
780
+ export { hasDocument }
856
781
 
857
- /**
858
- * Checks if history object is available, this is required as we support the API running without a
859
- * window /document (eg. Node server, electron webworkers) and if we attempt to assign a history
860
- * object to a local variable or pass as an argument an "Uncaught ReferenceError: history is not defined"
861
- * exception will be thrown.
862
- * Defined as a function to support lazy / late binding environments.
863
- */
864
- function hasHistory(): boolean;
782
+ export { hasHistory }
865
783
 
866
784
  /**
867
785
  * Checks if JSON object is available, this is required as we support the API running without a
@@ -872,25 +790,11 @@ declare namespace ApplicationInsights {
872
790
  */
873
791
  function hasJSON(): boolean;
874
792
 
875
- /**
876
- * Checks if navigator object is available, this is required as we support the API running without a
877
- * window /document (eg. Node server, electron webworkers) and if we attempt to assign a navigator
878
- * object to a local variable or pass as an argument an "Uncaught ReferenceError: navigator is not defined"
879
- * exception will be thrown.
880
- * Defined as a function to support lazy / late binding environments.
881
- */
882
- function hasNavigator(): boolean;
793
+ export { hasNavigator }
883
794
 
884
- function hasOwnProperty(obj: any, prop: string): boolean;
795
+ export { hasOwnProperty }
885
796
 
886
- /**
887
- * Checks if window object is available, this is required as we support the API running without a
888
- * window /document (eg. Node server, electron webworkers) and if we attempt to assign a window
889
- * object to a local variable or pass as an argument an "Uncaught ReferenceError: window is not defined"
890
- * exception will be thrown.
891
- * Defined as a function to support lazy / late binding environments.
892
- */
893
- function hasWindow(): boolean;
797
+ export { hasWindow }
894
798
 
895
799
  interface IAppInsightsCore extends IPerfManagerProvider {
896
800
  config: IConfiguration;
@@ -1308,195 +1212,6 @@ declare namespace ApplicationInsights {
1308
1212
  delCookie?: (name: string, cookieValue: string) => void;
1309
1213
  }
1310
1214
 
1311
- /**
1312
- * Provides a collection of utility functions, included for backward compatibility with previous releases.
1313
- * @deprecated Marking this interface and instance as deprecated in favor of direct usage of the helper functions
1314
- * as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
1315
- * in your resulting code.
1316
- */
1317
- interface ICoreUtils {
1318
- /**
1319
- * Internal - Do not use directly.
1320
- * @deprecated Direct usage of this property is not recommend
1321
- */
1322
- _canUseCookies: boolean;
1323
- isTypeof: (value: any, theType: string) => boolean;
1324
- isUndefined: (value: any) => boolean;
1325
- isNullOrUndefined: (value: any) => boolean;
1326
- hasOwnProperty: (obj: any, prop: string) => boolean;
1327
- /**
1328
- * Checks if the passed of value is a function.
1329
- * @param {any} value - Value to be checked.
1330
- * @return {boolean} True if the value is a boolean, false otherwise.
1331
- */
1332
- isFunction: (value: any) => value is Function;
1333
- /**
1334
- * Checks if the passed of value is a function.
1335
- * @param {any} value - Value to be checked.
1336
- * @return {boolean} True if the value is a boolean, false otherwise.
1337
- */
1338
- isObject: (value: any) => boolean;
1339
- /**
1340
- * Check if an object is of type Date
1341
- */
1342
- isDate: (obj: any) => obj is Date;
1343
- /**
1344
- * Check if an object is of type Array
1345
- */
1346
- isArray: (obj: any) => boolean;
1347
- /**
1348
- * Check if an object is of type Error
1349
- */
1350
- isError: (obj: any) => obj is Error;
1351
- /**
1352
- * Checks if the type of value is a string.
1353
- * @param {any} value - Value to be checked.
1354
- * @return {boolean} True if the value is a string, false otherwise.
1355
- */
1356
- isString: (value: any) => value is string;
1357
- /**
1358
- * Checks if the type of value is a number.
1359
- * @param {any} value - Value to be checked.
1360
- * @return {boolean} True if the value is a number, false otherwise.
1361
- */
1362
- isNumber: (value: any) => value is number;
1363
- /**
1364
- * Checks if the type of value is a boolean.
1365
- * @param {any} value - Value to be checked.
1366
- * @return {boolean} True if the value is a boolean, false otherwise.
1367
- */
1368
- isBoolean: (value: any) => value is boolean;
1369
- /**
1370
- * Convert a date to I.S.O. format in IE8
1371
- */
1372
- toISOString: (date: Date) => string;
1373
- /**
1374
- * Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
1375
- * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
1376
- * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
1377
- * cause a testing requirement to test with and without the implementations
1378
- * @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
1379
- * @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.
1380
- */
1381
- arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
1382
- /**
1383
- * Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
1384
- * that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
1385
- * implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
1386
- * cause a testing requirement to test with and without the implementations
1387
- * @param searchElement The value to locate in the array.
1388
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
1389
- */
1390
- arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
1391
- /**
1392
- * Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
1393
- * to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
1394
- * checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
1395
- * implementation if it exists as this would cause a testing requirement to test with and without the implementations
1396
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
1397
- * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
1398
- */
1399
- arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
1400
- /**
1401
- * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
1402
- * provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
1403
- * Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
1404
- * this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
1405
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
1406
- * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
1407
- */
1408
- arrReduce: <T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R) => R;
1409
- /**
1410
- * helper method to trim strings (IE8 does not implement String.prototype.trim)
1411
- */
1412
- strTrim: (str: any) => string;
1413
- /**
1414
- * Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil
1415
- * for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
1416
- * Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations
1417
- * @param obj Object to use as a prototype. May be null
1418
- */
1419
- objCreate: (obj: object) => any;
1420
- /**
1421
- * Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
1422
- * that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
1423
- * Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
1424
- * @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
1425
- */
1426
- objKeys: (obj: {}) => string[];
1427
- /**
1428
- * Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
1429
- * existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
1430
- * and executed in an ES3 container, providing basic IE8 compatibility.
1431
- * @param target The object on which to define the property.
1432
- * @param prop The name of the property to be defined or modified.
1433
- * @param getProp The getter function to wire against the getter.
1434
- * @param setProp The setter function to wire against the setter.
1435
- * @returns True if it was able to create the accessors otherwise false
1436
- */
1437
- objDefineAccessors: <T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void) => boolean;
1438
- /**
1439
- * Trys to add an event handler for the specified event to the window, body and document
1440
- * @param eventName {string} - The name of the event
1441
- * @param callback {any} - The callback function that needs to be executed for the given event
1442
- * @return {boolean} - true if the handler was successfully added
1443
- */
1444
- addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
1445
- /**
1446
- * Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
1447
- * https://caniuse.com/#search=Date.now
1448
- */
1449
- dateNow: () => number;
1450
- /**
1451
- * Identifies whether the current environment appears to be IE
1452
- */
1453
- isIE: () => boolean;
1454
- /**
1455
- * @deprecated - Use the core.getCookieMgr().disable()
1456
- * Force the SDK not to store and read any data from cookies.
1457
- */
1458
- disableCookies: () => void;
1459
- newGuid: () => string;
1460
- /**
1461
- * Return the current value of the Performance Api now() function (if available) and fallback to dateNow() if it is unavailable (IE9 or less)
1462
- * https://caniuse.com/#search=performance.now
1463
- */
1464
- perfNow: () => number;
1465
- /**
1466
- * Generate random base64 id string.
1467
- * The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
1468
- * @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
1469
- */
1470
- newId: (maxLength?: number) => string;
1471
- /**
1472
- * Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.
1473
- * So maxValue(16) will produce a number from 0..16 (range of 17)
1474
- * @param maxValue
1475
- */
1476
- randomValue: (maxValue: number) => number;
1477
- /**
1478
- * generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.
1479
- * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
1480
- */
1481
- random32: (signed?: boolean) => number;
1482
- /**
1483
- * Seed the MWC random number generator with the specified seed or a random value
1484
- * @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen
1485
- */
1486
- mwcRandomSeed: (value?: number) => void;
1487
- /**
1488
- * Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)
1489
- * instead of Math.random() defaults to un-signed.
1490
- * Used as a replacement random generator for IE to avoid issues with older IE instances.
1491
- * @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
1492
- */
1493
- mwcRandom32: (signed?: boolean) => number;
1494
- /**
1495
- * generate W3C trace id
1496
- */
1497
- generateW3CId: () => string;
1498
- }
1499
-
1500
1215
  interface ICustomProperties {
1501
1216
  [key: string]: any;
1502
1217
  }
@@ -1610,41 +1325,6 @@ declare namespace ApplicationInsights {
1610
1325
  setTraceFlags(newValue?: number): void;
1611
1326
  }
1612
1327
 
1613
- interface IEventHelper {
1614
- /**
1615
- * Binds the specified function to an event, so that the function gets called whenever the event fires on the object
1616
- * @param obj Object to add the event too.
1617
- * @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
1618
- * @param handlerRef Pointer that specifies the function to call when event fires
1619
- * @returns True if the function was bound successfully to the event, otherwise false
1620
- */
1621
- Attach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
1622
- /**
1623
- * Binds the specified function to an event, so that the function gets called whenever the event fires on the object
1624
- * @deprecated Use {@link EventHelper#Attach} as we are already in a class call EventHelper the extra "Event" just causes a larger result
1625
- * @param obj Object to add the event too.
1626
- * @param eventNameWithoutOn String that specifies any of the standard DHTML Events without "on" prefix
1627
- * @param handlerRef Pointer that specifies the function to call when event fires
1628
- * @returns True if the function was bound successfully to the event, otherwise false
1629
- */
1630
- AttachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => boolean;
1631
- /**
1632
- * Removes an event handler for the specified event
1633
- * @param eventName {string} - The name of the event
1634
- * @param callback {any} - The callback function that needs to be executed for the given event
1635
- * @return {boolean} - true if the handler was successfully added
1636
- */
1637
- Detach: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
1638
- /**
1639
- * Removes an event handler for the specified event
1640
- * @deprecated Use {@link EventHelper#Detach} as we are already in a class call EventHelper the extra "Event" just causes a larger result
1641
- * @param eventName {string} - The name of the event
1642
- * @param callback {any} - The callback function that needs to be executed for the given event
1643
- * @return {boolean} - true if the handler was successfully added
1644
- */
1645
- DetachEvent: (obj: any, eventNameWithoutOn: string, handlerRef: any) => void;
1646
- }
1647
-
1648
1328
  interface IInstrumentCallDetails {
1649
1329
  name: string;
1650
1330
  inst: any;
@@ -2022,6 +1702,12 @@ declare namespace ApplicationInsights {
2022
1702
  * Plugin version (available in data.properties.version in common schema)
2023
1703
  */
2024
1704
  readonly version?: string;
1705
+ /**
1706
+ * The App Insights core to use for backward compatibility.
1707
+ * Therefore the interface will be able to access the core without needing to cast to "any".
1708
+ * [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
1709
+ */
1710
+ core?: IAppInsightsCore;
2025
1711
  }
2026
1712
 
2027
1713
  /**
@@ -2092,11 +1778,7 @@ declare namespace ApplicationInsights {
2092
1778
  handler: any;
2093
1779
  }
2094
1780
 
2095
- /**
2096
- * Check if an object is of type Array with optional generic T, the generic type is not validated
2097
- * and exists to help with TypeScript validation only.
2098
- */
2099
- let isArray: <T = any>(obj: any) => obj is Array<T>;
1781
+ export { isArray }
2100
1782
 
2101
1783
  /**
2102
1784
  * Checks if HTML5 Beacons are supported in the current environment.
@@ -2104,22 +1786,11 @@ declare namespace ApplicationInsights {
2104
1786
  */
2105
1787
  function isBeaconsSupported(): boolean;
2106
1788
 
2107
- /**
2108
- * Checks if the type of value is a boolean.
2109
- * @param {any} value - Value to be checked.
2110
- * @return {boolean} True if the value is a boolean, false otherwise.
2111
- */
2112
- function isBoolean(value: any): value is boolean;
1789
+ export { isBoolean }
2113
1790
 
2114
- /**
2115
- * Check if an object is of type Date
2116
- */
2117
- function isDate(obj: any): obj is Date;
1791
+ export { isDate }
2118
1792
 
2119
- /**
2120
- * Check if an object is of type Error
2121
- */
2122
- function isError(obj: any): obj is Error;
1793
+ export { isError }
2123
1794
 
2124
1795
  /**
2125
1796
  * Checks if the Fetch API is supported in the current environment.
@@ -2128,7 +1799,7 @@ declare namespace ApplicationInsights {
2128
1799
  */
2129
1800
  function isFetchSupported(withKeepAlive?: boolean): boolean;
2130
1801
 
2131
- function isFunction(value: any): value is Function;
1802
+ export { isFunction }
2132
1803
 
2133
1804
  /**
2134
1805
  * Identifies whether the current environment appears to be IE
@@ -2137,20 +1808,15 @@ declare namespace ApplicationInsights {
2137
1808
 
2138
1809
  function isNotNullOrUndefined<T>(value: T): value is T;
2139
1810
 
2140
- function isNotTruthy(value: any): boolean;
1811
+ export { isNotTruthy }
2141
1812
 
2142
1813
  function isNotUndefined<T>(value: T): value is T;
2143
1814
 
2144
- function isNullOrUndefined(value: any): value is null | undefined;
1815
+ export { isNullOrUndefined }
2145
1816
 
2146
- /**
2147
- * Checks if the type of value is a number.
2148
- * @param {any} value - Value to be checked.
2149
- * @return {boolean} True if the value is a number, false otherwise.
2150
- */
2151
- function isNumber(value: any): value is number;
1817
+ export { isNumber }
2152
1818
 
2153
- function isObject<T>(value: T): value is T;
1819
+ export { isObject }
2154
1820
 
2155
1821
  /**
2156
1822
  * Returns whether the environment is reporting that we are running in a React Native Environment
@@ -2166,26 +1832,15 @@ declare namespace ApplicationInsights {
2166
1832
  */
2167
1833
  function isSampledFlag(value: ITraceParent): boolean;
2168
1834
 
2169
- /**
2170
- * Checks if the type of value is a string.
2171
- * @param {any} value - Value to be checked.
2172
- * @return {boolean} True if the value is a string, false otherwise.
2173
- */
2174
- function isString(value: any): value is string;
1835
+ export { isString }
2175
1836
 
2176
- /**
2177
- * Checks if the type of value is a Symbol.
2178
- * This only returns a boolean as returning value is Symbol will cause issues for older TypeScript consumers
2179
- * @param {any} value - Value to be checked.
2180
- * @return {boolean} True if the value is a Symbol, false otherwise.
2181
- */
2182
- function isSymbol(value: any): boolean;
1837
+ export { isSymbol }
2183
1838
 
2184
- function isTruthy(value: any): boolean;
1839
+ export { isTruthy }
2185
1840
 
2186
- function isTypeof(value: any, theType: string): boolean;
1841
+ export { isTypeof }
2187
1842
 
2188
- function isUndefined(value: any): value is undefined;
1843
+ export { isUndefined }
2189
1844
 
2190
1845
  /**
2191
1846
  * Is the provided W3c span id (aka. parent id) a valid string representation, it must be a 16-character
@@ -2411,18 +2066,6 @@ declare namespace ApplicationInsights {
2411
2066
  run: (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
2412
2067
  }
2413
2068
 
2414
- /**
2415
- * Helper to support backward compatibility for users that use the legacy cookie handling functions and the use the internal
2416
- * CoreUtils._canUseCookies global flag to enable/disable cookies usage.
2417
- * Note: This has the following deliberate side-effects
2418
- * - Creates the global (legacy) cookie manager if it does not already exist
2419
- * - Attempts to add "listeners" to the CoreUtils._canUseCookies property to support the legacy usage
2420
- * @param config
2421
- * @param logger
2422
- * @returns
2423
- */
2424
- function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr;
2425
-
2426
2069
  const LoggingSeverity: EnumValue<typeof eLoggingSeverity>;
2427
2070
 
2428
2071
  type LoggingSeverity = number | eLoggingSeverity;
@@ -2515,17 +2158,7 @@ declare namespace ApplicationInsights {
2515
2158
 
2516
2159
  export { objCreate }
2517
2160
 
2518
- /**
2519
- * Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
2520
- * existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
2521
- * and executed in an ES3 container, providing basic IE8 compatibility.
2522
- * @param target The object on which to define the property.
2523
- * @param prop The name of the property to be defined or modified.
2524
- * @param getProp The getter function to wire against the getter.
2525
- * @param setProp The setter function to wire against the setter.
2526
- * @returns True if it was able to create the accessors otherwise false
2527
- */
2528
- function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
2161
+ export { objDefineAccessors }
2529
2162
 
2530
2163
  /**
2531
2164
  * Pass in the objects to merge as arguments, this will only "merge" (extend) properties that are owned by the object.
@@ -2541,27 +2174,15 @@ declare namespace ApplicationInsights {
2541
2174
 
2542
2175
  function objExtend<T1, T2, T3, T4, T5, T6>(obj1?: T1, obj2?: T2, obj3?: T3, obj4?: T4, obj5?: T5, obj6?: T6): T1 & T2 & T3 & T4 & T5 & T6;
2543
2176
 
2544
- /**
2545
- * This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
2546
- * performance optimization to avoid the creation of a new array for large objects
2547
- * @param target The target object to find and process the keys
2548
- * @param callbackfn The function to call with the details
2549
- */
2550
- function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void): void;
2177
+ export { objForEachKey }
2551
2178
 
2552
- const objFreeze: <T>(value: T) => T;
2179
+ export { objFreeze }
2553
2180
 
2554
- /**
2555
- * Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
2556
- * that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
2557
- * Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
2558
- * @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
2559
- */
2560
- function objKeys(obj: {}): string[];
2181
+ export { objKeys }
2561
2182
 
2562
- const objSeal: <T>(value: T) => T;
2183
+ export { objSeal }
2563
2184
 
2564
- function objToString(obj: any): any;
2185
+ export { objToString }
2565
2186
 
2566
2187
  /**
2567
2188
  * A helper function to assist with JIT performance for objects that have properties added / removed dynamically
@@ -2881,12 +2502,6 @@ declare namespace ApplicationInsights {
2881
2502
  MaxQueuedEvents = 20
2882
2503
  }
2883
2504
 
2884
- /**
2885
- * @deprecated - Use the core.getCookieMgr().set()
2886
- * helper method to set userId and sessionId cookie
2887
- */
2888
- function setCookie(logger: IDiagnosticLogger, name: string, value: string, domain?: string): void;
2889
-
2890
2505
  /**
2891
2506
  * Enable the lookup of test mock objects if requested
2892
2507
  * @param enabled
@@ -2920,13 +2535,7 @@ declare namespace ApplicationInsights {
2920
2535
  */
2921
2536
  function strContains(value: string, search: string): boolean;
2922
2537
 
2923
- /**
2924
- * The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
2925
- * @param value - The value to check whether it ends with the search value.
2926
- * @param search - The characters to be searched for at the end of the value.
2927
- * @returns true if the given search value is found at the end of the string, otherwise false.
2928
- */
2929
- function strEndsWith(value: string, search: string): boolean;
2538
+ export { strEndsWith }
2930
2539
 
2931
2540
  export { strFunction }
2932
2541
 
@@ -2934,18 +2543,9 @@ declare namespace ApplicationInsights {
2934
2543
 
2935
2544
  export { strPrototype }
2936
2545
 
2937
- /**
2938
- * The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
2939
- * @param value - The value to check whether it ends with the search value.
2940
- * @param checkValue - The characters to be searched for at the start of the value.
2941
- * @returns true if the given search value is found at the start of the string, otherwise false.
2942
- */
2943
- function strStartsWith(value: string, checkValue: string): boolean;
2546
+ export { strStartsWith }
2944
2547
 
2945
- /**
2946
- * helper method to trim strings (IE8 does not implement String.prototype.trim)
2947
- */
2948
- function strTrim(str: any): string;
2548
+ export { strTrim }
2949
2549
 
2950
2550
  export { strUndefined }
2951
2551
 
@@ -2998,7 +2598,7 @@ declare namespace ApplicationInsights {
2998
2598
  PluginRemoved = 32
2999
2599
  }
3000
2600
 
3001
- function throwError(message: string): never;
2601
+ export { throwError }
3002
2602
 
3003
2603
  /**
3004
2604
  * This is a helper method which will call throwInternal on the passed logger, will throw exceptions in
@@ -3014,7 +2614,7 @@ declare namespace ApplicationInsights {
3014
2614
  /**
3015
2615
  * Convert a date to I.S.O. format in IE8
3016
2616
  */
3017
- function toISOString(date: Date): string;
2617
+ function toISOString(date: Date): any;
3018
2618
 
3019
2619
  function uaDisallowsSameSiteNone(userAgent: string): boolean;
3020
2620