From d128f0ff4eb195768c1db27038012d5c5792c3ee Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Mon, 15 Nov 2021 15:14:02 -0500 Subject: [PATCH] chore: fix the compilation for typescript 4.4 (#2623) --- .../src/types.ts | 2 +- tsconfig.base.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 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"