From 75818e8b960b28a568e3540b4f0971d6bb8c9dc2 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 4 Dec 2024 11:49:03 -0500 Subject: [PATCH] web-socket-handler: fix type for TypeScript update The TypeScript 5.7.2 update does not like one of the types. This commit updates the bad type. Refs: https://github.com/kubernetes-client/javascript/pull/2050 --- src/web-socket-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web-socket-handler.ts b/src/web-socket-handler.ts index 8766578cfe..4531f8c627 100644 --- a/src/web-socket-handler.ts +++ b/src/web-socket-handler.ts @@ -262,7 +262,7 @@ function copyChunkForWebSocket( encoding ??= 'utf-8'; const size = Buffer.byteLength(chunk, encoding); buff = Buffer.alloc(size + 1); - buff.write(chunk, 1, size, encoding); + buff.write(chunk as string, 1, size, encoding); } buff.writeInt8(streamNum, 0);