From 49ea862829a6aafaf311437b559006671eed0d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Da=C3=9Fler?= Date: Fri, 29 Aug 2025 15:02:08 +0200 Subject: [PATCH] Fix TypeScript warnings: add explanatory comments to @ts-expect-error directives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- TextEncodingFactory.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TextEncodingFactory.ts b/TextEncodingFactory.ts index 888b8f9..ad52ec5 100644 --- a/TextEncodingFactory.ts +++ b/TextEncodingFactory.ts @@ -117,18 +117,18 @@ export function createTextDecoder(label?: string, options?: TextDecoderOptions): export function installTextEncodingPolyfills(): void { const logger = new LoggerComponent('TextEncodingPolyfills'); - // @ts-expect-error + // @ts-expect-error - global object access in React Native/Node environment if (typeof global !== 'undefined') { - // @ts-expect-error + // @ts-expect-error - TextEncoder may not exist in global scope if (typeof global.TextEncoder === 'undefined') { - // @ts-expect-error + // @ts-expect-error - Adding to global object global.TextEncoder = TextEncoderPolyfill; logger.info('Installed TextEncoder polyfill globally'); } - // @ts-expect-error + // @ts-expect-error - TextDecoder may not exist in global scope if (typeof global.TextDecoder === 'undefined') { - // @ts-expect-error + // @ts-expect-error - Adding to global object global.TextDecoder = TextDecoderPolyfill; logger.info('Installed TextDecoder polyfill globally'); }