-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Typescript build with 2.4.0 breaks #1173 #1175
Conversation
AISKU/Tests/package.json
Outdated
@@ -0,0 +1,41 @@ | |||
{ | |||
"name": "@microsoft/applicationinsights-web-tests", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding new package.json so the tests reference the generated module.
@@ -85,7 +85,7 @@ module Microsoft.ApplicationInsights { | |||
private instrumentOpen() { | |||
var originalOpen = XMLHttpRequest.prototype.open; | |||
var ajaxMonitorInstance = this; | |||
XMLHttpRequest.prototype.open = function (method, url, async) { | |||
XMLHttpRequest.prototype.open = function (method, url, async?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change backported from my TypeScript 3.7.x upgrade PR (Where I tested these changes) as the async is really optional.
@@ -232,7 +232,7 @@ export class Util { | |||
const keys = []; | |||
|
|||
if (Util.canUseSessionStorage()) { | |||
for (const key in getGlobalInst("sessionStorage")) { | |||
for (const key in getGlobalInst<any>("sessionStorage")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another TS 3.7.x required syntax change.
Note: This PR is not changing that the version of TS being used (2.5.3)
@@ -137,7 +137,7 @@ export class ProcessTelemetryContext implements IProcessTelemetryContext { | |||
/** | |||
* Create a new context using the core and config from the current instance | |||
*/ | |||
public createNew: (plugins?:IPlugin[], startAt?:IPlugin) => IProcessTelemetryContext; | |||
public createNew: (plugins?:IPlugin[]|ITelemetryPluginChain, startAt?:IPlugin) => IProcessTelemetryContext; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the actual implementation failure
86bf33f
to
8dafbc6
Compare
Address issue #1173 where the declaration of the methods does not match the actual implementation.