From ad59f349f465130cc4829d0d6ca08327a456e790 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Tue, 19 Mar 2024 17:43:01 +0100 Subject: [PATCH] Update TypeScript slightly to fix new Node types issues --- package.json | 4 ++-- src/server/http-combo-server.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3e5621b75..00e9cb641 100644 --- a/package.json +++ b/package.json @@ -146,9 +146,9 @@ "stream-browserify": "^3.0.0", "tmp-promise": "^1.0.3", "ts-loader": "^9.2.9", - "ts-node": "^9.1.1", + "ts-node": "^10.9.2", "typedoc": "^0.22.4", - "typescript": "4.5.5", + "typescript": "4.7.4", "url": "^0.11.0", "util": "^0.12.4", "webpack": "^5.72.0", diff --git a/src/server/http-combo-server.ts b/src/server/http-combo-server.ts index d45f0ba69..aabfb16c1 100644 --- a/src/server/http-combo-server.ts +++ b/src/server/http-combo-server.ts @@ -339,9 +339,11 @@ function copyAddressDetails( source: SocketIsh, target: SocketIsh ) { - Object.defineProperties(target, _.zipObject(SOCKET_ADDRESS_METADATA_FIELDS, + Object.defineProperties(target, _.zipObject( + SOCKET_ADDRESS_METADATA_FIELDS, _.range(SOCKET_ADDRESS_METADATA_FIELDS.length).map(() => ({ writable: true })) - )); + ) as PropertyDescriptorMap); + SOCKET_ADDRESS_METADATA_FIELDS.forEach((fieldName) => { if (target[fieldName] === undefined) { (target as any)[fieldName] = source[fieldName];