agam opened a new issue, #130:
URL: https://github.com/apache/arrow-js/issues/130

   While there are several _versions_ that are Javascript-compatible, the "pure 
Typescript" version fails to type check.
   
   - It is possible to use specific versions, e.g. `@apache-arrow/es2015-umd`.
   
   - It is also possible to use the "umbrella" import `apache-arrow`.
   
   - However, the `@apache-arrow/ts` import fails to type check with `tsc`.
   
   A sample of errors from one file:
   
   ```
   ../../node_modules/@apache-arrow/ts/schema.ts:46:49 - error TS2345: Argument 
of type '(Field<T[keyof T]> | undefined)[]' is not assignable to parameter of 
type 'Field<any>[]'.
     Type 'Field<T[keyof T]> | undefined' is not assignable to type 
'Field<any>'.
       Type 'undefined' is not assignable to type 'Field<any>'.
   
   46         return new Schema<{ [key: string]: K }>(columnIndices.map((i) => 
this.fields[i]).filter(Boolean), this.metadata);
                                                      
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
   ../../node_modules/@apache-arrow/ts/schema.ts:64:58 - error TS2532: Object 
is possibly 'undefined'.
   
   64                 metadata: mergeMaps(mergeMaps(new Map(), 
curFields[i].metadata), f2.metadata)
                                                               ~~~~~~~~~~~~
   
   ../../node_modules/@apache-arrow/ts/schema.ts:129:22 - error TS2532: Object 
is possibly 'undefined'.
   
   129         const type = field.type;
                            ~~~~~
   ```
   
   (Is there any plan to have the typescript code eventually type-check with 
`tsc` ?)
   


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

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

Reply via email to