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'); }