[ 
https://issues.apache.org/jira/browse/ARROW-8394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17185329#comment-17185329
 ] 

Tim Conkling commented on ARROW-8394:
-------------------------------------

Chiming in with an annoying +1 vote for this issue - is it being investigated?

 

I'm using Apache Arrow to ship dataframes from Python to a browser app, and 
would _love_ to be able to use TypeScript, but I'm unable to get the project to 
compile.

 

Incidentally, I also tried downgrading my project's TypeScript version to 3.5, 
but that results in different errors:


```
node_modules/apache-arrow/ipc/reader.d.ts:238:5 - error TS2717: Subsequent 
property declarations must have the same type. Property 'schema' must be of 
type 'Schema<T>', but here has type 'Schema<any>'.

238 schema: Schema;
 ~~~~~~

node_modules/apache-arrow/ipc/reader.d.ts:191:5
 191 schema: Schema<T>;
 ~~~~~~
 'schema' was also declared here.

node_modules/apache-arrow/recordbatch.d.ts:17:18 - error TS2430: Interface 
'RecordBatch<T>' incorrectly extends interface 'StructVector<T>'.
 Types of property 'slice' are incompatible.
 Type '(begin?: number | undefined, end?: number | undefined) => 
RecordBatch<T>' is not assignable to type '(begin?: number | undefined, end?: 
number | undefined) => StructVector<T>'.
 Type 'RecordBatch<T>' is not assignable to type 'StructVector<T>'.
 Types of property 'clone' are incompatible.
 Type '(data: Data<Struct<T>>, children?: AbstractVector<any>[] | undefined) => 
RecordBatch<T>' is not assignable to type '<R extends DataType<Type, any> = 
Struct<T>>(data: Data<R>, children?: AbstractVector<R>[] | undefined) => 
VectorType<R>'.
 Types of parameters 'data' and 'data' are incompatible.
 Type 'Data<R>' is not assignable to type 'Data<Struct<T>>'.
 Type 'R' is not assignable to type 'Struct<T>'.
 Property 'dataTypes' is missing in type 'DataType<Type, any>' but required in 
type 'Struct<T>'.

17 export interface RecordBatch<T extends {
 ~~~~~~~~~~~

node_modules/apache-arrow/type.d.ts:458:5
 458 dataTypes: T;
 ~~~~~~~~~
 'dataTypes' is declared here.

node_modules/apache-arrow/recordbatch.d.ts:24:22 - error TS2415: Class 
'RecordBatch<T>' incorrectly extends base class 'StructVector<T>'.

24 export declare class RecordBatch<T extends {
 ~~~~~~~~~~~


Found 3 errors.
```

> [JS] Typescript compiler errors for arrow d.ts files, when using es2015-esm 
> package
> -----------------------------------------------------------------------------------
>
>                 Key: ARROW-8394
>                 URL: https://issues.apache.org/jira/browse/ARROW-8394
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: JavaScript
>    Affects Versions: 0.16.0
>            Reporter: Shyamal Shukla
>            Priority: Blocker
>
> Attempting to use apache-arrow within a web application, but typescript 
> compiler throws the following errors in some of arrow's .d.ts files
> import \{ Table } from "../node_modules/@apache-arrow/es2015-esm/Arrow";
> export class SomeClass {
> .
> .
> constructor() {
> const t = Table.from('');
> }
> *node_modules/@apache-arrow/es2015-esm/column.d.ts:14:22* - error TS2417: 
> Class static side 'typeof Column' incorrectly extends base class static side 
> 'typeof Chunked'. Types of property 'new' are incompatible.
> *node_modules/@apache-arrow/es2015-esm/ipc/reader.d.ts:238:5* - error TS2717: 
> Subsequent property declarations must have the same type. Property 'schema' 
> must be of type 'Schema', but here has type 'Schema'.
> 238 schema: Schema;
> *node_modules/@apache-arrow/es2015-esm/recordbatch.d.ts:17:18* - error 
> TS2430: Interface 'RecordBatch' incorrectly extends interface 'StructVector'. 
> The types of 'slice(...).clone' are incompatible between these types.
> the tsconfig.json file looks like
> {
>  "compilerOptions": {
>  "target":"ES6",
>  "outDir": "dist",
>  "baseUrl": "src/"
>  },
>  "exclude": ["dist"],
>  "include": ["src/*.ts"]
> }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to