Skip to content

Commit eaa8e20

Browse files
committed
address typescript error
1 parent 900e462 commit eaa8e20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node/internal/internal_utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export function normalizeEncoding(enc?: string): Encoding | undefined {
5050

5151
export function getEncodingOps(enc: unknown): Encoding | undefined {
5252
if (enc === undefined) return UTF8;
53-
let encoding = String(enc);
53+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
54+
let encoding = `${enc}`;
5455
switch (encoding.length) {
5556
case 4:
5657
if (encoding === 'UTF8') return UTF8;

0 commit comments

Comments
 (0)