-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
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/tsimport fails to type check withtsc.
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 ?)
Metadata
Metadata
Assignees
Labels
No labels