From 273d5fcf6fbe0926076f1564296f87d0b605c6d7 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 15 Nov 2021 14:41:44 -0500 Subject: [PATCH 1/2] chore: fix the compilation for typescript 4.4 --- tsconfig.base.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index 2d628cad8d..ca44078430 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -19,7 +19,8 @@ "sourceMap": true, "strict": true, "strictNullChecks": true, - "target": "es2017" + "target": "es2017", + "useUnknownInCatchVariables": false }, "exclude": [ "node_modules" From bfd666504e53fa7cc8476971db76d522daf05bdb Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 15 Nov 2021 14:54:26 -0500 Subject: [PATCH 2/2] chore: use official type for sendfunction --- .../opentelemetry-instrumentation-xml-http-request/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts b/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts index d3c02e117d..430e9e217b 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts @@ -30,7 +30,7 @@ export type OpenFunction = ( /** * method "send" from XMLHttpRequest */ -export type SendFunction = (body?: SendBody) => void; +export type SendFunction = typeof XMLHttpRequest.prototype.send; export type SendBody = | string