Skip to content

[JS] Arrow 0.3.1 cannot compile with typescript 2.8.3 and ES6 #2115

@ruixuel

Description

@ruixuel

Arrow version: 0.3.1
Typescript version: 2.8.3
tsconfig.json:
{
"compilerOptions": {
"allowJs": true,
"jsx": "react",
"types": ["node"],
"module": "commonjs",
"lib": [
"dom",
"webworker",
"ES6",
"scripthost",
],
"target": "ES6",
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true
},
"include": [
"./src/**/*"
],
"exclude": [
"node_modules"
]
}

I am trying to use the latest arrow JS library (0.3.1) and compile it with typescript 2.8.3 and ES6, however I get these errors:

ERROR in [at-loader] ./node_modules/apache-arrow/type.d.ts:135:47
    TS2344: Type 'TArrayType' does not satisfy the constraint 'TypedArray'.
  Type 'IntArray' is not assignable to type 'TypedArray'.
    Type 'Uint8Array' is not assignable to type 'TypedArray'.
      Property 'includes' is missing in type 'Uint8Array'.

ERROR in [at-loader] ./node_modules/apache-arrow/type.d.ts:170:47
    TS2344: Type 'TArrayType' does not satisfy the constraint 'TypedArray'.
  Type 'FloatArray' is not assignable to type 'TypedArray'.
    Type 'Uint16Array' is not assignable to type 'TypedArray'.
      Property 'includes' is missing in type 'Uint16Array'.

ERROR in [at-loader] ./node_modules/apache-arrow/vector/list.d.ts:6:43
    TS2304: Cannot find name 'SharedArrayBuffer'.

I think these are new in ES2016 and ES2017.
I import arrow as: import {Table} from "arrow-apache";
I notice that the arrow js supports ES5 and ES2015, so I also tried package: "apache-arrow/es2015-cjs", but it does not compile either.

I am wondering if there's any way that I can compile the arrow js latest version with ES6?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions