Skip to content
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

Merged
merged 1 commit into from
Jan 30, 2020
Merged

Conversation

MSNev
Copy link
Collaborator

@MSNev MSNev commented Jan 29, 2020

Address issue #1173 where the declaration of the methods does not match the actual implementation.

@MSNev MSNev requested a review from a team as a code owner January 29, 2020 21:23
@@ -0,0 +1,41 @@
{
"name": "@microsoft/applicationinsights-web-tests",
Copy link
Collaborator Author

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?) {
Copy link
Collaborator Author

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")) {
Copy link
Collaborator Author

@MSNev MSNev Jan 29, 2020

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;
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants