Skip to content

Commit

Permalink
Update TypeScript slightly to fix new Node types issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Mar 19, 2024
1 parent a5b8287 commit ad59f34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions src/server/http-combo-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,11 @@ function copyAddressDetails(
source: SocketIsh<typeof SOCKET_ADDRESS_METADATA_FIELDS[number]>,
target: SocketIsh<typeof SOCKET_ADDRESS_METADATA_FIELDS[number]>
) {
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];
Expand Down

0 comments on commit ad59f34

Please sign in to comment.