Copilot commented on code in PR #256: URL: https://github.com/apache/arrow-js/pull/256#discussion_r2289669242
########## src/util/utf8.ts: ########## @@ -17,7 +17,7 @@ const decoder = new TextDecoder('utf-8'); /** @ignore */ -export const decodeUtf8 = (buffer?: BufferSource) => decoder.decode(buffer); +export const decodeUtf8 = (buffer?: Parameters<InstanceType<typeof TextDecoder>['decode']>[0]) => decoder.decode(buffer); Review Comment: The type `Parameters<InstanceType<typeof TextDecoder>['decode']>[0]` is overly complex and hard to read. Consider extracting this to a type alias or using a simpler approach like `ArrayBuffer | ArrayBufferView | null | undefined` which matches the actual parameter type. ```suggestion export const decodeUtf8 = (buffer?: ArrayBuffer | ArrayBufferView | null | undefined) => decoder.decode(buffer); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org