Skip to content

[JS] Apache Arrow does not compile with Typescript when types are checked #45

Description

@mirkoiv

Describe the bug, including details regarding any error messages, version, and platform.

Elasticsearch: 8.17.1
Apache Arrow: 18.0.0
Typescript: 5.7.3
Node: 20.15.0

node_modules/apache-arrow/io/interfaces.d.ts:59:51 - error TS2304: Cannot find name 'StreamPipeOptions'.

59 pipeTo(writable: WritableStream, options?: StreamPipeOptions): Promise;
~~~~~~~~~~~~~~~~~

node_modules/apache-arrow/io/interfaces.d.ts:63:18 - error TS2304: Cannot find name 'StreamPipeOptions'.

63 }, options?: StreamPipeOptions): ReadableStream;
~~~~~~~~~~~~~~~~~

node_modules/apache-arrow/ipc/writer.d.ts:34:61 - error TS2552: Cannot find name 'QueuingStrategy'. Did you mean 'CountQueuingStrategy'?

34 static throughDOM(writableStrategy?: QueuingStrategy<RecordBatch> & {
~~~~~~~~~~~~~~~

node_modules/@types/node/stream/web.d.ts:455:13
node_modules/@types/node/stream/web.d.ts:455:13
455 var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T
~~~~~~~~~~~~~~~~~~~~
'CountQueuingStrategy' is declared here.

node_modules/apache-arrow/util/buffer.d.ts:8:398 - error TS2304: Cannot find name 'ReadableStreamReadResult'.

8 export type ArrayBufferViewInput = ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable | Iterable | ArrayLike | ArrayLike | ByteBuffer | string | null | undefined | IteratorResult<ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable | Iterable | ArrayLike | ArrayLike | ByteBuffer | string | null | undefined> | ReadableStreamReadResult<ArrayBufferView | ArrayBufferLike | ArrayBufferView | Iterable | Iterable | ArrayLike | ArrayLike | ByteBuffer | string | null | undefined>;
~~~~~~~~~~~~~~~~~~~~~~~~

Found 4 errors in 3 files.

Errors Files
2 node_modules/apache-arrow/io/interfaces.d.ts:59
1 node_modules/apache-arrow/ipc/writer.d.ts:34
1 node_modules/apache-arrow/util/buffer.d.ts:8

apache-arrow-compile-error.zip

Component(s)

JavaScript

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions