You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alecgibson (via GitHub)" <gi...@apache.org> on 2025/08/19 11:34:26 UTC

Re: [I] [JS] Apache Arrow does not compile with Typescript when types are checked [arrow-js]

alecgibson commented on issue #45:
URL: https://github.com/apache/arrow-js/issues/45#issuecomment-3200381445

   We've monkeypatched this to avoid dragging in another `lib` (although would obviously nice if it was fixed properly; I sadly don't have time to raise a PR):
   
   ```ts
   // apache-arrow.d.ts
   
   import type {
     StreamPipeOptions as _StreamPipeOptions,
     QueuingStrategy as _QueuingStrategy,
     ReadableStreamReadResult as _ReadableStreamReadResult,
   } from 'node:stream/web';
   
   // apache-arrow has broken types that assume the WebWorker lib
   // https://github.com/apache/arrow-js/issues/45
   
   declare module 'apache-arrow/io/interfaces.d.ts' {
     export type StreamPipeOptions = _StreamPipeOptions;
     export type QueuingStrategy<T = any> = _QueuingStrategy<T>;
     export type ReadableStreamReadResult<T> = _ReadableStreamReadResult<T>;
   }
   
   declare module 'apache-arrow/util/buffer.d.ts' {
     export type ReadableStreamReadResult<T> = _ReadableStreamReadResult<T>;
   }
   ```


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org